Advanced AJAX Product Filters - Version 1.5.2.1

Version Description

  • Fix - Issue with pagination
  • Fix - Categories not displayed in conditions
  • Fix - Error with Elementor Popup
Download this release

Release Info

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

Code changes from version 1.5.2 to 1.5.2.1

assets/frontend/js/fullmain.min.js CHANGED
@@ -1,10 +1,10 @@
1
- function berocket_make_args_array(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b}function berocket_apply_filters(a,b){if("undefined"!=typeof berocket_filters[a]){var c=berocket_make_args_array(arguments);c.splice(0,1),jQuery.each(berocket_filters[a],function(a,d){b=d.callback.apply(null,c),c[0]=b})}return b}function berocket_do_action(a){if("undefined"!=typeof berocket_filters[a]){var b=berocket_make_args_array(arguments);b.splice(0,1),jQuery.each(berocket_filters[a],function(a,c){c.callback.apply(null,b)})}}function berocket_throw_error(a){var b="berocket_throw_error";if(error_exist=!0,"undefined"!=typeof berocket_filters[b]){for(var c,d=[error_exist];c<arguments.length;c++)d.push(arguments[c]);jQuery.each(berocket_filters[b],function(a,b){if(error_exist=b.callback.apply(null,d),d[0]=error_exist,!error_exist)return!1})}return error_exist}function berocket_add_filter(a,b,c){"undefined"==typeof c&&(c=10),"undefined"==typeof berocket_filters[a]&&(berocket_filters[a]=[]);var d=!1;jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b&&(d=!0)}),d||(berocket_filters[a].push({callback:b,priority:c}),berocket_filters[a]=berocket_sort_by_priority(berocket_filters[a]))}function berocket_remove_filter(a,b,c){if("undefined"==typeof c&&(c=10),"undefined"!=typeof berocket_filters[a]){var d=[];jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b||d.push(e)}),berocket_filters[a]=berocket_sort_by_priority(d)}}function berocket_sort_by_priority(a){return Array.isArray(a)&&a.sort(function(a,b){return a.priority>b.priority?1:a.priority<b.priority?-1:0}),a}function berocket_format_number(a,b){"undefined"==typeof b&&(b=the_ajax_script.number_style);var c=a.toFixed(b[2]);c=c.toString();var d=c.split("."),e=d[0];return c.indexOf(".")!=-1&&(d=d[1]),e=e.replace(/\d(?=(?:\d{3})+(?:$))/g,function(a,c){return a+b[0]}),c.indexOf(".")!=-1&&(e=e+b[1]+d),e}function braapf_grab_all_init(){braapf_grab_all()}function braapf_selected_filters_area_set_init(){braapf_selected_filters_area_set()}function braapf_filtered_filters_set(){braapf_filtered_filters=braapf_selected_filters.slice(),berocket_do_action("braapf_init_filtered_set",braapf_filtered_filters)}var berocket_filters={};berocket_add_filter("compat_filters_result_single",function(a){return"object"==typeof a&&"string"==typeof a.taxonomy&&"pa_"==a.taxonomy.substr(0,3)&&(a.taxonomy=a.taxonomy.substr(3)),a}),jQuery(document).trigger("berocket_hooks_ready");var braapf_filter_blocked=!1,braapf_selected_filters=[],braapf_filtered_filters=[],braapf_filters_var,braapf_ajax_request,braapf_checkbox_same,braapf_update_products,braapf_grab_all,braapf_grab_single,braapf_compact_filters,braapf_compat_filters_to_string,braapf_build_url_from_urldata,braapf_apply_additional_filter_data,braapf_glue_by_operator,braapf_ajax_load_from_url,braapf_ajax_load_from_url_request,braapf_init_load,braapf_remove_pages_from_url_data,braapf_filter_products_by_url,braapf_get_current_url_data,braapf_reset_buttons_hide,bapf_universal_theme_compatibility,braapf_disable_ajax_loading,braapf_close_tippy;!function(a){function b(a){return berocket_remove_filter("ajax_load_from_url_beforeSend",b),a.setRequestHeader("X-Braapfdisable","1"),a}function c(a){return a.setRequestHeader("X-Braapf","1"),a}a(document).on("change",".bapf_sfilter.bapf_ckbox input[type=checkbox]",function(){var b=a(this).val(),c=a(this).parents(".bapf_sfilter").data("taxonomy"),d=a(this).prop("checked");braapf_checkbox_same(c,b,d),berocket_apply_filters("input_ckbox_changed",this,c,b,d);var e={element:"#"+a(this).attr("id"),parent:1,find:!1};berocket_apply_filters("filter_changed_element",e,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_checkbox_same=function(b,c,d){a('.bapf_sfilter[data-taxonomy="'+b+'"] input[value="'+c+'"]').prop("checked",d),a('.bapf_sfilter[data-taxonomy="'+b+'"]').length<a('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+b+'"]').length&&berocket_throw_error("multiple_filters_for_same_taxonomy",b)},a(document).on("braapf_unselect",".bapf_ckbox",function(b,c){if("undefined"==typeof c&&(c=!1),0==c)var d=a(this).find("input[type=checkbox]");else var d=a(this).find('input[value="'+c.value+'"]');if(d.length>0){var e=d.val(),f=a(this).data("taxonomy");d.prop("checked",!1),braapf_checkbox_same(f,e,!1)}}),a(document).on("braapf_unselect_all",".bapf_ckbox",function(b,c){a(this).trigger("braapf_unselect",!1)}),a(document).on("berocket_filters_document_ready",function(){a(".bapf_ckbox input[type=checkbox]:checked").closest("li").parents("li").trigger("bapf_ochild")}),a(document).on("click",".berocket_aapf_widget_update_button, .bapf_update",function(b){b.preventDefault(),berocket_do_action("update_products","update",a(this))}),a(document).on("click",".berocket_aapf_reset_button, .bapf_reset",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),braapf_reset_buttons_hide=function(){berocket_apply_filters("bapf_rst_nofltr_hide","undefined"==typeof braapf_filtered_filters||braapf_filtered_filters.length<=0)?a(".bapf_rst_nofltr").hide():a(".bapf_rst_nofltr").show();var b=!1;"undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0&&a.each(braapf_filtered_filters,function(a,c){if(c.values.length>0)return b=!0,!1}),berocket_apply_filters("bapf_rst_sel_show",b)?a(".bapf_rst_sel").show():a(".bapf_rst_sel").hide()},berocket_add_filter("braapf_init",braapf_reset_buttons_hide,1500),berocket_add_filter("braapf_init_filtered_set",braapf_reset_buttons_hide,1500);var d=the_ajax_script.pagination_class;d=d.replace(","," a,"),d=berocket_apply_filters("pagination_links_a_tags",d+" a",the_ajax_script.pagination_class),!the_ajax_script.disable_ajax_loading&&the_ajax_script.pagination_ajax&&a(document).on("click",d,function(c){c.preventDefault();var d=a(this).attr("href");d=berocket_apply_filters("pagination_href_from_clicked_a",decodeURI(d),a(this)),braapf_change_url_history_api(d,{replace:the_ajax_script.seo_friendly_urls}),berocket_add_filter("ajax_load_from_url_beforeSend",b),braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_pagination",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_init_load,braapf_update_url_history_api_from_current]},d))}),!the_ajax_script.disable_ajax_loading&&the_ajax_script.control_sorting&&a(document).on("submit",the_ajax_script.ordering_class,function(b){b.preventDefault();var c=braapf_get_current_url_data();if(c=braapf_remove_pages_from_url_data(c),Array.isArray(c.queryargs)){var d=[];a.each(c.queryargs,function(a,b){"orderby"!=b.name&&d.push(b)}),c.queryargs=d}else c.queryargs=[];var e=a(this).serializeArray();Array.isArray(e)&&a.each(e,function(a,b){"paged"==b.name?c.page=parseInt(b.value):"orderby"==b.name?the_ajax_script.default_sorting!=b.value&&c.queryargs.push(b):c.queryargs.push(b)});var f=braapf_build_url_from_urldata(c);braapf_filter_products_by_url(f)}),braapf_get_url_with_filters_selected=function(){braapf_grab_all();var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split),d=braapf_get_current_url_data();d.filter=c,d=braapf_remove_pages_from_url_data(d),d=braapf_apply_additional_filter_data(d);var e=braapf_build_url_from_urldata(d);return e},braapf_update_products=function(b,c){"undefined"==typeof b&&(b="filter"),"undefined"==typeof c&&(c=!1),b=berocket_apply_filters("before_update_products_context",b,c);var d=berocket_apply_filters("before_update_products_context_url_filtered",braapf_get_url_with_filters_selected(),b,c);berocket_apply_filters("apply_filters_to_page",0==a(".berocket_aapf_widget_update_button:visible, .bapf_update:visible").length||"filter"!=b,b,c,d)?(braapf_selected_filters_area_set(),braapf_filter_products_by_url(d)):berocket_apply_filters("apply_filters_to_page_partial",!1,b,c,d)&&braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_filters_partial",{done:[braapf_replace_each_filter,braapf_init_load]},d,"partial"),"partial")},braapf_filter_products_by_url=function(b){berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,b)?location.href=b:(braapf_change_url_history_api(b,{replace:the_ajax_script.seo_friendly_urls}),braapf_ajax_load_from_url(b,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},b,"default")))},braapf_update_url_history_api_from_current=function(){the_ajax_script.seo_friendly_urls&&(url_filtered=braapf_get_url_with_filters_selected(),history.replaceState(history.state,"BeRocket Rules",url_filtered))},braapf_grab_all=function(b){"undefined"==typeof b&&(b=!1);var c=berocket_apply_filters("before_grab_all_filters",[],b);if(b===!1)var d=a(".bapf_sfilter");else var d=a(b).find(".bapf_sfilter");return d.each(function(){var a=braapf_grab_single(this,c);a!==!1&&c.push(a)}),c=berocket_apply_filters("grab_all_filters",c,b),b===!1&&(braapf_selected_filters=c),c},braapf_grab_single=function(b,c,d){"undefined"==typeof d&&(d=!1),b=a(b);var e=!1,f=!1,g=b.data("taxonomy");if("undefined"==typeof g||!g)return berocket_apply_filters("grab_single_filter_taxonomy_undefined",e,b,c);if(a.each(c,function(a,b){b.taxonomy==g&&(f=!0)}),!berocket_apply_filters("grab_single_filter_exist",f,b,c)){if(e=berocket_apply_filters("grab_single_filter",e,b,c),e!==!1)return e;var h=b.data("op"),i=b.data("name");"undefined"==typeof i&&(i="");var j=braapf_glue_by_operator(h),k=[],l=[];if(d)var m=b;else var m=a(".bapf_sfilter[data-taxonomy="+g+"]");m.find("input:checked:not(:disabled)").each(function(b,c){l.indexOf(a(this).val())==-1&&(k.push({value:a(this).val(),html:a(this).data("name")}),l.push(a(this).val()))}),e={name:i,taxonomy:g,values:k,glue:j,operator:h}}return berocket_apply_filters("grab_single_filter_default",e,b,c)},braapf_glue_by_operator=function(a){"string"!=typeof a&&(a="");var b="-";return"and"==a.toLowerCase()&&(b="+"),berocket_apply_filters("glue_by_operator",b,a)},braapf_compact_filters=function(b){"undefined"==typeof b&&(b=braapf_selected_filters);var c=[];return a.each(b,function(b,d){var e="";"undefined"!=typeof d.customValuesLine?e=d.customValuesLine:a.each(d.values,function(a,b){e.length&&(e+=d.glue),e+=b.value}),e.length&&c.push(berocket_apply_filters("compat_filters_result_single",{taxonomy:d.taxonomy,values:e},d))}),berocket_apply_filters("compat_filters_result",c,b)},braapf_compat_filters_to_string=function(b,c,d){var e="";return a.each(b,function(a,f){e.length&&(e+=d);var g=c;g=g.replace("%t%",f.taxonomy),g=g.replace("%v%",f.values),e+=berocket_apply_filters("compat_filters_to_string_single",g,f,b,c,d)}),berocket_apply_filters("compat_filters_to_string",e,b,c,d)},braapf_get_current_url_data=function(b){if("undefined"==typeof b)var c=location.href.split("#")[0].split("?")[0],d=location.search.substring(1);else{var c=b.split("#")[0].split("?")[0];if(b.split("#")[0].split("?").length>1)var d=b.split("#")[0].split("?")[1];else var d=""}var e=[],f=1,g=c.match(/\/page\/(\d+)/);return g&&"string"==typeof g[1]&&(f=parseInt(g[1]),c=c.replace(/\/page\/(\d+)/,"")),d=d.split("&"),a.each(d,function(a,b){b.length&&(d[a]=b.split("="),"paged"==d[a][0]?f=parseInt(d[a][1]):e.push({name:d[a][0],value:d[a][1]}))}),berocket_apply_filters("get_current_url_data",{baselink:c,queryargs:e,filter:"",page:f})},braapf_remove_pages_from_url_data=function(b){if(b.page=1,Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"product-page"!=b.name&&c.push(b)}),b.queryargs=c}return b},braapf_apply_additional_filter_data=function(b,c){return"undefined"==typeof c&&(c=braapf_selected_filters),a.each(c,function(a,c){b=berocket_apply_filters("apply_additional_filter_data",b,c)}),b},braapf_build_url_from_urldata=function(b,c){"undefined"==typeof c&&(c=braapf_build_url_parameters_default());var d=berocket_apply_filters("url_from_urldata_baselink",b.baselink,b,c),e="";return b.queryargs.length&&a.each(b.queryargs,function(a,b){e.length&&(e+="&"),b.name.length&&(e+=b.name+"="+b.value)}),b.page&&b.page>1&&(e.length&&(e+="&"),e+="paged="+b.page),e.length&&(e="?"+e),d=berocket_apply_filters("url_from_urldata_linkget",d+e,b,c,d,e)},braapf_build_url_parameters_default=function(){return berocket_apply_filters("build_url_parameters_default",{})},braapf_replace_current_with_new=function(b,c,d){"undefined"==typeof d&&(d={}),args={replace:!1},jQuery.extend(args,d);var e=a("<div><div>"+b+"</div></div>"),f=e.find(c),g=a(c);0!=g.length&&(f.length!=g.length&&0!=f.length&&berocket_throw_error("error_notsame_block_qty",c,f.length,g.length),0==f.length?(g.html("").addClass("braapfNotReplaced"),g.hide()):(g.each(function(b,c){"undefined"!=typeof f[b]?args.replace?a(c).replaceWith(a(f[b])):a(c).html(a(f[b]).html()).removeClass("braapfNotReplaced"):a(c).html("").addClass("braapfNotReplaced")}),g.show()))},braapf_replace_products=function(b){var c=the_ajax_script.products_holder_id;a("<div><div>"+b+"</div></div>");a(".bapf_no_products").remove(),braapf_replace_current_with_new(b,c),a(".braapfNotReplaced").filter(c).length&&a(".braapfNotReplaced").filter(c).before(a(the_ajax_script.no_products))},braapf_replace_pagination=function(b){var c=the_ajax_script.pagination_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().after(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_result_count=function(b){var c=the_ajax_script.result_count_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_orderby=function(b){var c=the_ajax_script.ordering_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_each_filter=function(b){var c=a("<div><div>"+b+"</div></div>");a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).html(c.find(".berocket_single_filter_widget_"+b).last().html()),c.find(".berocket_single_filter_widget_"+b).is(".bapf_mt_none")?a(".berocket_single_filter_widget_"+b).addClass("bapf_mt_none"):a(".berocket_single_filter_widget_"+b).removeClass("bapf_mt_none")})},braapf_change_url_history_api=function(a,b){if("undefined"!=typeof b&&b.replace){var c={BeRocket:"Rules"};history.replaceState(c,""),history.pushState(c,"",a),history.pathname=a}},berocket_apply_filters("load_products_ajax_on_popstate",!0)&&(window.onpopstate=function(b){if(null!=b.state&&"Rules"==b.state.BeRocket){var c=location.href;berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,c)?location.href=c:braapf_ajax_load_from_url(c,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},c,"default"))}}),braapf_ajax_load_from_url=function(a,b,c,d){"undefined"==typeof d&&(d="default"),"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={done:[],fail:[],always:[]}),"undefined"!=typeof c.done&&Array.isArray(c.done)||(c.done=[]),"undefined"!=typeof c.fail&&Array.isArray(c.fail)||(c.fail=[]),"undefined"!=typeof c.always&&Array.isArray(c.always)||(c.always=[]),a=berocket_apply_filters("ajax_load_from_url_url",a,b,c,d),b=berocket_apply_filters("ajax_load_from_url_data",b,a,c,d),c=berocket_apply_filters("ajax_load_from_url_callback",c,a,b,d),braapf_ajax_load_from_url_request(a,b,c,d)},braapf_ajax_load_from_url_request=function(b,c,d,e){a(document).trigger("berocket_ajax_filtering_start"),"object"==typeof braapf_ajax_request&&"undefined"!=typeof braapf_ajax_request.abort&&braapf_ajax_request.abort(),braapf_ajax_request=a.ajax({method:"GET",url:b,data:c,beforeSend:function(a){a=berocket_apply_filters("ajax_load_from_url_beforeSend",a,b,c,d,e)}}).done(function(f,g,h){a(document).trigger("berocket_ajax_filtering_on_update"),f=berocket_apply_filters("ajax_load_from_url_done",f,b,c,d,e),a.each(d.done,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_done_after",f,b,c,d,e),a(document).trigger("berocket_ajax_products_loaded")}).fail(function(f,g,h){if("abort"==g)return!1;if(a(document).trigger("berocket_ajax_products_not_loaded"),f=berocket_apply_filters("ajax_load_from_url_fail",f,b,c,d,e),a.each(d.fail,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_fail_after",f,b,c,d,e),"default"==e){var i=jQuery.param(c);i&&(b=b.split("?").length>1?b+"&"+i:b+"?"+i),location.href=b}}).always(function(f,g,h){f=berocket_apply_filters("ajax_load_from_url_always",f,b,c,d,e),a.each(d.always,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_always_after",f,b,c,d,e),a(document).trigger("berocket_ajax_filtering_end")})},braapf_init_load=function(){var b=berocket_apply_filters("filter_mobile_width",767),c=berocket_apply_filters("filter_tablet_width",1024);a(window).width()<=b&&a(".bapf_sngl_hd_mobile").remove(),a(window).width()>b&&a(window).width()<=c&&a(".bapf_sngl_hd_tablet").remove(),a(window).width()>c&&a(".bapf_sngl_hd_desktop").remove(),a(".bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)").each(function(){a(this).css("max-height",a(this).data("mcs-h")).mCustomScrollbar({scrollInertia:300}).addClass("bapf_mcs_ready")}),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");berocket_apply_filters("remove_same_filters_to_prevent_errors",a(".berocket_single_filter_widget_"+b).length>1,a(this),b)&&a(".berocket_single_filter_widget_"+b).not(a(".berocket_single_filter_widget_"+b).first()).remove()}),a("body").on("click",".bapf_desci",function(a){a.stopPropagation()}),a("body").on("hover",".bapf_desci",function(a){a.stopPropagation()}),berocket_do_action("braapf_init",braapf_selected_filters),a(document).trigger("berocket_filters_first_load")},braapf_update_page_on_error=function(){berocket_apply_filters("update_page_on_error",!0)&&location.reload()},braapf_selected_filters_area_set=function(){if("undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0){var b="";a.each(braapf_filtered_filters,function(c,d){if(d.values.length>0){var e='<div class="bapf_sfa_taxonomy"><span>'+d.name+"</span>";e+="<ul>";var f="";a.each(d.values,function(a,b){f+=berocket_apply_filters("default_selected_filters_area_single",'<li><a href="#unselect_'+b.value+'" class="braapf_unselect" data-taxonomy="'+d.taxonomy+'" data-value="'+b.value+'"><i class="fa fa-times"></i>'+b.html+"</a></li>",b)}),e+=f,e+="</ul></div>",b+=berocket_apply_filters("default_selected_filters_area_single_taxonomy",e,d,f)}}),b?(a(".bapf_sfa_mt_hide").show().parent().removeClass("bapf_mt_none"),b=berocket_apply_filters("default_selected_filters_area_full_exist",'<div class="berocket_aapf_widget_selected_filter">'+b+'<ul class="bapf_sfa_unall"><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+"</a></li></ul>",b,braapf_filtered_filters)):(b=berocket_apply_filters("default_selected_filters_area_full_notexist",the_ajax_script.translate.nothing_selected,b,braapf_filtered_filters),a(".bapf_sfa_mt_hide").hide().parent().addClass("bapf_mt_none")),a(".berocket_aapf_widget_selected_area").html(b)}},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect",function(b){b.preventDefault(),a(".bapf_sfilter[data-taxonomy="+a(this).data("taxonomy")+"]").trigger("braapf_unselect",a(this).data()),berocket_do_action("update_products","reset_single",a(this))}),braapf_unselect_all=function(){braapf_grab_all(),"undefined"!=typeof braapf_selected_filters&&braapf_selected_filters.length>0&&a.each(braapf_selected_filters,function(b,c){c.values.length>0&&a(".bapf_sfilter[data-taxonomy="+c.taxonomy+"]").trigger("braapf_unselect_all",c)})},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect_all",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),berocket_add_filter("braapf_init",braapf_grab_all_init,1e3),berocket_add_filter("braapf_init",braapf_selected_filters_area_set_init,1100),berocket_add_filter("braapf_init_filtered_set",braapf_selected_filters_area_set_init,1100),braapf_reload_page_for_products_error=function(a,b){return b==the_ajax_script.products_holder_id&&braapf_update_page_on_error(),a},berocket_add_filter("ajax_load_from_url_beforeSend",c),berocket_add_filter("update_products",braapf_update_products),berocket_add_filter("error_notsame_block_qty",braapf_reload_page_for_products_error),bapf_universal_theme_compatibility=function(b){if(berocket_apply_filters("universal_theme_compatibility",!0)){a(window).trigger("resize");try{berocket_apply_filters("uncode_theme_compatibility","object"==typeof UNCODE&&"function"==typeof UNCODE.init)&&UNCODE.init()}catch(a){berocket_throw_error("uncode_theme_compatibility",a)}try{berocket_apply_filters("flatsome_theme_compatibility","object"==typeof Flatsome&&"function"==typeof Flatsome.attach&&jQuery(the_ajax_script.products_holder_id).length)&&Flatsome.attach(jQuery(the_ajax_script.products_holder_id))}catch(a){berocket_throw_error("flatsome_theme_compatibility",a)}try{berocket_apply_filters("woodmart_theme_compatibility","object"==typeof woodmartThemeModule&&"function"==typeof woodmartThemeModule.init)&&(woodmartThemeModule.wooInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.productsLoadMore())}catch(a){berocket_throw_error("woodmart_theme_compatibility",a)}try{berocket_apply_filters("divi_theme_compatibility","function"==typeof et_reinit_waypoint_modules)&&et_reinit_waypoint_modules()}catch(a){berocket_throw_error("divi_theme_compatibility",a)}try{berocket_apply_filters("rey_theme_compatibility","object"==typeof jQuery.reyTheme&&"function"==typeof jQuery.reyTheme.init)&&jQuery.reyTheme.init()}catch(a){berocket_throw_error("rey_theme_compatibility",a)}try{berocket_apply_filters("layzyloadimage_script_compatibility","function"==typeof layzyLoadImage)&&layzyLoadImage()}catch(a){berocket_throw_error("layzyloadimage_script_compatibility",a)}try{berocket_apply_filters("jetpacklazyimages_script_compatibility","function"==typeof jetpackLazyImagesModule)&&jetpackLazyImagesModule()}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{jQuery("img.jetpack-lazy-image").each(function(){jQuery(this).removeClass("jetpack-lazy-image").attr("src",jQuery(this).data("lazy-src")),jQuery(this).removeClass("jetpack-lazy-image").attr("srcset","")})}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{berocket_apply_filters("swift_script_compatibility","object"==typeof SWIFT&&"object"==typeof SWIFT.woocommerce&&"function"==typeof SWIFT.woocommerce.init)&&SWIFT.woocommerce.init()}catch(a){berocket_throw_error("swift_script_compatibility",a)}try{"undefined"!=typeof baapfGet_wprocketInstance&&baapfGet_wprocketInstance.update()}catch(a){berocket_throw_error("wprocket_script_compatibility",a)}try{jQuery(document).trigger("facetwp-loaded")}catch(a){berocket_throw_error("facetwp_script_compatibility",a)}try{berocket_apply_filters("etTheme_compatibility","object"==typeof etTheme&&"function"==typeof etTheme.global_image_lazy)&&etTheme.global_image_lazy()}catch(a){berocket_throw_error("etTheme_compatibility",a)}}return b},berocket_add_filter("ajax_load_from_url_always_after",bapf_universal_theme_compatibility,2500),a(document).ready(function(){berocket_apply_filters("remove_shortcode_fix_filters",a(".berocket_wc_shortcode_fix").length)&&(braapf_replace_each_filter(a(".berocket_wc_shortcode_fix").html()),a(".berocket_wc_shortcode_fix").html("")),braapf_init_load(),braapf_filtered_filters_set(),a(document).trigger("berocket_filters_document_ready")}),braapf_disable_ajax_loading=function(a){return!0},the_ajax_script.disable_ajax_loading&&berocket_add_filter("page_has_products_holder",braapf_disable_ajax_loading),braapf_close_tippy=function(){try{a(".tippy-box").length&&a(".tippy-box").each(function(){"undefined"!=typeof a(this).parent()[0]._tippy&&a(this).parent()[0]._tippy.hide()})}catch(a){}},berocket_add_filter("update_products",braapf_close_tippy)}(jQuery);var braapf_get_current_filters,braapf_filters_url_decode,braapf_scroll_shop_to_top,braapf_set_filters_to_link,braapf_convert_ckbox_to_radio,braapf_hierarhical_save,braapf_hierarhical_set,braapf_collapse_status_save,braapf_collapse_status_set,braapf_show_hide_values_save,braapf_show_hide_values_set,berocket_custom_sidebar_close,berocket_custom_sidebar_open;!function(a){function b(){jQuery(".berocket_product_table_compat .dataTables_length select").length&&jQuery(".berocket_product_table_compat .wc-product-table").dataTable()._fnSaveState();var a=jQuery(".berocket_product_table_compat .wc-product-table").attr("id");if("undefined"!=typeof window["config_"+a]&&window["config_"+a].serverSide){jQuery(".berocket_product_table_compat .wc-product-table").DataTable().destroy();var b=jQuery(".berocket_product_table_compat").html();jQuery(".berocket_product_table_compat").html(""),jQuery(".berocket_product_table_compat").html(b),jQuery(".berocket_product_table_compat .blockUI.blockOverlay").remove(),jQuery(".berocket_product_table_compat .wc-product-table").productTable()}}braapf_get_current_filters=function(b){if(b.queryargs.length){var c=[];a.each(b.queryargs,function(a,d){d.name==the_ajax_script.url_variable||decodeURI(d.name)==the_ajax_script.url_variable?b.filter=d.value:c.push(d)}),b.queryargs=c}return b},braapf_set_filters_to_link=function(a,b,c,d,e){return"string"==typeof b.filter&&b.filter.length&&(a+=e.length?"&":"?",a+=the_ajax_script.url_variable+"="+b.filter),a},braapf_convert_ckbox_to_radio=function(b,c,d,e){var f=(a(b),a(b).closest(".bapf_sfilter.bapf_ckbox"));f.is(".bapf_asradio")&&f.find("input[type=checkbox]:checked:not(:disabled)").each(function(){var b=a(this).val();b!=d&&braapf_checkbox_same(c,b,!1)})},berocket_add_filter("input_ckbox_changed",braapf_convert_ckbox_to_radio),a(document).on("click",".bapf_ochild, .bapf_cchild",function(b){b.preventDefault(),b.stopPropagation(),a(this).is(".bapf_ochild")?a(this).trigger("bapf_ochild"):a(this).trigger("bapf_cchild")}),a(document).on("bapf_ochild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_open_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().removeClass("bapf_ochild").removeClass("fa-plus").addClass("bapf_cchild").addClass("fa-minus"),a(this).find("ul").first().show())}),a(document).on("bapf_cchild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_close_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().addClass("bapf_ochild").addClass("fa-plus").removeClass("bapf_cchild").removeClass("fa-minus"),a(this).find("ul").first().hide())});var c=[];braapf_hierarhical_save=function(b){return c=[],a(".bapf_cchild").each(function(){c.push(a(this).parent().children("input[type=checkbox]").attr("id"))}),b},braapf_hierarhical_set=function(b){return a.each(c,function(b,c){a("#"+c).trigger("bapf_ochild")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_hierarhical_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_hierarhical_set,1e3),a(document).on("click",".bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl",function(b){b.preventDefault,a(this).closest(".bapf_ocolaps, .bapf_ccolaps").is(".bapf_ocolaps")?a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ocolaps"):a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ccolaps")}),a(document).on("bapf_ocolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).removeClass("bapf_ocolaps").addClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_open_apply",!0,a(this))&&(a(this).find(".bapf_body").first().show(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").removeClass("fa-chevron-down").addClass("fa-chevron-up"))}),a(document).on("bapf_ccolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).addClass("bapf_ocolaps").removeClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_close_apply",!0,a(this))&&(a(this).find(".bapf_body").first().hide(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").addClass("fa-chevron-down").removeClass("fa-chevron-up"))});var d={open:[],close:[]};braapf_collapse_status_save=function(b){return d={open:[],close:[]},a(".bapf_ocolaps, .bapf_ccolaps").each(function(){a(this).is(".bapf_ocolaps")?d.open.push(a(this).attr("id")):d.close.push(a(this).attr("id"))}),b},braapf_collapse_status_set=function(b){return a.each(d.open,function(b,c){a("#"+c).trigger("bapf_ccolaps")}),a.each(d.close,function(b,c){a("#"+c).trigger("bapf_ocolaps")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_collapse_status_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_collapse_status_set,1e3),a(document).on("click",".bapf_show_hide",function(){a(this).closest(".bapf_sfilter").toggleClass("bapf_fhide"),a(this).closest(".bapf_sfilter").is(".bapf_fhide")?a(this).text(a(this).data("show")):a(this).text(a(this).data("hide"))});var e={open:[],close:[]};braapf_show_hide_values_save=function(b){return e={open:[],close:[]},a(".bapf_sfilter").each(function(){a(this).is(".bapf_fhide")?e.close.push(a(this).attr("id")):e.open.push(a(this).attr("id"))}),b},braapf_show_hide_values_set=function(b){return a.each(e.open,function(b,c){a("#"+c).removeClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("hide"))}),a.each(e.close,function(b,c){a("#"+c).addClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("show"))}),b},berocket_add_filter("ajax_load_from_url_done",braapf_show_hide_values_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_show_hide_values_set,1e3),braapf_scroll_shop_to_top=function(b,c,d,e,f){var g=berocket_apply_filters("filter_mobile_width",767);if(berocket_apply_filters("scroll_shop_to_top","default"==f&&(1==the_ajax_script.scroll_shop_top||2==the_ajax_script.scroll_shop_top&&a(window).width()<g||3==the_ajax_script.scroll_shop_top&&a(window).width()>=g))){var h=0;a(the_ajax_script.products_holder_id).length?(h=a(the_ajax_script.products_holder_id).offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)):a(".bapf_no_products").length&&(h=a(".bapf_no_products").offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)),a("html, body").animate({scrollTop:h},"slow")}return b},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_scroll_shop_to_top),a(document).on("mousedown",".wc-product-table-reset a",function(){a(this).remove(),br_reset_all_filters()}),a(document).on("click",".berocket_element_above_products_is_hide_toggle",function(b){b.preventDefault(),a(this).toggleClass("active").next().slideToggle(200,"linear");var c="inactive";a(this).is(".active")&&(c="active"),a(document).trigger("berocket_element_above_products_"+c)}),berocket_custom_sidebar_close=function(){a(".berocket_ajax_filters_sidebar_toggle").removeClass("active"),a("#berocket-ajax-filters-sidebar").removeClass("active"),a("body").removeClass("berocket_ajax_filters_sidebar_active")},berocket_custom_sidebar_open=function(){a(".berocket_ajax_filters_sidebar_toggle").addClass("active"),a("#berocket-ajax-filters-sidebar").addClass("active"),
2
- a("body").addClass("berocket_ajax_filters_sidebar_active")},a(document).on("berocket_custom_sidebar_close",berocket_custom_sidebar_close),a(document).on("berocket_custom_sidebar_open",berocket_custom_sidebar_open),a(document).on("click",".berocket_ajax_filters_sidebar_toggle",function(b){b.preventDefault(),a(this).is(".active")&&a("#berocket-ajax-filters-sidebar").is(".active")?berocket_custom_sidebar_close():berocket_custom_sidebar_open()}),a(document).on("click","#berocket-ajax-filters-sidebar-shadow, #berocket-ajax-filters-sidebar-close",function(a){a.preventDefault(),berocket_custom_sidebar_close()}),a(document).on("berocket_ajax_filtering_start",function(){jQuery(".berocket_product_table_compat").length&&b()}),braapf_filters_url_decode=function(a){return the_ajax_script.seo_uri_decode&&(a=encodeURIComponent(a),the_ajax_script.nice_urls&&(a=a.replace(/%2F/g,"/"))),a},jQuery(document).on("elementor/popup/show",function(){braapf_init()})}(jQuery),berocket_add_filter("get_current_url_data",braapf_get_current_filters),berocket_add_filter("compat_filters_to_string",braapf_filters_url_decode,900),berocket_add_filter("url_from_urldata_linkget",braapf_set_filters_to_link);var braapf_child_parent_grab_single,braapf_child_parent_fix_selected,braapf_child_parent_load_with_update_button,braapf_add_loader_element,braapf_remove_loader_element,braapf_elementor_sticky_fix,baapfGet_wprocketInstance;!function(a){braapf_child_parent_grab_single=function(b,c,d){var e=c.data("child");if("undefined"!=typeof e&&e>0&&"object"==typeof b&&"undefined"!=typeof b.values&&Array.isArray(b.values)&&b.values.length>0){e++;var f=c.data("taxonomy"),g=a(".bapf_sfilter.bapf_child_"+e+"[data-taxonomy="+f+"]");if(g.length){var h=braapf_grab_single(g,[],!0);"object"==typeof h&&"undefined"!=typeof h.values&&Array.isArray(h.values)&&h.values.length>0&&(b=h)}}return b},braapf_child_parent_fix_selected=function(b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child"),f=d.data("taxonomy");if("undefined"!=typeof e&&e>0)for(i=e+1;a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").length;i++)a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").trigger("braapf_unselect",!1)}}return b},braapf_child_parent_load_with_update_button=function(a,b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child");d.data("taxonomy");"undefined"!=typeof e&&e>0&&(a=!0)}}return a},berocket_add_filter("grab_single_filter_default",braapf_child_parent_grab_single,9e6),berocket_add_filter("before_update_products_context",braapf_child_parent_fix_selected),berocket_add_filter("apply_filters_to_page_partial",braapf_child_parent_load_with_update_button);var b;braapf_add_loader_element=function(c,d,e,f,g){return"default"==g&&("undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),b=a(the_ajax_script.load_image),a("body").append(b)),c},braapf_remove_loader_element=function(a){return"undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),a},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_add_loader_element),berocket_add_filter("ajax_load_from_url_always_after",braapf_remove_loader_element),a(document).on("click",".bapf_sfilter.bapf_ckbox .bapf_body li label a",function(b){b.preventDefault(),a(this).parent().trigger("click")}),jQuery(".elementor-widget").length&&jQuery(window).on("scroll",function(){jQuery(".elementor-sticky__spacer .bapf_sfilter").remove()});try{window.addEventListener("LazyLoad::Initialized",function(a){baapfGet_wprocketInstance=a.detail.instance})}catch(a){berocket_throw_error("wprocketInstance_get",a)}}(jQuery);var braapf_init_ion_slidr,braapf_ion_slidr_same,braapf_jqrui_slidr_ion_value_wc_price,braapf_jqrui_slidr_ion_value_arr_attr,braapf_init_ion_slidr_for_parent,braapf_grab_single_ion,braapf_jqrui_slidr_ion_values_link_arr_attr;!function(a){braapf_init_ion_slidr=function(){braapf_init_ion_slidr_for_parent(a(document))},braapf_init_ion_slidr_for_parent=function(b){b.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_all .bapf_slidr_main"),c=function(a){if(!b.is(".bapf_ion_blocked")){b.addClass("bapf_ion_blocked");var c=b.closest(".bapf_sfilter").data("taxonomy");braapf_ion_slidr_same(c,a);var d={element:"#"+b.closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",d,b),berocket_do_action("update_products","filter",b),b.removeClass("bapf_ion_blocked")}},d=berocket_apply_filters("jqrui_data_slidr_ion",{type:"double",from:b.data("start"),to:b.data("end"),grid:!1,force_edges:!0,onFinish:c,onUpdate:c,prettify:function(a){return a=berocket_apply_filters("jqrui_slidr_ion_"+b.data("display"),a,b)}},b);b.ionRangeSlider(d),a(this).addClass("bapf_slidr_ready")})},braapf_ion_slidr_same=function(b,c){a(".bapf_slidr_ion.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_ion_blocked");var d=b.data("ionRangeSlider");d.update({from:c.from,to:c.to}),b.removeClass("bapf_ion_blocked")})},braapf_jqrui_slidr_ion_value_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a=berocket_format_number(parseFloat(a),c)},braapf_jqrui_slidr_ion_value_arr_attr=function(a,b){var c=b.data("attr");return a=c[a].n},braapf_grab_single_ion=function(a,b){if(b.is(".bapf_slidr_ion.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main").data("ionRangeSlider"),d=b.find(".bapf_slidr_main"),e=[c.options.from,c.options.to],f=[berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.from,d),berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.to,d)],g=d.data("prefix");"undefined"==typeof g&&(g="");var h=d.data("postfix");if("undefined"==typeof h&&(h=""),f[0]=g+f[0]+h,f[1]=g+f[1]+h,e[0]!=d.data("min")||e[1]!=d.data("max")){var i={value:e[0]+"_"+e[1],html:f[0]+" - "+f[1]};i=berocket_apply_filters("jqrui_slidr_ion_link_"+d.data("display"),i,e,f,d,a),a.values=[i]}}return a},braapf_jqrui_slidr_ion_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_ion",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("ionRangeSlider");d.addClass("bapf_ion_blocked"),e.update({from:e.options.min,to:e.options.max}),d.removeClass("bapf_ion_blocked")}),berocket_add_filter("braapf_init",braapf_init_ion_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_ion_slidr_for_parent),berocket_add_filter("grab_single_filter_default",braapf_grab_single_ion),berocket_add_filter("jqrui_slidr_ion_link_arr_attr",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_wc_price",braapf_jqrui_slidr_ion_value_wc_price),berocket_add_filter("jqrui_slidr_ion_arr_attr",braapf_jqrui_slidr_ion_value_arr_attr)}(jQuery);var braapf_grab_single_select;!function(a){a(document).on("change",".bapf_slct .bapf_body select",function(){var b={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",b,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_grab_single_select=function(b,c){if(c.is(".bapf_slct")&&0!=b){var d=a('.bapf_slct[data-taxonomy="'+b.taxonomy+'"] .bapf_body select:not(:disabled)'),e=[];d.find("option:selected:not(:disabled)").each(function(){var c=a(this).val();c&&e.indexOf(c)===-1&&(e.push(c),b.values.push({value:c,html:a(this).data("name")}))})}return b},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slct",function(b,c){a(this).find(".bapf_body select:not(:disabled) option:selected:not(:disabled)").each(function(){"undefined"!=typeof c&&"undefined"!=typeof c.value&&c.value!=a(this).val()||a(this).prop("selected",!1)})}),berocket_add_filter("grab_single_filter_default",braapf_grab_single_select)}(jQuery);var bapf_select2_init,bapf_select2_init_for_parent,bapf_select2_disable_for_parent;jQuery(document).ready(function(){bapf_select2_init=function(){bapf_select2_init_for_parent(jQuery(document))},bapf_select2_init_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){if(!jQuery(this).data("select2")&&!jQuery(this).is(".select2-hidden-accessible")){var a={width:"100%",theme:"default"};jQuery(this).prop("multiple")&&(a.placeholder=jQuery(this).data("placeholder")),jQuery(this).parents("#berocket-ajax-filters-sidebar").length&&(0==jQuery("#bapf-select2-high-zindex").length&&jQuery("body").append('<div id="bapf-select2-high-zindex"></div>'),a.dropdownParent=jQuery("#bapf-select2-high-zindex")),a=berocket_apply_filters("jqrui_data_select2",a,jQuery(this)),jQuery(this).select2(a)}})},bapf_select2_disable_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){jQuery(this).data("select2")&&jQuery(this).select2("destroy")})},jQuery(document).on("berocket_ajax_filtering_on_update",function(){bapf_select2_disable_for_parent(jQuery(document))}),bapf_select2_init(),berocket_add_filter("braapf_init",bapf_select2_init,2e3),berocket_add_filter("braapf_init_for_parent",bapf_select2_init_for_parent)});var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price,braapf_init_jqrui_slidr_for_parent,braapf_grab_single_jqrui,braapf_jqrui_slidr_values_arr_attr,braapf_jqrui_slidr_values_link_arr_attr;!function(a){function b(b,c){var d=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main"),e=d.slider("values");a(b).val(e[c]),a(b).data("val",e[c])}function c(b,c,d){var e=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main");if("focusout"==d){if(a(b).val()==a(b).data("val")){var f=e.slider("values");e.trigger("braapf_change_jqrui_slidr",[f])}}else{var g=parseInt(a(b).val());e.slider("values",c,g)}}a.each([{position:0,className:"bapf_from"},{position:1,className:"bapf_to"}],function(d,e){a(document).on("focusin",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(){b(this,e.position)}),a(document).on("change focusout",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(a){c(this,e.position,a.type)}),a(document).on("change",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" select",function(a){c(this,e.position,a.type)})}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").text(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").text(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").val(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").val(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=d.data("attr");if(d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length||d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length){var e=d.data("attr"),f=[],g=[],h=!1,i=!1;a.each(e,function(a,b){a==c[0]&&(i=!0),h||f.push({v:b.v,n:b.n,ov:a}),i&&g.push({v:b.v,n:b.n,ov:a}),a==c[1]&&(h=!0)})}d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_from select option").remove(),a.each(f,function(b,e){var f="";e.ov==c[0]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_from select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))})),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_to select option").remove(),a.each(g,function(b,e){var f="";e.ov==c[1]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))}))}),braapf_init_jqrui_slidr=function(){braapf_init_jqrui_slidr_for_parent(a(document))},braapf_init_jqrui_slidr_for_parent=function(b){b.find(".bapf_slidr_jqrui:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_main"),c=berocket_apply_filters("jqrui_data_slidr_jqrui",{range:!0,min:b.data("min"),max:b.data("max"),values:[b.data("start"),b.data("end")],step:b.data("step"),create:function(b,c){var d=a(this).slider("values");a(this).trigger("braapf_change_jqrui_slidr",[d])},slide:function(b,c){a(this).trigger("braapf_change_jqrui_slidr",[c.values])},change:function(b,c){var d=a(this).slider("values");if(a(this).trigger("braapf_change_jqrui_slidr",[d]),!a(this).is(".bapf_jqrui_blocked")){var d=a(this).slider("values"),e=a(this).parents(".bapf_sfilter").data("taxonomy");braapf_jqrui_slidr_same(e,d);var f={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",f,a(this)),berocket_do_action("update_products","filter",a(this))}}},b);b.slider(c),a(this).addClass("bapf_slidr_ready")})},braapf_jqrui_slidr_same=function(b,c){a(".bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_jqrui_blocked"),b.slider("values",c),b.removeClass("bapf_jqrui_blocked")})},braapf_jqrui_slidr_values_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a[0]=berocket_format_number(a[0],c),a[1]=berocket_format_number(a[1],c),a},braapf_grab_single_jqrui=function(a,b){if(b.is(".bapf_slidr_jqrui.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main"),d=c.slider("values"),e=c.slider("values"),f="";b.find(".bapf_tbprice").length&&(f=b.find(".bapf_tbprice").first().text());var g="";if(b.find(".bapf_taprice").length&&(g=b.find(".bapf_taprice").first().text()),d[0]!=c.data("min")||d[1]!=c.data("max")){e=berocket_apply_filters("jqrui_slidr_"+c.data("display"),e,c),e[0]=f+e[0]+g,e[1]=f+e[1]+g;var h={value:d[0]+"_"+d[1],html:e[0]+" - "+e[1]};h=berocket_apply_filters("jqrui_slidr_link_"+c.data("display"),h,d,e,c,a),a.values=[h]}}return a},braapf_jqrui_slidr_values_arr_attr=function(a,b){var c=b.data("attr");return Array.isArray(a)&&2==a.length?(a[0]=c[a[0]].n,a[1]=c[a[1]].n):(a=["",""],a[0]=c[0].n,a[1]=c[c.length-1].n),a},braapf_jqrui_slidr_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_jqrui",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("min"),f=d.data("max");d.addClass("bapf_jqrui_blocked"),d.slider("values",[e,f]),d.removeClass("bapf_jqrui_blocked")}),berocket_add_filter("jqrui_slidr_wc_price",braapf_jqrui_slidr_values_wc_price),berocket_add_filter("jqrui_slidr_arr_attr",braapf_jqrui_slidr_values_arr_attr),berocket_add_filter("jqrui_slidr_link_arr_attr",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("grab_single_filter_default",braapf_grab_single_jqrui),berocket_add_filter("braapf_init",braapf_init_jqrui_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_jqrui_slidr_for_parent)}(jQuery),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(b,d){var e,f,g,h=b.nodeName.toLowerCase();return"area"===h?(e=b.parentNode,f=e.name,!(!b.href||!f||"map"!==e.nodeName.toLowerCase())&&(g=a("img[usemap='#"+f+"']")[0],!!g&&c(g))):(/^(input|select|textarea|button|object)$/.test(h)?!b.disabled:"a"===h?b.href||d:d)&&c(b)}function c(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}function d(a){return function(){var b=this.element.val();a.apply(this,arguments),this._refresh(),b!==this.element.val()&&this._trigger("change")}}a.ui=a.ui||{},a.extend(a.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({scrollParent:function(b){var c=this.css("position"),d="absolute"===c,e=b?/(auto|scroll|hidden)/:/(auto|scroll)/,f=this.parents().filter(function(){var b=a(this);return(!d||"static"!==b.css("position"))&&e.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&f.length?f:a(this[0].ownerDocument||document)},uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(c){return b(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var d=a.attr(c,"tabindex"),e=isNaN(d);return(e||d>=0)&&b(c,!e)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(b,c){function d(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===c?["Left","Right"]:["Top","Bottom"],f=c.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){return void 0===b?g["inner"+c].call(this):this.each(function(){a(this).css(f,d(this,b)+"px")})},a.fn["outer"+c]=function(b,e){return"number"!=typeof b?g["outer"+c].call(this,b):this.each(function(){a(this).css(f,d(this,b,!0,e)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(void 0!==b)return this.css("zIndex",b);if(this.length)for(var c,d,e=a(this[0]);e.length&&e[0]!==document;){if(c=e.css("position"),("absolute"===c||"relative"===c||"fixed"===c)&&(d=parseInt(e.css("zIndex"),10),!isNaN(d)&&0!==d))return d;e=e.parent()}return 0}}),a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c,d){var e,f=a.plugins[b];if(f&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;f.length>e;e++)a.options[f[e][0]]&&f[e][1].apply(a.element,c)}};var e=0,f=Array.prototype.slice;a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(a){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];return b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g),g},a.widget.extend=function(b){for(var c,d,e=f.call(arguments,1),g=0,h=e.length;h>g;g++)for(c in e[g])d=e[g][c],e[g].hasOwnProperty(c)&&void 0!==d&&(b[c]=a.isPlainObject(d)?a.isPlainObject(b[c])?a.widget.extend({},b[c],d):a.widget.extend({},d):d);return b},a.widget.bridge=function(b,c){var d=c.prototype.widgetFullName||b;a.fn[b]=function(e){var g="string"==typeof e,h=f.call(arguments,1),i=this;return g?this.each(function(){var c,f=a.data(this,d);return"instance"===e?(i=f,!1):f?a.isFunction(f[e])&&"_"!==e.charAt(0)?(c=f[e].apply(f,h),c!==f&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+e+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+e+"'")}):(h.length&&(e=a.widget.extend.apply(null,[e].concat(h))),this.each(function(){var b=a.data(this,d);b?(b.option(e||{}),b._init&&b._init()):a.data(this,d,new c(e,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(b,c){c=a(c||this.defaultElement||this)[0],this.element=a(c),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),c!==this&&(a.data(c,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===c&&this.destroy()}}),this.document=a(c.style?c.ownerDocument:c.document||c),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;d.length-1>f;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){return b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled")?("string"==typeof g?f[g]:g).apply(f,arguments):void 0}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.unbind(c).undelegate(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.widget;var g=!1;a(document).mouseup(function(){g=!1}),a.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){return!0===a.data(c.target,b.widgetName+".preventClickEvent")?(a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(!g){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var c=this,d=1===b.which,e=!("string"!=typeof this.options.cancel||!b.target.nodeName)&&a(b.target).closest(this.options.cancel).length;return!(d&&!e&&this._mouseCapture(b))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(b)!==!1,!this._mouseStarted)?(b.preventDefault(),!0):(!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return c._mouseMove(a)},this._mouseUpDelegate=function(a){return c._mouseUp(a)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),g=!0,!0))}},_mouseMove:function(b){if(this._mouseMoved){if(a.ui.ie&&(!document.documentMode||9>document.documentMode)&&!b.button)return this._mouseUp(b);if(!b.which)return this._mouseUp(b)}return(b.which||b.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(b){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target===this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),g=!1,!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function b(a,b,c){return[parseFloat(a[0])*(n.test(a[0])?b/100:1),parseFloat(a[1])*(n.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}a.ui=a.ui||{};var e,f,g=Math.max,h=Math.abs,i=Math.round,j=/left|center|right/,k=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,m=/^\w+/,n=/%$/,o=a.fn.position;a.position={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType;return{element:c,isWindow:d,isDocument:e,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:d||e?c.width():c.outerWidth(),height:d||e?c.height():c.outerHeight()}}},a.fn.position=function(e){if(!e||!e.of)return o.apply(this,arguments);e=a.extend({},e);var n,p,q,r,s,t,u=a(e.of),v=a.position.getWithinInfo(e.within),w=a.position.getScrollInfo(v),x=(e.collision||"flip").split(" "),y={};return t=d(u),u[0].preventDefault&&(e.at="left top"),p=t.width,q=t.height,r=t.offset,s=a.extend({},r),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=j.test(c[0])?c.concat(["center"]):k.test(c[0])?["center"].concat(c):["center","center"]),c[0]=j.test(c[0])?c[0]:"center",c[1]=k.test(c[1])?c[1]:"center",a=l.exec(c[0]),b=l.exec(c[1]),y[this]=[a?a[0]:0,b?b[0]:0],e[this]=[m.exec(c[0])[0],m.exec(c[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?s.left+=p:"center"===e.at[0]&&(s.left+=p/2),"bottom"===e.at[1]?s.top+=q:"center"===e.at[1]&&(s.top+=q/2),n=b(y.at,p,q),s.left+=n[0],s.top+=n[1],this.each(function(){var d,j,k=a(this),l=k.outerWidth(),m=k.outerHeight(),o=c(this,"marginLeft"),t=c(this,"marginTop"),z=l+o+c(this,"marginRight")+w.width,A=m+t+c(this,"marginBottom")+w.height,B=a.extend({},s),C=b(y.my,k.outerWidth(),k.outerHeight());"right"===e.my[0]?B.left-=l:"center"===e.my[0]&&(B.left-=l/2),"bottom"===e.my[1]?B.top-=m:"center"===e.my[1]&&(B.top-=m/2),B.left+=C[0],B.top+=C[1],f||(B.left=i(B.left),B.top=i(B.top)),d={marginLeft:o,marginTop:t},a.each(["left","top"],function(b,c){a.ui.position[x[b]]&&a.ui.position[x[b]][c](B,{
3
- targetWidth:p,targetHeight:q,elemWidth:l,elemHeight:m,collisionPosition:d,collisionWidth:z,collisionHeight:A,offset:[n[0]+C[0],n[1]+C[1]],my:e.my,at:e.at,within:v,elem:k})}),e.using&&(j=function(a){var b=r.left-B.left,c=b+p-l,d=r.top-B.top,f=d+q-m,i={target:{element:u,left:r.left,top:r.top,width:p,height:q},element:{element:k,left:B.left,top:B.top,width:l,height:m},horizontal:0>c?"left":b>0?"right":"center",vertical:0>f?"top":d>0?"bottom":"middle"};l>p&&p>h(b+c)&&(i.horizontal="center"),m>q&&q>h(d+f)&&(i.vertical="middle"),i.important=g(h(b),h(c))>g(h(d),h(f))?"horizontal":"vertical",e.using.call(this,a,i)}),k.offset(a.extend(B,{using:j}))})},a.ui.position={fit:{left:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollLeft:d.offset.left,f=d.width,h=a.left-b.collisionPosition.marginLeft,i=e-h,j=h+b.collisionWidth-f-e;b.collisionWidth>f?i>0&&0>=j?(c=a.left+i+b.collisionWidth-f-e,a.left+=i-c):a.left=j>0&&0>=i?e:i>j?e+f-b.collisionWidth:e:i>0?a.left+=i:j>0?a.left-=j:a.left=g(a.left-h,a.left)},top:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollTop:d.offset.top,f=b.within.height,h=a.top-b.collisionPosition.marginTop,i=e-h,j=h+b.collisionHeight-f-e;b.collisionHeight>f?i>0&&0>=j?(c=a.top+i+b.collisionHeight-f-e,a.top+=i-c):a.top=j>0&&0>=i?e:i>j?e+f-b.collisionHeight:e:i>0?a.top+=i:j>0?a.top-=j:a.top=g(a.top-h,a.top)}},flip:{left:function(a,b){var c,d,e=b.within,f=e.offset.left+e.scrollLeft,g=e.width,i=e.isWindow?e.scrollLeft:e.offset.left,j=a.left-b.collisionPosition.marginLeft,k=j-i,l=j+b.collisionWidth-g-i,m="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,n="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,o=-2*b.offset[0];0>k?(c=a.left+m+n+o+b.collisionWidth-g-f,(0>c||h(k)>c)&&(a.left+=m+n+o)):l>0&&(d=a.left-b.collisionPosition.marginLeft+m+n+o-i,(d>0||l>h(d))&&(a.left+=m+n+o))},top:function(a,b){var c,d,e=b.within,f=e.offset.top+e.scrollTop,g=e.height,i=e.isWindow?e.scrollTop:e.offset.top,j=a.top-b.collisionPosition.marginTop,k=j-i,l=j+b.collisionHeight-g-i,m="top"===b.my[1],n=m?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,o="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,p=-2*b.offset[1];0>k?(d=a.top+n+o+p+b.collisionHeight-g-f,(0>d||h(k)>d)&&(a.top+=n+o+p)):l>0&&(c=a.top-b.collisionPosition.marginTop+n+o+p-i,(c>0||l>h(c))&&(a.top+=n+o+p))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,g,h=document.getElementsByTagName("body")[0],i=document.createElement("div");b=document.createElement(h?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},h&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(g in d)b.style[g]=d[g];b.appendChild(i),c=h||document.documentElement,c.insertBefore(b,c.firstChild),i.style.cssText="position: absolute; left: 10.7432222px;",e=a(i).offset().left,f=e>10&&11>e,b.innerHTML="",c.removeChild(b)}()}(),a.ui.position,a.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var b=this.options;this.prevShow=this.prevHide=a(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),b.collapsible||b.active!==!1&&null!=b.active||(b.active=0),this._processPanels(),0>b.active&&(b.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():a()}},_createIcons:function(){var b=this.options.icons;b&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),a=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){return"active"===a?void this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a,b),"collapsible"!==a||b||this.options.active!==!1||this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),void("disabled"===a&&(this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b))))},_keydown:function(b){if(!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b);break;case c.HOME:f=this.headers[0];break;case c.END:f=this.headers[d-1]}f&&(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),b.preventDefault())}},_panelKeyDown:function(b){b.keyCode===a.ui.keyCode.UP&&b.ctrlKey&&a(b.currentTarget).prev().focus()},refresh:function(){var b=this.options;this._processPanels(),b.active===!1&&b.collapsible===!0||!this.headers.length?(b.active=!1,this.active=a()):b.active===!1?this._activate(0):this.active.length&&!a.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(b.active=!1,this.active=a()):this._activate(Math.max(0,b.active-1)):b.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var a=this.headers,b=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),b&&(this._off(a.not(this.headers)),this._off(b.not(this.panels)))},_refresh:function(){var b,c=this.options,d=c.heightStyle,e=this.element.parent();this.active=this._findActive(c.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var b=a(this),c=b.uniqueId().attr("id"),d=b.next(),e=d.uniqueId().attr("id");b.attr("aria-controls",e),d.attr("aria-labelledby",c)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(c.event),"fill"===d?(b=e.height(),this.element.siblings(":visible").each(function(){var c=a(this),d=c.css("position");"absolute"!==d&&"fixed"!==d&&(b-=c.outerHeight(!0))}),this.headers.each(function(){b-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===d&&(b=0,this.headers.next().each(function(){b=Math.max(b,a(this).css("height","").height())}).height(b))},_activate:function(b){var c=this._findActive(b)[0];c!==this.active[0]&&(c=c||this.active[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return"number"==typeof b?this.headers.eq(b):a()},_setupEvents:function(b){var c={keydown:"_keydown"};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,c),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e[0]===d[0],g=f&&c.collapsible,h=g?a():e.next(),i=d.next(),j={oldHeader:d,oldPanel:i,newHeader:g?a():e,newPanel:h};b.preventDefault(),f&&!c.collapsible||this._trigger("beforeActivate",b,j)===!1||(c.active=!g&&this.headers.index(e),this.active=f?a():e,this._toggle(j),d.removeClass("ui-accordion-header-active ui-state-active"),c.icons&&d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header),f||(e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),c.icons&&e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(b){var c=b.newPanel,d=this.prevShow.length?this.prevShow:b.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=c,this.prevHide=d,this.options.animate?this._animate(c,d,b):(d.hide(),c.show(),this._toggleComplete(b)),d.attr({"aria-hidden":"true"}),d.prev().attr({"aria-selected":"false","aria-expanded":"false"}),c.length&&d.length?d.prev().attr({tabIndex:-1,"aria-expanded":"false"}):c.length&&this.headers.filter(function(){return 0===parseInt(a(this).attr("tabIndex"),10)}).attr("tabIndex",-1),c.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(a,b,c){var d,e,f,g=this,h=0,i=a.css("box-sizing"),j=a.length&&(!b.length||a.index()<b.index()),k=this.options.animate||{},l=j&&k.down||k,m=function(){g._toggleComplete(c)};return"number"==typeof l&&(f=l),"string"==typeof l&&(e=l),e=e||l.easing||k.easing,f=f||l.duration||k.duration,b.length?a.length?(d=a.show().outerHeight(),b.animate(this.hideProps,{duration:f,easing:e,step:function(a,b){b.now=Math.round(a)}}),void a.hide().animate(this.showProps,{duration:f,easing:e,complete:m,step:function(a,c){c.now=Math.round(a),"height"!==c.prop?"content-box"===i&&(h+=c.now):"content"!==g.options.heightStyle&&(c.now=Math.round(d-b.outerHeight()-h),h=0)}})):b.animate(this.hideProps,f,e,m):a.animate(this.showProps,f,e,m)},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),b.length&&(b.parent()[0].className=b.parent()[0].className),this._trigger("activate",null,a)}}),a.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(a){a.preventDefault()},"click .ui-menu-item":function(b){var c=a(b.target);!this.mouseHandled&&c.not(".ui-state-disabled").length&&(this.select(b),b.isPropagationStopped()||(this.mouseHandled=!0),c.has(".ui-menu").length?this.expand(b):!this.element.is(":focus")&&a(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(b){if(!this.previousFilter){var c=a(b.currentTarget);c.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(b,c)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.find(this.options.items).eq(0);b||this.focus(a,c)},blur:function(b){this._delay(function(){a.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(b)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(a){this._closeOnDocumentClick(a)&&this.collapseAll(a),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var b=a(this);b.data("ui-menu-submenu-carat")&&b.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(b){var c,d,e,f,g=!0;switch(b.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(b);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(b);break;case a.ui.keyCode.HOME:this._move("first","first",b);break;case a.ui.keyCode.END:this._move("last","last",b);break;case a.ui.keyCode.UP:this.previous(b);break;case a.ui.keyCode.DOWN:this.next(b);break;case a.ui.keyCode.LEFT:this.collapse(b);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(b);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(b);break;case a.ui.keyCode.ESCAPE:this.collapse(b);break;default:g=!1,d=this.previousFilter||"",e=String.fromCharCode(b.keyCode),f=!1,clearTimeout(this.filterTimer),e===d?f=!0:e=d+e,c=this._filterMenuItems(e),c=f&&-1!==c.index(this.active.next())?this.active.nextAll(".ui-menu-item"):c,c.length||(e=String.fromCharCode(b.keyCode),c=this._filterMenuItems(e)),c.length?(this.focus(b,c),this.previousFilter=e,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}g&&b.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(a):this.select(a))},refresh:function(){var b,c,d=this,e=this.options.icons.submenu,f=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),f.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var b=a(this),c=b.parent(),d=a("<span>").addClass("ui-menu-icon ui-icon "+e).data("ui-menu-submenu-carat",!0);c.attr("aria-haspopup","true").prepend(d),b.attr("aria-labelledby",c.attr("id"))}),b=f.add(this.element),c=b.find(this.options.items),c.not(".ui-menu-item").each(function(){var b=a(this);d._isDivider(b)&&b.addClass("ui-widget-content ui-menu-divider")}),c.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),c.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,b){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(b.submenu),"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this._super(a,b)},focus:function(a,b){var c,d;this.blur(a,a&&"focus"===a.type),this._scrollIntoView(b),this.active=b.first(),d=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",d.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),c=b.children(".ui-menu"),c.length&&a&&/^mouse/.test(a.type)&&this._startOpening(c),this.activeMenu=b.parent(),this._trigger("focus",a,{item:b})},_scrollIntoView:function(b){var c,d,e,f,g,h;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,e=b.offset().top-this.activeMenu.offset().top-c-d,f=this.activeMenu.scrollTop(),g=this.activeMenu.height(),h=b.outerHeight(),0>e?this.activeMenu.scrollTop(f+e):e+h>g&&this.activeMenu.scrollTop(f+e-g+h))},blur:function(a,b){b||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer),"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(a)},this.delay))},_open:function(b){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden","true"),b.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(b,c){clearTimeout(this.timer),this.timer=this._delay(function(){var d=c?this.element:a(b&&b.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element),this._close(d),this.blur(b),this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element),a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(b){return!a(b.target).closest(".ui-menu").length},_isDivider:function(a){return!/[^\-\u2014\u2013\s]/.test(a.text())},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var d;this.active&&(d="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0)),d&&d.length&&this.active||(d=this.activeMenu.find(this.options.items)[b]()),this.focus(c,d)},nextPage:function(b){var c,d,e;return this.active?void(this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return c=a(this),0>c.offset().top-d-e}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(b)},previousPage:function(b){var c,d,e;return this.active?void(this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d+e>0}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items).first()))):void this.next(b)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(b){this.active=this.active||a(b.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(b,!0),this._trigger("select",b,c)},_filterMenuItems:function(b){var c=b.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),d=RegExp("^"+c,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return d.test(a.trim(a(this).text()))})}}),a.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var b,c,d,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e,g="input"===e;this.isMultiLine=!!f||!g&&this.element.prop("isContentEditable"),this.valueMethod=this.element[f||g?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))return b=!0,d=!0,void(c=!0);b=!1,d=!1,c=!1;var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:b=!0,this._move("previousPage",e);break;case f.PAGE_DOWN:b=!0,this._move("nextPage",e);break;case f.UP:b=!0,this._keyEvent("previous",e);break;case f.DOWN:b=!0,this._keyEvent("next",e);break;case f.ENTER:this.menu.active&&(b=!0,e.preventDefault(),this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:c=!0,this._searchTimeout(e)}},keypress:function(d){if(b)return b=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&d.preventDefault());if(!c){var e=a.ui.keyCode;switch(d.keyCode){case e.PAGE_UP:this._move("previousPage",d);break;case e.PAGE_DOWN:this._move("nextPage",d);break;case e.UP:this._keyEvent("previous",d);break;case e.DOWN:this._keyEvent("next",d)}}},input:function(a){return d?(d=!1,void a.preventDefault()):void this._searchTimeout(a)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),void this._change(a))}}),this._initSource(),this.menu=a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(b){b.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var c=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(d){d.target===b.element[0]||d.target===c||a.contains(c,d.target)||b.close()})})},menufocus:function(b,c){var d,e;return this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)})):(e=c.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",b,{item:e})&&b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(e.value),d=c.item.attr("aria-label")||e.value,void(d&&a.trim(d).length&&(this.liveRegion.children().hide(),a("<div>").text(d).appendTo(this.liveRegion))))},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d,this.selectedItem=c})),!1!==this._trigger("select",a,{item:c})&&this._value(c.value),this.term=this._value(),this.close(a),this.selectedItem=c}}),this.liveRegion=a("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(a,b){this._super(a,b),"source"===a&&this._initSource(),"appendTo"===a&&this.menu.element.appendTo(this._appendTo()),"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b&&b[0]||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_initSource:function(){var b,c,d=this;a.isArray(this.options.source)?(b=this.options.source,this.source=function(c,d){d(a.ui.autocomplete.filter(b,c.term))}):"string"==typeof this.options.source?(c=this.options.source,this.source=function(b,e){d.xhr&&d.xhr.abort(),d.xhr=a.ajax({url:c,data:b,dataType:"json",success:function(a){e(a)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching),this.searching=this._delay(function(){var b=this.term===this._value(),c=this.menu.element.is(":visible"),d=a.altKey||a.ctrlKey||a.metaKey||a.shiftKey;(!b||b&&!c&&!d)&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){return a=null!=a?a:this._value(),this.term=this._value(),a.length<this.options.minLength?this.close(b):this._trigger("search",b)!==!1?this._search(a):void 0},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:a},this._response())},_response:function(){var b=++this.requestIndex;return a.proxy(function(a){b===this.requestIndex&&this.__response(a),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(a){a&&(a=this._normalize(a)),this._trigger("response",null,{content:a}),!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0,this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return"string"==typeof b?{label:b,value:b}:a.extend({},b,{label:b.label||b.value,value:b.value||b.label})})},_suggest:function(b){var c=this.menu.element.empty();this._renderMenu(c,b),this.isNewMenu=!0,this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItemData(b,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(b,c){return a("<li>").text(c.label).appendTo(b)},_move:function(a,b){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[a](b):void this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(a,b),b.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(a>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(b){var c;this._superApply(arguments),this.options.disabled||this.cancelSearch||(c=b&&b.length?this.options.messages.results(b.length):this.options.messages.noResults,this.liveRegion.children().hide(),a("<div>").text(c).appendTo(this.liveRegion))}}),a.ui.autocomplete;var h,i="ui-button ui-widget ui-state-default ui-corner-all",j="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",k=function(){var b=a(this);setTimeout(function(){b.find(":ui-button").button("refresh")},1)},l=function(b){var c=b.name,d=b.form,e=a([]);return c&&(c=c.replace(/'/g,"\\'"),e=d?a(d).find("[name='"+c+"'][type=radio]"):a("[name='"+c+"'][type=radio]",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,k),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d="checkbox"===this.type||"radio"===this.type,e=d?"":"ui-state-active";null===c.label&&(c.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){c.disabled||this===h&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){c.disabled||a(this).removeClass(e)}).bind("click"+this.eventNamespace,function(a){c.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),d&&this.element.bind("change"+this.eventNamespace,function(){b.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return!c.disabled&&void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(c.disabled)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var d=b.element[0];l(d).not(d).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!c.disabled&&(a(this).addClass("ui-state-active"),h=this,void b.document.one("mouseup",function(){h=null}))}).bind("mouseup"+this.eventNamespace,function(){return!c.disabled&&void a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(b){return!c.disabled&&void((b.keyCode===a.ui.keyCode.SPACE||b.keyCode===a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",c.disabled),this._resetButton()},_determineButtonType:function(){var a,b,c;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),
4
- c=this.element.is(":checked"),c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",c)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+j).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){return this._super(a,b),"disabled"===a?(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),void(b&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b),"radio"===this.type?l(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var b=this.buttonElement.removeClass(j),c=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",a.trim(c)))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){"disabled"===a&&this.buttons.button("option",a,b),this._super(a,b)},refresh:function(){var b="rtl"===this.element.css("direction"),c=this.element.find(this.options.items),d=c.filter(":ui-button");c.not(":ui-button").button(),d.button("refresh"),this.buttons=c.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),a.ui.button,a.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var a=this.element.uniqueId().attr("id");this.ids={element:a,button:a+"-button",menu:a+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var b=this;this.label=a("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(a){this.button.focus(),a.preventDefault()}}),this.element.hide(),this.button=a("<span>",{class:"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),a("<span>",{class:"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=a("<span>",{class:"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){b.menuItems||b._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var b=this;this.menu=a("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=a("<div>",{class:"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(a,c){a.preventDefault(),b._setSelection(),b._select(c.item.data("ui-selectmenu-item"),a)},focus:function(a,c){var d=c.item.data("ui-selectmenu-item");null!=b.focusIndex&&d.index!==b.focusIndex&&(b._trigger("focus",a,{item:d}),b.isOpen||b._select(d,a)),b.focusIndex=d.index,b.button.attr("aria-activedescendant",b.menuItems.eq(d.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var a,b=this.element.find("option");b.length&&(this._parseOptions(b),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),a=this._getSelectedItem(),this.menuInstance.focus(null,a),this._setAria(a.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(a){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",a))},_position:function(){this.menuWrap.position(a.extend({of:this.button},this.options.position))},close:function(a){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",a))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(b,c){var d=this,e="";a.each(c,function(c,f){f.optgroup!==e&&(a("<li>",{class:"ui-selectmenu-optgroup ui-menu-divider"+(f.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:f.optgroup}).appendTo(b),e=f.optgroup),d._renderItemData(b,f)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-selectmenu-item",b)},_renderItem:function(b,c){var d=a("<li>");return c.disabled&&d.addClass("ui-state-disabled"),this._setText(d,c.label),d.appendTo(b)},_setText:function(a,b){b?a.text(b):a.html("&#160;")},_move:function(a,b){var c,d,e=".ui-menu-item";this.isOpen?c=this.menuItems.eq(this.focusIndex):(c=this.menuItems.eq(this.element[0].selectedIndex),e+=":not(.ui-state-disabled)"),d="first"===a||"last"===a?c["first"===a?"prevAll":"nextAll"](e).eq(-1):c[a+"All"](e).eq(0),d.length&&this.menuInstance.focus(b,d)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(a){this[this.isOpen?"close":"open"](a)},_setSelection:function(){var a;this.range&&(window.getSelection?(a=window.getSelection(),a.removeAllRanges(),a.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(b){this.isOpen&&(a(b.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(b))}},_buttonEvents:{mousedown:function(){var a;window.getSelection?(a=window.getSelection(),a.rangeCount&&(this.range=a.getRangeAt(0))):this.range=document.selection.createRange()},click:function(a){this._setSelection(),this._toggle(a)},keydown:function(b){var c=!0;switch(b.keyCode){case a.ui.keyCode.TAB:case a.ui.keyCode.ESCAPE:this.close(b),c=!1;break;case a.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(b);break;case a.ui.keyCode.UP:b.altKey?this._toggle(b):this._move("prev",b);break;case a.ui.keyCode.DOWN:b.altKey?this._toggle(b):this._move("next",b);break;case a.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(b):this._toggle(b);break;case a.ui.keyCode.LEFT:this._move("prev",b);break;case a.ui.keyCode.RIGHT:this._move("next",b);break;case a.ui.keyCode.HOME:case a.ui.keyCode.PAGE_UP:this._move("first",b);break;case a.ui.keyCode.END:case a.ui.keyCode.PAGE_DOWN:this._move("last",b);break;default:this.menu.trigger(b),c=!1}c&&b.preventDefault()}},_selectFocusedItem:function(a){var b=this.menuItems.eq(this.focusIndex);b.hasClass("ui-state-disabled")||this._select(b.data("ui-selectmenu-item"),a)},_select:function(a,b){var c=this.element[0].selectedIndex;this.element[0].selectedIndex=a.index,this._setText(this.buttonText,a.label),this._setAria(a),this._trigger("select",b,{item:a}),a.index!==c&&this._trigger("change",b,{item:a}),this.close(b)},_setAria:function(a){var b=this.menuItems.eq(a.index).attr("id");this.button.attr({"aria-labelledby":b,"aria-activedescendant":b}),this.menu.attr("aria-activedescendant",b)},_setOption:function(a,b){"icons"===a&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(b.button),this._super(a,b),"appendTo"===a&&this.menuWrap.appendTo(this._appendTo()),"disabled"===a&&(this.menuInstance.option("disabled",b),this.button.toggleClass("ui-state-disabled",b).attr("aria-disabled",b),this.element.prop("disabled",b),b?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===a&&this._resizeButton()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b&&b[0]||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var a=this.options.width;a||(a=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(a)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(b){var c=[];b.each(function(b,d){var e=a(d),f=e.parent("optgroup");c.push({element:e,index:b,value:e.val(),label:e.text(),optgroup:f.attr("label")||"",disabled:f.prop("disabled")||e.prop("disabled")})}),this.items=c},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),a.widget("ui.slider",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var b,c,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",g=[];for(c=d.values&&d.values.length||1,e.length>c&&(e.slice(c).remove(),e=e.slice(0,c)),b=e.length;c>b;b++)g.push(f);this.handles=e.add(a(g.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)})},_createRange:function(){var b=this.options,c="";b.range?(b.range===!0&&(b.values?b.values.length&&2!==b.values.length?b.values=[b.values[0],b.values[0]]:a.isArray(b.values)&&(b.values=b.values.slice(0)):b.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=a("<div></div>").appendTo(this.element),c="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(c+("min"===b.range||"max"===b.range?" ui-slider-range-"+b.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(b){var c,d,e,f,g,h,i,j,k=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),e=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));(e>c||e===c&&(b===k._lastChangedValue||k.values(b)===l.min))&&(e=c,f=a(this),g=b)}),h=this._start(b,g),h!==!1&&(this._mouseSliding=!0,this._handleIndex=g,f.addClass("ui-state-active").focus(),i=f.offset(),j=!a(b.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}:{left:b.pageX-i.left-f.width()/2,top:b.pageY-i.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return"horizontal"===this.orientation?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),0>d&&(d=0),"vertical"===this.orientation&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),2===this.options.values.length&&this.options.range===!0&&(0===b&&c>d||1===b&&d>c)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._lastChangedValue=b,this._trigger("change",a,c)}},value:function(a){return arguments.length?(this.options.value=this._trimAlignValue(a),this._refreshValue(),void this._change(null,0)):this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)return this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),void this._change(null,b);if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();for(d=this.options.values,e=arguments[0],f=0;d.length>f;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;switch("range"===b&&this.options.range===!0&&("min"===c?(this.options.value=this._values(0),this.options.values=null):"max"===c&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),a.isArray(this.options.values)&&(e=this.options.values.length),"disabled"===b&&this.element.toggleClass("ui-state-disabled",!!c),this._super(b,c),b){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===c?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),d=0;e>d;d+=1)this._change(null,d);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b);if(this.options.values&&this.options.values.length){for(c=this.options.values.slice(),d=0;c.length>d;d+=1)c[d]=this._trimAlignValue(c[d]);return c}return[]},_trimAlignValue:function(a){if(this._valueMin()>=a)return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return 2*Math.abs(c)>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_calculateNewMax:function(){var a=this.options.max,b=this._valueMin(),c=this.options.step,d=Math.floor(+(a-b).toFixed(this._precision())/c)*c;a=d+b,this.max=parseFloat(a.toFixed(this._precision()))},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=""+a,c=b.indexOf(".");return-1===c?0:b.length-c-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var b,c,d,e,f,g=this.options.range,h=this.options,i=this,j=!this._animateOff&&h.animate,k={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=100*((i.values(d)-i._valueMin())/(i._valueMax()-i._valueMin())),k["horizontal"===i.orientation?"left":"bottom"]=c+"%",a(this).stop(1,1)[j?"animate":"css"](k,h.animate),i.options.range===!0&&("horizontal"===i.orientation?(0===d&&i.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({width:c-b+"%"},{queue:!1,duration:h.animate})):(0===d&&i.range.stop(1,1)[j?"animate":"css"]({bottom:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({height:c-b+"%"},{queue:!1,duration:h.animate}))),b=c}):(d=this.value(),e=this._valueMin(),f=this._valueMax(),c=f!==e?100*((d-e)/(f-e)):0,k["horizontal"===this.orientation?"left":"bottom"]=c+"%",this.handle.stop(1,1)[j?"animate":"css"](k,h.animate),"min"===g&&"horizontal"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({width:c+"%"},h.animate),"max"===g&&"horizontal"===this.orientation&&this.range[j?"animate":"css"]({width:100-c+"%"},{queue:!1,duration:h.animate}),"min"===g&&"vertical"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},h.animate),"max"===g&&"vertical"===this.orientation&&this.range[j?"animate":"css"]({height:100-c+"%"},{queue:!1,duration:h.animate}))},_handleEvents:{keydown:function(b){var c,d,e,f,g=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),c=this._start(b,g),c===!1))return}switch(f=this.options.step,d=e=this.options.values&&this.options.values.length?this.values(g):this.value(),b.keyCode){case a.ui.keyCode.HOME:e=this._valueMin();break;case a.ui.keyCode.END:e=this._valueMax();break;case a.ui.keyCode.PAGE_UP:e=this._trimAlignValue(d+(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.PAGE_DOWN:e=this._trimAlignValue(d-(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(d===this._valueMax())return;e=this._trimAlignValue(d+f);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(d===this._valueMin())return;e=this._trimAlignValue(d-f)}this._slide(b,g,e)},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}}}),a.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var b={},c=this.element;return a.each(["min","max","step"],function(a,d){var e=c.attr(d);void 0!==e&&e.length&&(b[d]=e)}),b},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",a)))},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return!1;this._spin((b>0?1:-1)*this.options.step,a),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100),a.preventDefault()}},"mousedown .ui-spinner-button":function(b){function c(){var a=this.element[0]===this.document[0].activeElement;a||(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d}))}var d;d=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),b.preventDefault(),c.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,c.call(this)}),this._start(b)!==!1&&this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(b){return a(b.currentTarget).hasClass("ui-state-active")?this._start(b)!==!1&&void this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*a.height())&&a.height()>0&&a.height(a.height()),this.options.disabled&&this.disable()},_keydown:function(b){var c=this.options,d=a.ui.keyCode;switch(b.keyCode){case d.UP:return this._repeat(null,1,b),!0;case d.DOWN:return this._repeat(null,-1,b),!0;case d.PAGE_UP:return this._repeat(null,c.page,b),!0;case d.PAGE_DOWN:return this._repeat(null,-c.page,b),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){return!(!this.spinning&&this._trigger("start",a)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(a,b,c){a=a||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,b,c)},a),this._spin(b*this.options.step,c)},_spin:function(a,b){var c=this.value()||0;this.counter||(this.counter=1),c=this._adjustValue(c+a*this._increment(this.counter)),this.spinning&&this._trigger("spin",b,{value:c})===!1||(this._value(c),this.counter++)},_increment:function(b){var c=this.options.incremental;return c?a.isFunction(c)?c(b):Math.floor(b*b*b/5e4-b*b/500+17*b/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=""+a,c=b.indexOf(".");return-1===c?0:b.length-c-1},_adjustValue:function(a){var b,c,d=this.options;return b=null!==d.min?d.min:0,c=a-b,c=Math.round(c/d.step)*d.step,a=b+c,a=parseFloat(a.toFixed(this._precision())),null!==d.max&&a>d.max?d.max:null!==d.min&&d.min>a?d.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,b){if("culture"===a||"numberFormat"===a){var c=this._parse(this.element.val());return this.options[a]=b,void this.element.val(this._format(c))}("max"===a||"min"===a||"step"===a)&&"string"==typeof b&&(b=this._parse(b)),"icons"===a&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(b.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(b.down)),this._super(a,b),"disabled"===a&&(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),this.buttons.button(b?"disable":"enable"))},_setOptions:d(function(a){this._super(a)}),_parse:function(a){return"string"==typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,10,this.options.culture):+a),""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var a=this.value();return null!==a&&a===this._adjustValue(a)},_value:function(a,b){var c;""!==a&&(c=this._parse(a),null!==c&&(b||(c=this._adjustValue(c)),a=this._format(c))),this.element.val(a),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:d(function(a){this._stepUp(a)}),_stepUp:function(a){this._start()&&(this._spin((a||1)*this.options.step),this._stop())},stepDown:d(function(a){this._stepDown(a)}),_stepDown:function(a){this._start()&&(this._spin((a||1)*-this.options.step),this._stop())},pageUp:d(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:d(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){return arguments.length?void d(this._value).call(this,a):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),a.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var a=/#.*$/;return function(b){var c,d;b=b.cloneNode(!1),c=b.href.replace(a,""),d=location.href.replace(a,"");try{c=decodeURIComponent(c)}catch(a){}try{d=decodeURIComponent(d)}catch(a){}return b.hash.length>1&&c===d}}(),_create:function(){var b=this,c=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",c.collapsible),this._processTabs(),c.active=this._initialActive(),a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(c.active):a(),this._refresh(),this.active.length&&this.load(c.active)},_initialActive:function(){var b=this.options.active,c=this.options.collapsible,d=location.hash.substring(1);return null===b&&(d&&this.tabs.each(function(c,e){return a(e).attr("aria-controls")===d?(b=c,!1):void 0}),null===b&&(b=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===b||-1===b)&&(b=!!this.tabs.length&&0)),b!==!1&&(b=this.tabs.index(this.tabs.eq(b)),-1===b&&(b=!c&&0)),!c&&b===!1&&this.anchors.length&&(b=0),b},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(this.document[0].activeElement).closest("li"),d=this.tabs.index(c),e=!0;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1,d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=0;break;case a.ui.keyCode.SPACE:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d);case a.ui.keyCode.ENTER:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d!==this.options.active&&d);default:return}b.preventDefault(),clearTimeout(this.activating),d=this._focusNextTab(d,e),b.ctrlKey||b.metaKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),this.active.focus())},_handlePageNav:function(b){return b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(b,c){function d(){return b>e&&(b=0),0>b&&(b=e),b}for(var e=this.tabs.length-1;-1!==a.inArray(d(),this.options.disabled);)b=c?b+1:b-1;return b},_focusNextTab:function(a,b){return a=this._findNextTab(a,b),this.tabs.eq(a).focus(),a},_setOption:function(a,b){return"active"===a?void this._activate(b):"disabled"===a?void this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),b||this.options.active!==!1||this._activate(0)),"event"===a&&this._setupEvents(b),void("heightStyle"===a&&this._setupHeightStyle(b)))},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):"";
5
- },refresh:function(){var b=this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)}),this._processTabs(),b.active!==!1&&this.anchors.length?this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),!1)):b.active=this.tabs.index(this.active):(b.active=!1,this.active=a()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var b=this,c=this.tabs,d=this.anchors,e=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=a(),this.anchors.each(function(c,d){var e,f,g,h=a(d).uniqueId().attr("id"),i=a(d).closest("li"),j=i.attr("aria-controls");b._isLocal(d)?(e=d.hash,g=e.substring(1),f=b.element.find(b._sanitizeSelector(e))):(g=i.attr("aria-controls")||a({}).uniqueId()[0].id,e="#"+g,f=b.element.find(e),f.length||(f=b._createPanel(g),f.insertAfter(b.panels[c-1]||b.tablist)),f.attr("aria-live","polite")),f.length&&(b.panels=b.panels.add(f)),j&&i.data("ui-tabs-aria-controls",j),i.attr({"aria-controls":g,"aria-labelledby":h}),f.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),c&&(this._off(c.not(this.tabs)),this._off(d.not(this.anchors)),this._off(e.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(b){a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=!0):b=!1);for(var c,d=0;c=this.tabs[d];d++)b===!0||-1!==a.inArray(d,b)?a(c).addClass("ui-state-disabled").attr("aria-disabled","true"):a(c).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=b},_setupEvents:function(b){var c={};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(a){a.preventDefault()}}),this._on(this.anchors,c),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d=this.element.parent();"fill"===b?(c=d.height(),c-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(c-=b.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){c-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===b&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e.closest("li"),g=f[0]===d[0],h=g&&c.collapsible,i=h?a():this._getPanelForTab(f),j=d.length?this._getPanelForTab(d):a(),k={oldTab:d,oldPanel:j,newTab:h?a():f,newPanel:i};b.preventDefault(),f.hasClass("ui-state-disabled")||f.hasClass("ui-tabs-loading")||this.running||g&&!c.collapsible||this._trigger("beforeActivate",b,k)===!1||(c.active=!h&&this.tabs.index(f),this.active=g?a():f,this.xhr&&this.xhr.abort(),j.length||i.length||a.error("jQuery UI Tabs: Mismatching fragment identifier."),i.length&&this.load(this.tabs.index(f),b),this._toggle(b,k))},_toggle:function(b,c){function d(){f.running=!1,f._trigger("activate",b,c)}function e(){c.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),g.length&&f.options.show?f._show(g,f.options.show,d):(g.show(),d())}var f=this,g=c.newPanel,h=c.oldPanel;this.running=!0,h.length&&this.options.hide?this._hide(h,this.options.hide,function(){c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),e()}):(c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),h.hide(),e()),h.attr("aria-hidden","true"),c.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),g.length&&h.length?c.oldTab.attr("tabIndex",-1):g.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),g.attr("aria-hidden","false"),c.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(b){var c,d=this._findActive(b);d[0]!==this.active[0]&&(d.length||(d=this.active),c=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return b===!1?a():this.tabs.eq(b)},_getIndex:function(a){return"string"==typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");c?b.attr("aria-controls",c).removeData("ui-tabs-aria-controls"):b.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(b){var c=this.options.disabled;c!==!1&&(void 0===b?c=!1:(b=this._getIndex(b),c=a.isArray(c)?a.map(c,function(a){return a!==b?a:null}):a.map(this.tabs,function(a,c){return c!==b?c:null})),this._setupDisabled(c))},disable:function(b){var c=this.options.disabled;if(c!==!0){if(void 0===b)c=!0;else{if(b=this._getIndex(b),-1!==a.inArray(b,c))return;c=a.isArray(c)?a.merge([b],c).sort():[b]}this._setupDisabled(c)}},load:function(b,c){b=this._getIndex(b);var d=this,e=this.tabs.eq(b),f=e.find(".ui-tabs-anchor"),g=this._getPanelForTab(e),h={tab:e,panel:g},i=function(a,b){"abort"===b&&d.panels.stop(!1,!0),e.removeClass("ui-tabs-loading"),g.removeAttr("aria-busy"),a===d.xhr&&delete d.xhr};this._isLocal(f[0])||(this.xhr=a.ajax(this._ajaxSettings(f,c,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(e.addClass("ui-tabs-loading"),g.attr("aria-busy","true"),this.xhr.done(function(a,b,e){setTimeout(function(){g.html(a),d._trigger("load",c,h),i(e,b)},1)}).fail(function(a,b){setTimeout(function(){i(a,b)},1)})))},_ajaxSettings:function(b,c,d){var e=this;return{url:b.attr("href"),beforeSend:function(b,f){return e._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:f},d))}}},_getPanelForTab:function(b){var c=a(b).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+c))}}),a.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var b=a(this).attr("title")||"";return a("<a>").text(b).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(b,c){var d=(b.attr("aria-describedby")||"").split(/\s+/);d.push(c),b.data("ui-tooltip-id",c).attr("aria-describedby",a.trim(d.join(" ")))},_removeDescribedBy:function(b){var c=b.data("ui-tooltip-id"),d=(b.attr("aria-describedby")||"").split(/\s+/),e=a.inArray(c,d);-1!==e&&d.splice(e,1),b.removeData("ui-tooltip-id"),d=a.trim(d.join(" ")),d?b.attr("aria-describedby",d):b.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=a("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(b,c){var d=this;return"disabled"===b?(this[c?"_disable":"_enable"](),void(this.options[b]=c)):(this._super(b,c),void("content"===b&&a.each(this.tooltips,function(a,b){d._updateContent(b.element)})))},_disable:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d.element[0],b.close(e,!0)}),this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.is("[title]")&&b.data("ui-tooltip-title",b.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title"))})},open:function(b){var c=this,d=a(b?b.target:this.element).closest(this.options.items);d.length&&!d.data("ui-tooltip-id")&&(d.attr("title")&&d.data("ui-tooltip-title",d.attr("title")),d.data("ui-tooltip-open",!0),b&&"mouseover"===b.type&&d.parents().each(function(){var b,d=a(this);d.data("ui-tooltip-open")&&(b=a.Event("blur"),b.target=b.currentTarget=this,c.close(b,!0)),d.attr("title")&&(d.uniqueId(),c.parents[this.id]={element:this,title:d.attr("title")},d.attr("title",""))}),this._registerCloseHandlers(b,d),this._updateContent(d,b))},_updateContent:function(a,b){var c,d=this.options.content,e=this,f=b?b.type:null;return"string"==typeof d?this._open(b,a,d):(c=d.call(a[0],function(c){e._delay(function(){a.data("ui-tooltip-open")&&(b&&(b.type=f),this._open(b,a,c))})}),void(c&&this._open(b,a,c)))},_open:function(b,c,d){function e(a){j.of=a,g.is(":hidden")||g.position(j)}var f,g,h,i,j=a.extend({},this.options.position);if(d){if(f=this._find(c))return void f.tooltip.find(".ui-tooltip-content").html(d);c.is("[title]")&&(b&&"mouseover"===b.type?c.attr("title",""):c.removeAttr("title")),f=this._tooltip(c),g=f.tooltip,this._addDescribedBy(c,g.attr("id")),g.find(".ui-tooltip-content").html(d),this.liveRegion.children().hide(),d.clone?(i=d.clone(),i.removeAttr("id").find("[id]").removeAttr("id")):i=d,a("<div>").html(i).appendTo(this.liveRegion),this.options.track&&b&&/^mouse/.test(b.type)?(this._on(this.document,{mousemove:e}),e(b)):g.position(a.extend({of:c},this.options.position)),g.hide(),this._show(g,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){g.is(":visible")&&(e(j.of),clearInterval(h))},a.fx.interval)),this._trigger("open",b,{tooltip:g})}},_registerCloseHandlers:function(b,c){var d={keyup:function(b){if(b.keyCode===a.ui.keyCode.ESCAPE){var d=a.Event(b);d.currentTarget=c[0],this.close(d,!0)}}};c[0]!==this.element[0]&&(d.remove=function(){this._removeTooltip(this._find(c).tooltip)}),b&&"mouseover"!==b.type||(d.mouseleave="close"),b&&"focusin"!==b.type||(d.focusout="close"),this._on(!0,c,d)},close:function(b){var c,d=this,e=a(b?b.currentTarget:this.element),f=this._find(e);return f?(c=f.tooltip,void(f.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&!e.attr("title")&&e.attr("title",e.data("ui-tooltip-title")),this._removeDescribedBy(e),f.hiding=!0,c.stop(!0),this._hide(c,this.options.hide,function(){d._removeTooltip(a(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),b&&"mouseleave"===b.type&&a.each(this.parents,function(b,c){a(c.element).attr("title",c.title),delete d.parents[b]}),f.closing=!0,this._trigger("close",b,{tooltip:c}),f.hiding||(f.closing=!1)))):void e.removeData("ui-tooltip-open")},_tooltip:function(b){var c=a("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),d=c.uniqueId().attr("id");return a("<div>").addClass("ui-tooltip-content").appendTo(c),c.appendTo(this.document[0].body),this.tooltips[d]={element:b,tooltip:c}},_find:function(a){var b=a.data("ui-tooltip-id");return b?this.tooltips[b]:null},_removeTooltip:function(a){a.remove(),delete this.tooltips[a.attr("id")]},_destroy:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur"),f=d.element;e.target=e.currentTarget=f[0],b.close(e,!0),a("#"+c).remove(),f.data("ui-tooltip-title")&&(f.attr("title")||f.attr("title",f.data("ui-tooltip-title")),f.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),!function(a){function b(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var c,d=a.ui.mouse.prototype,e=d._mouseInit,f=d._mouseDestroy;d._touchStart=function(a){var d=this;!c&&d._mouseCapture(a.originalEvent.changedTouches[0])&&(c=!0,d._touchMoved=!1,b(a,"mouseover"),b(a,"mousemove"),b(a,"mousedown"))},d._touchMove=function(a){c&&(this._touchMoved=!0,b(a,"mousemove"))},d._touchEnd=function(a){c&&(b(a,"mouseup"),b(a,"mouseout"),this._touchMoved||b(a,"click"),c=!1)},d._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),e.call(b)},d._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),f.call(b)}}}(jQuery),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(b){var c="function"==typeof define&&define.amd,d="undefined"!=typeof module&&module.exports,e="https:"==document.location.protocol?"https:":"http:",f="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";c||(d?require("jquery-mousewheel")(a):a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src="+e+"//"+f+"%3E%3C/script%3E"))),b()}(function(){var b,c="mCustomScrollbar",d="mCS",e=".mCustomScrollbar",f={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},g=0,h={},i=window.attachEvent&&!window.addEventListener?1:0,j=!1,k=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],l={init:function(b){var b=a.extend(!0,{},f,b),c=m.call(this);if(b.live){var i=b.liveSelector||this.selector||e,j=a(i);if("off"===b.live)return void o(i);h[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(c).each(function(){var c=a(this);if(!c.data(d)){c.data(d,{idx:++g,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=c.data(d),f=e.opt,h=c.data("mcs-axis"),i=c.data("mcs-scrollbar-position"),j=c.data("mcs-theme");h&&(f.axis=h),i&&(f.scrollbarPosition=i),j&&(f.theme=j,n(f)),r.call(this),e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,c)}})},update:function(b,c){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(d)){var e=b.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=a("#mCSB_"+e.idx),i=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&W(b),c&&e&&f.callbacks.onBeforeUpdate&&"function"==typeof f.callbacks.onBeforeUpdate&&f.callbacks.onBeforeUpdate.call(this),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),h.css("max-height","none"),h.height()!==b.height()&&h.css("max-height",b.height()),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g)),e.overflowed=y.call(this),C.call(this),f.autoDraggerLength&&v.call(this),w.call(this),A.call(this);var j=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?i[0].height()>i[0].parent().height()?z.call(this):(X(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(z.call(this),"y"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[1]&&X(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?i[1].width()>i[1].parent().width()?z.call(this):(X(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(z.call(this),"x"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[0]&&X(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),c&&e&&(2===c&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===c&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)),U.call(this)}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,c),j=S.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=T.call(this,j[0],"y"),j[1]=T.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=ea()?0:k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",X(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",X(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(d)&&W(b)})},disable:function(b){var c=m.call(this);return a(c).each(function(){var c=a(this);c.data(d)&&(c.data(d),U.call(this,"remove"),B.call(this),b&&z.call(this),C.call(this,!0),c.addClass(k[3]))})},destroy:function(){var b=m.call(this);return a(b).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(b).selector),U.call(this,"remove"),B.call(this),z.call(this),e.removeData(d),_(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(c+" _"+d+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?e:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=!(a.inArray(b.theme,c)>-1)&&b.autoDraggerLength,b.autoExpandScrollbar=!(a.inArray(b.theme,d)>-1)&&b.autoExpandScrollbar,b.scrollButtons.enable=!(a.inArray(b.theme,e)>-1)&&b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1||b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){h[a]&&(clearTimeout(h[a]),_(h,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var b=a(this),e=b.data(d),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["<div id='mCSB_"+e.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+f.theme+" mCSB_scrollTools_vertical"+g+"'><div class='"+k[12]+"'><div id='mCSB_"+e.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+e.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+f.theme+" mCSB_scrollTools_horizontal"+g+"'><div class='"+k[12]+"'><div id='mCSB_"+e.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"<div id='mCSB_"+e.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:"";f.setWidth&&b.css("width",f.setWidth),f.setHeight&&b.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,b.addClass(c+" _"+d+"_"+e.idx+m+n).wrapInner("<div id='mCSB_"+e.idx+"' class='mCustomScrollBox mCS-"+f.theme+" "+i+"'><div id='mCSB_"+e.idx+"_container' class='mCSB_container' style='position:relative; top:"+f.setTop+"; left:"+f.setLeft+";' dir='"+e.langDir+"' /></div>");var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p)),"outside"===f.scrollbarPosition?("static"===b.css("position")&&b.css("position","relative"),b.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){var c=[b[0].scrollWidth,Math.max.apply(Math,b.children().map(function(){return a(this).outerWidth(!0)}).get())],d=b.parent().width();return c[0]>d?c[0]:c[1]>d?c[1]:"100%"},t=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){f.css({width:"auto","min-width":0,"overflow-x":"scroll"});var g=Math.ceil(f[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&g>f.parent().width()?f.css({width:g,"min-width":"100%","overflow-x":"inherit"}):f.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},u=function(){var b=a(this),c=b.data(d),e=c.opt,f=a(".mCSB_"+c.idx+"_scrollbar:first"),g=ca(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["<a href='#' class='"+k[13]+"' "+g+" />","<a href='#' class='"+k[14]+"' "+g+" />","<a href='#' class='"+k[15]+"' "+g+" />","<a href='#' class='"+k[16]+"' "+g+" />"],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(h[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(h[1]*g[1].parent().width())],k=i&&j[1]<j[0]?j[0]:j[1],l=i&&j[3]<j[2]?j[2]:j[3];g[0].css({height:k,"max-height":g[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":j[0]+"px"}),g[1].css({width:l,"max-width":g[1].parent().width()-10})},w=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[f.outerHeight(!1)-e.height(),f.outerWidth(!1)-e.width()],i=[h[0]/(g[0].parent().height()-g[0].height()),h[1]/(g[1].parent().width()-g[1].width())];c.scrollRatio={y:i[0],x:i[1]}},x=function(a,b,c){var d=c?k[0]+"_expanded":"",e=a.closest(".mCSB_scrollTools");
6
- "active"===b?(a.toggleClass(k[0]+" "+d),e.toggleClass(k[1]),a[0]._draggable=a[0]._draggable?0:1):a[0]._draggable||("hide"===b?(a.removeClass(k[0]),e.removeClass(k[1])):(a.addClass(k[0]),e.addClass(k[1])))},y=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=null==c.overflowed?f.height():f.outerHeight(!1),h=null==c.overflowed?f.width():f.outerWidth(!1),i=f[0].scrollHeight,j=f[0].scrollWidth;return i>g&&(g=i),j>h&&(h=j),[g>e.height(),h>e.width()]},z=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx),g=a("#mCSB_"+c.idx+"_container"),h=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(W(b),("x"!==e.axis&&!c.overflowed[0]||"y"===e.axis&&c.overflowed[0])&&(h[0].add(g).css("top",0),X(b,"_resetY")),"y"!==e.axis&&!c.overflowed[1]||"x"===e.axis&&c.overflowed[1]){var i=dx=0;"rtl"===c.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/c.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),X(b,"_resetX")}},A=function(){function b(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),H.call(c[0])):b()},100)}var c=a(this),e=c.data(d),f=e.opt;if(!e.bindEvents){if(E.call(this),f.contentTouchScroll&&F.call(this),G.call(this),f.mouseWheel.enable){var g;b()}M.call(this),O.call(this),f.advanced.autoScrollOnFocus&&N.call(this),f.scrollButtons.enable&&P.call(this),f.keyboard.enable&&Q.call(this),e.bindEvents=!0}},B=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=".mCSB_"+c.idx+"_scrollbar",h=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+c.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),e.advanced.extraDraggableSelectors&&h.add(a(e.advanced.extraDraggableSelectors)),c.bindEvents&&(a(document).add(a(!J()||top.document)).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),_(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),_(c.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),_(i[0],"onCompleteTimeout"),c.bindEvents=!1)},C=function(b){var c=a(this),e=c.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?c.removeClass(k[5]):c.addClass(k[5])},D=function(b){var c=b.type,d=b.target.ownerDocument!==document&&null!==frameElement?[a(frameElement).offset().top,a(frameElement).offset().left]:null,e=J()&&b.target.ownerDocument!==top.document&&null!==frameElement?[a(b.view.frameElement).offset().top,a(b.view.frameElement).offset().left]:[0,0];switch(c){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return d?[b.originalEvent.pageY-d[0]+e[0],b.originalEvent.pageX-d[1]+e[1],!1]:[b.originalEvent.pageY,b.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var f=b.originalEvent.touches[0]||b.originalEvent.changedTouches[0],g=b.originalEvent.touches.length||b.originalEvent.changedTouches.length;return b.target.ownerDocument!==document?[f.screenY,f.screenX,g>1]:[f.pageY,f.pageX,g>1];default:return d?[b.pageY-d[0]+e[0],b.pageX-d[1]+e[1],!1]:[b.pageY,b.pageX,!1]}},E=function(){function b(a,b,d,e){if(n[0].idleTimer=k.scrollInertia<233?250:0,c.attr("id")===m[1])var f="x",i=(c[0].offsetLeft-b+e)*h.scrollRatio.x;else var f="y",i=(c[0].offsetTop-a+d)*h.scrollRatio.y;X(g,i.toString(),{dir:f,drag:!0})}var c,e,f,g=a(this),h=g.data(d),k=h.opt,l=d+"_"+h.idx,m=["mCSB_"+h.idx+"_dragger_vertical","mCSB_"+h.idx+"_dragger_horizontal"],n=a("#mCSB_"+h.idx+"_container"),o=a("#"+m[0]+",#"+m[1]),p=k.advanced.releaseDraggableSelectors?o.add(a(k.advanced.releaseDraggableSelectors)):o,q=k.advanced.extraDraggableSelectors?a(!J()||top.document).add(a(k.advanced.extraDraggableSelectors)):a(!J()||top.document);o.bind("contextmenu."+l,function(a){a.preventDefault()}).bind("mousedown."+l+" touchstart."+l+" pointerdown."+l+" MSPointerDown."+l,function(b){if(b.stopImmediatePropagation(),b.preventDefault(),aa(b)){j=!0,i&&(document.onselectstart=function(){return!1}),K.call(n,!1),W(g),c=a(this);var d=c.offset(),h=D(b)[0]-d.top,l=D(b)[1]-d.left,m=c.height()+d.top,o=c.width()+d.left;m>h&&h>0&&o>l&&l>0&&(e=h,f=l),x(c,"active",k.autoExpandScrollbar)}}).bind("touchmove."+l,function(a){a.stopImmediatePropagation(),a.preventDefault();var d=c.offset(),g=D(a)[0]-d.top,h=D(a)[1]-d.left;b(e,f,g,h)}),a(document).add(q).bind("mousemove."+l+" pointermove."+l+" MSPointerMove."+l,function(a){if(c){var d=c.offset(),g=D(a)[0]-d.top,h=D(a)[1]-d.left;if(e===g&&f===h)return;b(e,f,g,h)}}).add(p).bind("mouseup."+l+" touchend."+l+" pointerup."+l+" MSPointerUp."+l,function(){c&&(x(c,"active",k.autoExpandScrollbar),c=null),j=!1,i&&(document.onselectstart=null),K.call(n,!0)})},F=function(){function c(a){if(!ba(a)||j||D(a)[2])return void(b=0);b=1,w=0,x=0,k=1,y.removeClass("mCS_touch_action");var c=E.offset();l=D(a)[0]-c.top,m=D(a)[1]-c.left,L=[D(a)[0],D(a)[1]]}function e(a){if(ba(a)&&!j&&!D(a)[2]&&(A.documentTouchScroll||a.preventDefault(),a.stopImmediatePropagation(),(!x||w)&&k)){q=Z();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left,e="mcsLinearOut";if(G.push(c),H.push(d),L[2]=Math.abs(D(a)[0]-L[0]),L[3]=Math.abs(D(a)[1]-L[1]),z.overflowed[0])var f=F[0].parent().height()-F[0].height(),g=l-c>0&&c-l>-(f*z.scrollRatio.y)&&(2*L[3]<L[2]||"yx"===A.axis);if(z.overflowed[1])var h=F[1].parent().width()-F[1].width(),n=m-d>0&&d-m>-(h*z.scrollRatio.x)&&(2*L[2]<L[3]||"yx"===A.axis);g||n?(O||a.preventDefault(),w=1):(x=1,y.addClass("mCS_touch_action")),O&&a.preventDefault(),u="yx"===A.axis?[l-c,m-d]:"x"===A.axis?[null,m-d]:[l-c,null],E[0].idleTimer=250,z.overflowed[0]&&i(u[0],I,e,"y","all",!0),z.overflowed[1]&&i(u[1],I,e,"x",K,!0)}}function f(a){if(!ba(a)||j||D(a)[2])return void(b=0);b=1,a.stopImmediatePropagation(),W(y),p=Z();var c=C.offset();n=D(a)[0]-c.top,o=D(a)[1]-c.left,G=[],H=[]}function g(a){if(ba(a)&&!j&&!D(a)[2]){k=0,a.stopImmediatePropagation(),w=0,x=0,r=Z();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left;if(!(r-q>30)){t=1e3/(r-p);var e="mcsEaseOut",f=2.5>t,g=f?[G[G.length-2],H[H.length-2]]:[0,0];s=f?[c-g[0],d-g[1]]:[c-n,d-o];var l=[Math.abs(s[0]),Math.abs(s[1])];t=f?[Math.abs(s[0]/4),Math.abs(s[1]/4)]:[t,t];var m=[Math.abs(E[0].offsetTop)-s[0]*h(l[0]/t[0],t[0]),Math.abs(E[0].offsetLeft)-s[1]*h(l[1]/t[1],t[1])];u="yx"===A.axis?[m[0],m[1]]:"x"===A.axis?[null,m[1]]:[m[0],null],v=[4*l[0]+A.scrollInertia,4*l[1]+A.scrollInertia];var y=parseInt(A.contentTouchScroll)||0;u[0]=l[0]>y?u[0]:0,u[1]=l[1]>y?u[1]:0,z.overflowed[0]&&i(u[0],v[0],e,"y",K,!1),z.overflowed[1]&&i(u[1],v[1],e,"x",K,!1)}}}function h(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function i(a,b,c,d,e,f){a&&X(y,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:f})}var k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a(this),z=y.data(d),A=z.opt,B=d+"_"+z.idx,C=a("#mCSB_"+z.idx),E=a("#mCSB_"+z.idx+"_container"),F=[a("#mCSB_"+z.idx+"_dragger_vertical"),a("#mCSB_"+z.idx+"_dragger_horizontal")],G=[],H=[],I=0,K="yx"===A.axis?"none":"all",L=[],M=E.find("iframe"),N=["touchstart."+B+" pointerdown."+B+" MSPointerDown."+B,"touchmove."+B+" pointermove."+B+" MSPointerMove."+B,"touchend."+B+" pointerup."+B+" MSPointerUp."+B],O=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;E.bind(N[0],function(a){c(a)}).bind(N[1],function(a){e(a)}),C.bind(N[0],function(a){f(a)}).bind(N[2],function(a){g(a)}),M.length&&M.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(N[0],function(a){c(a),f(a)}).bind(N[1],function(a){e(a)}).bind(N[2],function(a){g(a)})})})},G=function(){function c(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function e(a,b,c){k.type=c&&f?"stepped":"stepless",k.scrollAmount=10,R(g,a,b,"mcsLinearOut",c?60:null)}var f,g=a(this),h=g.data(d),i=h.opt,k=h.sequential,l=d+"_"+h.idx,m=a("#mCSB_"+h.idx+"_container"),n=m.parent();m.bind("mousedown."+l,function(){b||f||(f=1,j=!0)}).add(document).bind("mousemove."+l,function(a){if(!b&&f&&c()){var d=m.offset(),g=D(a)[0]-d.top+m[0].offsetTop,j=D(a)[1]-d.left+m[0].offsetLeft;g>0&&g<n.height()&&j>0&&j<n.width()?k.step&&e("off",null,"stepped"):("x"!==i.axis&&h.overflowed[0]&&(0>g?e("on",38):g>n.height()&&e("on",40)),"y"!==i.axis&&h.overflowed[1]&&(0>j?e("on",37):j>n.width()&&e("on",39)))}}).bind("mouseup."+l+" dragend."+l,function(){b||(f&&(f=0,e("off",null)),j=!1)})},H=function(){function b(b,d){if(W(c),!L(c,b.target)){var g="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):i&&b.deltaFactor<100?100:b.deltaFactor||100,k=f.scrollInertia;if("x"===f.axis||"x"===f.mouseWheel.axis)var l="x",m=[Math.round(g*e.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.width()?.9*h.width():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetLeft),p=j[1][0].offsetLeft,q=j[1].parent().width()-j[1].width(),r="y"===f.mouseWheel.axis?b.deltaY||d:b.deltaX;else var l="y",m=[Math.round(g*e.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.height()?.9*h.height():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetTop),p=j[0][0].offsetTop,q=j[0].parent().height()-j[0].height(),r=b.deltaY||d;"y"===l&&!e.overflowed[0]||"x"===l&&!e.overflowed[1]||((f.mouseWheel.invert||b.webkitDirectionInvertedFromDevice)&&(r=-r),f.mouseWheel.normalizeDelta&&(r=0>r?-1:1),(r>0&&0!==p||0>r&&p!==q||f.mouseWheel.preventDefault)&&(b.stopImmediatePropagation(),b.preventDefault()),b.deltaFactor<5&&!f.mouseWheel.normalizeDelta&&(n=b.deltaFactor,k=17),X(c,(o-r*n).toString(),{dir:l,dur:k}))}}if(a(this).data(d)){var c=a(this),e=c.data(d),f=e.opt,g=d+"_"+e.idx,h=a("#mCSB_"+e.idx),j=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")],k=a("#mCSB_"+e.idx+"_container").find("iframe");k.length&&k.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+g,function(a,c){b(a,c)})})}),h.bind("mousewheel."+g,function(a,c){b(a,c)})}},I=new Object,J=function(b){var c=!1,d=!1,e=null;if(void 0===b?d="#empty":void 0!==a(b).attr("id")&&(d=a(b).attr("id")),d!==!1&&void 0!==I[d])return I[d];if(b){try{var f=b.contentDocument||b.contentWindow.document;e=f.body.innerHTML}catch(a){}c=null!==e}else{try{var f=top.document;e=f.body.innerHTML}catch(a){}c=null!==e}return d!==!1&&(I[d]=c),c},K=function(a){var b=this.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}},L=function(b,c){var e=c.nodeName.toLowerCase(),f=b.data(d).opt.mouseWheel.disableOver,g=["select","textarea"];return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(c).is(":focus"))},M=function(){var b,c=a(this),e=c.data(d),f=d+"_"+e.idx,g=a("#mCSB_"+e.idx+"_container"),h=g.parent(),i=a(".mCSB_"+e.idx+"_scrollbar ."+k[12]);i.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(c){j=!0,a(c.target).hasClass("mCSB_dragger")||(b=1)}).bind("touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(){j=!1}).bind("click."+f,function(d){if(b&&(b=0,a(d.target).hasClass(k[12])||a(d.target).hasClass("mCSB_draggerRail"))){W(c);var f=a(this),i=f.find(".mCSB_dragger");if(f.parent(".mCSB_scrollTools_horizontal").length>0){if(!e.overflowed[1])return;var j="x",l=d.pageX>i.offset().left?-1:1,m=Math.abs(g[0].offsetLeft)-l*(.9*h.width())}else{if(!e.overflowed[0])return;var j="y",l=d.pageY>i.offset().top?-1:1,m=Math.abs(g[0].offsetTop)-l*(.9*h.height())}X(c,m.toString(),{dir:j,scrollEasing:"mcsEaseInOut"})}})},N=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=a("#mCSB_"+c.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(){var c=a(document.activeElement),d=g.find(".mCustomScrollBox").length,f=0;c.is(e.advanced.autoScrollOnFocus)&&(W(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=d?(f+17)*d:0,b[0]._focusTimeout=setTimeout(function(){var a=[da(c)[0],da(c)[1]],d=[g[0].offsetTop,g[0].offsetLeft],i=[d[0]+a[0]>=0&&d[0]+a[0]<h.height()-c.outerHeight(!1),d[1]+a[1]>=0&&d[0]+a[1]<h.width()-c.outerWidth(!1)],j="yx"!==e.axis||i[0]||i[1]?"all":"none";"x"===e.axis||i[0]||X(b,a[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:j,dur:f}),"y"===e.axis||i[1]||X(b,a[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:j,dur:f})},b[0]._focusTimer))})},O=function(){var b=a(this),c=b.data(d),e=d+"_"+c.idx,f=a("#mCSB_"+c.idx+"_container").parent();f.bind("scroll."+e,function(){0===f.scrollTop()&&0===f.scrollLeft()||a(".mCSB_"+c.idx+"_scrollbar").css("visibility","hidden")})},P=function(){var b=a(this),c=b.data(d),e=c.opt,f=c.sequential,g=d+"_"+c.idx,h=".mCSB_"+c.idx+"_scrollbar",i=a(h+">a");i.bind("contextmenu."+g,function(a){a.preventDefault()}).bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(d){function g(a,c){f.scrollAmount=e.scrollButtons.scrollAmount,R(b,a,c)}if(d.preventDefault(),aa(d)){var h=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,d.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;j=!0,c.tweenRunning=!1,g("on",h);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;j=!1,f.dir&&g("off",h);break;case"click":if("stepped"!==f.type||c.tweenRunning)return;g("on",h)}}})},Q=function(){function b(b){function d(a,b){g.type=f.keyboard.scrollType,g.scrollAmount=f.keyboard.scrollAmount,"stepped"===g.type&&e.tweenRunning||R(c,a,b)}switch(b.type){case"blur":e.tweenRunning&&g.dir&&d("off",null);break;case"keydown":case"keyup":var h=b.keyCode?b.keyCode:b.which,i="on";if("x"!==f.axis&&(38===h||40===h)||"y"!==f.axis&&(37===h||39===h)){if((38===h||40===h)&&!e.overflowed[0]||(37===h||39===h)&&!e.overflowed[1])return;"keyup"===b.type&&(i="off"),a(document.activeElement).is(l)||(b.preventDefault(),b.stopImmediatePropagation(),d(i,h))}else if(33===h||34===h){if((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type){W(c);var m=34===h?-1:1;if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=Math.abs(j[0].offsetLeft)-m*(.9*k.width());else var n="y",o=Math.abs(j[0].offsetTop)-m*(.9*k.height());X(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===h||36===h)&&!a(document.activeElement).is(l)&&((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type)){if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=35===h?Math.abs(k.width()-j.outerWidth(!1)):0;else var n="y",o=35===h?Math.abs(k.height()-j.outerHeight(!1)):0;X(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}}var c=a(this),e=c.data(d),f=e.opt,g=e.sequential,h=d+"_"+e.idx,i=a("#mCSB_"+e.idx),j=a("#mCSB_"+e.idx+"_container"),k=j.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']",m=j.find("iframe"),n=["blur."+h+" keydown."+h+" keyup."+h];m.length&&m.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(n[0],function(a){b(a)})})}),i.attr("tabindex","0").bind(n[0],function(a){b(a)})},R=function(b,c,e,f,g){function h(a){l.snapAmount&&(m.scrollAmount=l.snapAmount instanceof Array?"x"===m.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var c="stepped"!==m.type,d=g?g:a?c?p/1.5:q:1e3/60,e=a?c?7.5:40:2.5,i=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)],k=[j.scrollRatio.y>10?10:j.scrollRatio.y,j.scrollRatio.x>10?10:j.scrollRatio.x],o="x"===m.dir[0]?i[1]+m.dir[1]*(k[1]*e):i[0]+m.dir[1]*(k[0]*e),r="x"===m.dir[0]?i[1]+m.dir[1]*parseInt(m.scrollAmount):i[0]+m.dir[1]*parseInt(m.scrollAmount),s="auto"!==m.scrollAmount?r:o,t=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",u=!!a;return a&&17>d&&(s="x"===m.dir[0]?i[1]:i[0]),X(b,s.toString(),{dir:m.dir[0],scrollEasing:t,dur:d,onComplete:u}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=setTimeout(function(){h()},d)))}function i(){clearTimeout(m.step),_(m,"step"),W(b)}var j=b.data(d),l=j.opt,m=j.sequential,n=a("#mCSB_"+j.idx+"_container"),o="stepped"===m.type,p=l.scrollInertia<26?26:l.scrollInertia,q=l.scrollInertia<1?17:l.scrollInertia;switch(c){case"on":if(m.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],W(b),ca(e)&&"stepped"===m.type)return;h(o);break;case"off":i(),(o||j.tweenRunning&&m.dir)&&h(!0)}},S=function(b){var c=a(this).data(d).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===c.axis?null:b,e[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},T=function(b,c){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;c||(c="x"===g.axis?"x":"y");var k="x"===c?h.outerWidth(!1)-i.width():h.outerHeight(!1)-i.height(),m="x"===c?h[0].offsetLeft:h[0].offsetTop,n="x"===c?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===c?da(o)[1]:da(o)[0];case"string":case"number":if(ca(b))return Math.abs(b);if(-1!==b.indexOf("%"))return Math.abs(k*parseInt(b)/100);if(-1!==b.indexOf("-="))return Math.abs(m-parseInt(b.split("-=")[1]));if(-1!==b.indexOf("+=")){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==b.indexOf("px")&&ca(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===c?da(o)[1]:da(o)[0]}return a(b).length?"x"===c?da(a(b))[1]:da(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},U=function(b){function c(){return clearTimeout(m[0].autoUpdate),0===h.parents("html").length?void(h=null):void(m[0].autoUpdate=setTimeout(function(){return j.advanced.updateOnSelectorChange&&(i.poll.change.n=f(),i.poll.change.n!==i.poll.change.o)?(i.poll.change.o=i.poll.change.n,void g(3)):j.advanced.updateOnContentResize&&(i.poll.size.n=h[0].scrollHeight+h[0].scrollWidth+m[0].offsetHeight+h[0].offsetHeight+h[0].offsetWidth,i.poll.size.n!==i.poll.size.o)?(i.poll.size.o=i.poll.size.n,void g(1)):!j.advanced.updateOnImageLoad||"auto"===j.advanced.updateOnImageLoad&&"y"===j.axis||(i.poll.img.n=m.find("img").length,i.poll.img.n===i.poll.img.o)?void((j.advanced.updateOnSelectorChange||j.advanced.updateOnContentResize||j.advanced.updateOnImageLoad)&&c()):(i.poll.img.o=i.poll.img.n,void m.find("img").each(function(){e(this)}))},j.advanced.autoUpdateTimeout))}function e(b){function c(a,b){return function(){return b.apply(a,arguments)}}function d(){this.onload=null,a(b).addClass(k[2]),g(2)}if(a(b).hasClass(k[2]))return void g();var e=new Image;e.onload=c(e,d),e.src=b.src}function f(){j.advanced.updateOnSelectorChange===!0&&(j.advanced.updateOnSelectorChange="*");var a=0,b=m.find(j.advanced.updateOnSelectorChange);return j.advanced.updateOnSelectorChange&&b.length>0&&b.each(function(){a+=this.offsetHeight+this.offsetWidth}),a}function g(a){clearTimeout(m[0].autoUpdate),l.update.call(null,h[0],a)}var h=a(this),i=h.data(d),j=i.opt,m=a("#mCSB_"+i.idx+"_container");return b?(clearTimeout(m[0].autoUpdate),void _(m[0],"autoUpdate")):void c()},V=function(a,b,c){return Math.round(a/b)*b-c},W=function(b){var c=b.data(d),e=a("#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal");e.each(function(){$.call(this)})},X=function(b,c,e){function f(a){return i&&j.callbacks[a]&&"function"==typeof j.callbacks[a]}function g(){return[j.callbacks.alwaysTriggerOffsets||u>=v[0]+y,j.callbacks.alwaysTriggerOffsets||-z>=u]}function h(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[s[0].offsetTop,s[0].offsetLeft],d=[n.outerHeight(!1),n.outerWidth(!1)],f=[m.height(),m.width()];b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var i=b.data(d),j=i.opt,k={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:j.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(k,e),l=[e.dur,e.drag?0:e.dur],m=a("#mCSB_"+i.idx),n=a("#mCSB_"+i.idx+"_container"),o=n.parent(),p=j.callbacks.onTotalScrollOffset?S.call(b,j.callbacks.onTotalScrollOffset):[0,0],q=j.callbacks.onTotalScrollBackOffset?S.call(b,j.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=e.trigger,0===o.scrollTop()&&0===o.scrollLeft()||(a(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),o.scrollTop(0).scrollLeft(0)),"_resetY"!==c||i.contentReset.y||(f("onOverflowYNone")&&j.callbacks.onOverflowYNone.call(b[0]),i.contentReset.y=1),"_resetX"!==c||i.contentReset.x||(f("onOverflowXNone")&&j.callbacks.onOverflowXNone.call(b[0]),i.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){if(!i.contentReset.y&&b[0].mcs||!i.overflowed[0]||(f("onOverflowY")&&j.callbacks.onOverflowY.call(b[0]),i.contentReset.x=null),!i.contentReset.x&&b[0].mcs||!i.overflowed[1]||(f("onOverflowX")&&j.callbacks.onOverflowX.call(b[0]),i.contentReset.x=null),j.snapAmount){var r=j.snapAmount instanceof Array?"x"===e.dir?j.snapAmount[1]:j.snapAmount[0]:j.snapAmount;c=V(c,r,j.snapOffset)}switch(e.dir){case"x":var s=a("#mCSB_"+i.idx+"_dragger_horizontal"),t="left",u=n[0].offsetLeft,v=[m.width()-n.outerWidth(!1),s.parent().width()-s.width()],w=[c,0===c?0:c/i.scrollRatio.x],y=p[1],z=q[1],A=y>0?y/i.scrollRatio.x:0,B=z>0?z/i.scrollRatio.x:0;break;case"y":var s=a("#mCSB_"+i.idx+"_dragger_vertical"),t="top",u=n[0].offsetTop,v=[m.height()-n.outerHeight(!1),s.parent().height()-s.height()],w=[c,0===c?0:c/i.scrollRatio.y],y=p[0],z=q[0],A=y>0?y/i.scrollRatio.y:0,B=z>0?z/i.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=v[1]?w=[v[0],v[1]]:w[0]=-w[0],b[0].mcs||(h(),f("onInit")&&j.callbacks.onInit.call(b[0])),clearTimeout(n[0].onCompleteTimeout),Y(s[0],t,Math.round(w[1]),l[1],e.scrollEasing),!i.tweenRunning&&(0===u&&w[0]>=0||u===v[0]&&w[0]<=v[0])||Y(n[0],t,Math.round(w[0]),l[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!i.tweenRunning&&(f("onScrollStart")&&(h(),j.callbacks.onScrollStart.call(b[0])),i.tweenRunning=!0,x(s),i.cbOffsets=g())},onUpdate:function(){e.callbacks&&e.onUpdate&&f("whileScrolling")&&(h(),j.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===j.axis&&clearTimeout(n[0].onCompleteTimeout);var a=n[0].idleTimer||0;n[0].onCompleteTimeout=setTimeout(function(){f("onScroll")&&(h(),j.callbacks.onScroll.call(b[0])),f("onTotalScroll")&&w[1]>=v[1]-A&&i.cbOffsets[0]&&(h(),j.callbacks.onTotalScroll.call(b[0])),f("onTotalScrollBack")&&w[1]<=B&&i.cbOffsets[1]&&(h(),j.callbacks.onTotalScrollBack.call(b[0])),i.tweenRunning=!1,n[0].idleTimer=0,x(s,"hide")},a)}}})}},Y=function(a,b,c,d,e,f,g){function h(){v.stop||(s||o.call(),s=Z()-r,i(),s>=v.time&&(v.time=s>v.time?s+m-(s-v.time):s+m-1,v.time<s+1&&(v.time=s+1)),v.time<d?v.id=n(h):q.call())}function i(){d>0?(v.currVal=l(v.time,t,w,d,e),u[b]=Math.round(v.currVal)+"px"):u[b]=c+"px",p.call()}function j(){m=1e3/60,v.time=s+m,n=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return i(),setTimeout(a,.01)},v.id=n(h)}function k(){null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null)}function l(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,1>a?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,1>a?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,1>a?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var m,n,g=g||{},o=g.onStart||function(){},p=g.onUpdate||function(){},q=g.onComplete||function(){},r=Z(),s=0,t=a.offsetTop,u=a.style,v=a._mTween[b];"left"===b&&(t=a.offsetLeft);var w=c-t;v.stop=0,"none"!==f&&k(),j()},Z=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},$=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c<b.length;c++){var d=b[c];a._mTween[d].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(a._mTween[d].id):clearTimeout(a._mTween[d].id),a._mTween[d].id=null,a._mTween[d].stop=1)}},_=function(a,b){try{delete a[b]}catch(c){a[b]=null}},aa=function(a){return!(a.which&&1!==a.which)},ba=function(a){var b=a.originalEvent.pointerType;return!(b&&"touch"!==b&&2!==b)},ca=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},da=function(a){var b=a.parents(".mCSB_container");return[a.offset().top-b.offset().top,a.offset().left-b.offset().left]},ea=function(){function a(){var a=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var b=0;b<a.length;b++)if(a[b]+"Hidden"in document)return a[b]+"Hidden";return null}var b=a();return!!b&&document[b]};a.fn[c]=function(b){return l[b]?l[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):l.init.apply(this,arguments)},a[c]=function(b){return l[b]?l[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):l.init.apply(this,arguments)},a[c].defaults=f,window[c]=!0,a(window).bind("load",function(){a(e)[c](),a.extend(a.expr[":"],{mcsInView:a.expr[":"].mcsInView||function(b){var c,d,e=a(b),f=e.parents(".mCSB_container");if(f.length)return c=f.parent(),d=[f[0].offsetTop,f[0].offsetLeft],d[0]+da(e)[0]>=0&&d[0]+da(e)[0]<c.height()-e.outerHeight(!1)&&d[1]+da(e)[1]>=0&&d[1]+da(e)[1]<c.width()-e.outerWidth(!1)},mcsInSight:a.expr[":"].mcsInSight||function(b,c,d){var e,f,g,h,i=a(b),j=i.parents(".mCSB_container"),k="exact"===d[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(j.length)return e=[i.outerHeight(!1),i.outerWidth(!1)],g=[j[0].offsetTop+da(i)[0],j[0].offsetLeft+da(i)[1]],f=[j.parent()[0].offsetHeight,j.parent()[0].offsetWidth],h=[e[0]<f[0]?k[0]:k[1],e[1]<f[1]?k[0]:k[1]],g[0]-f[0]*h[0][0]<0&&g[0]+e[0]-f[0]*h[0][1]>=0&&g[1]-f[1]*h[1][0]<0&&g[1]+e[1]-f[1]*h[1][1]>=0},mcsOverflow:a.expr[":"].mcsOverflow||function(b){var c=a(b).data(d);if(c)return c.overflowed[0]||c.overflowed[1]}})})})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){function b(a,b){return v.call(a,b)}function c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=t.map,p=o&&o["*"]||{};if(a){for(g=(a=a.split("/")).length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&n&&(a=n.slice(0,n.length-1).concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),--k;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;0<k&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((n||p)&&o){for(k=(c=a.split("/")).length;0<k;--k){if(d=c.slice(0,k).join("/"),n)for(l=n.length;0<l;--l)if(e=(e=o[n.slice(0,l).join("/")])&&e[d]){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function d(a,b){return function(){var c=w.call(arguments,0);return"string"!=typeof c[0]&&1===c.length&&c.push(null),o.apply(m,c.concat([a,b]))}}function e(a){return function(b){r[a]=b}}function f(a){if(b(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(m,c)}if(!b(r,a)&&!b(u,a))throw new Error("No "+a);return r[a]}function g(a){var b,c=a?a.indexOf("!"):-1;return-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function h(a){return a?g(a):[]}if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var i=a.fn.select2.amd;var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;return i&&i.requirejs||(i?k=i:i={},r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/,p=function(a,b){var d,e,h=g(a),i=h[0],j=b[1];return a=h[1],i&&(d=f(i=c(i,j))),i?a=d&&d.normalize?d.normalize(a,(e=j,function(a){return c(a,e)})):c(a,j):(i=(h=g(a=c(a,j)))[0],a=h[1],i&&(d=f(i))),{f:i?i+"!"+a:a,n:a,pr:i,p:d}},q={require:function(a){return d(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:(b=a,function(){return t&&t.config&&t.config[b]||{}})};var b}},n=function(a,c,g,i){var j,k,l,n,o,t,v,w=[],x=typeof g;if(t=h(i=i||a),"undefined"==x||"function"==x){for(c=!c.length&&g.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if("require"===(k=(n=p(c[o],t)).f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)j=w[o]=q.module(a);else if(b(r,k)||b(s,k)||b(u,k))w[o]=f(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,d(i,!0),e(k),{}),w[o]=r[k]}l=g?g.apply(r[a],w):void 0,a&&(j&&j.exports!==m&&j.exports!==r[a]?r[a]=j.exports:l===m&&v||(r[a]=l))}else a&&(r[a]=g)},j=k=o=function(a,b,c,d,e){if("string"==typeof a)return q[a]?q[a](b):f(p(a,h(b)).f);if(!a.splice){if((t=a).deps&&o(t.deps,t.callback),!b)return;b.splice?(a=b,b=c,c=null):a=m}return b=b||function(){},"function"==typeof c&&(c=d,d=e),d?n(m,a,b,c):setTimeout(function(){n(m,a,b,c)},4),o},o.config=function(a){return o(a)},j._defined=r,(l=function(a,c,d){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");c.splice||(d=c,c=[]),b(r,a)||b(s,a)||(s[a]=[a,c,d])}).amd={jQuery:!0},i.requirejs=j,i.require=k,i.define=l),i.define("almond",function(){}),i.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),i.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b)"function"==typeof b[d]&&"constructor"!==d&&c.push(d);return c}function c(){this.listeners={}}var d={};d.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;
7
- 0<d&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new function(){this.constructor=d};for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=0;j<f.length;j++){var k=f[j];d.prototype[k]=e(k)}return d},c.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},c.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),(c[0]._type=a)in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},c.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},d.Observable=c,d.generateChars=function(a){for(var b="",c=0;c<a;c++)b+=Math.floor(36*Math.random()).toString(36);return b},d.bind=function(a,b){return function(){a.apply(b,arguments)}},d._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];(f=f.substring(0,1).toLowerCase()+f.substring(1))in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},d.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return(e!==f||"hidden"!==f&&"visible"!==f)&&("scroll"===e||"scroll"===f||d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth)},d.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},d.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},d.__cache={};var e=0;return d.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},d.StoreData=function(a,b,c){var e=d.GetUniqueElementId(a);d.__cache[e]||(d.__cache[e]={}),d.__cache[e][b]=c},d.GetData=function(b,c){var e=d.GetUniqueElementId(b);return c?d.__cache[e]&&null!=d.__cache[e][c]?d.__cache[e][c]:a(b).data(c):d.__cache[e]},d.RemoveData=function(a){var b=d.GetUniqueElementId(a);null!=d.__cache[b]&&delete d.__cache[b],a.removeAttribute("data-select2-id")},d}),i.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null!=a.results&&0!==a.results.length){a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");0<b.length?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&-1<a.inArray(f,e)?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(a)},c=this.option(b);c.className+=" loading-results",this.$results.prepend(c)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"option","aria-selected":"false"},f=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var g in(null!=c.element&&f.call(c.element,":disabled")||null==c.element&&c.disabled)&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]),e){var h=e[g];d.setAttribute(g,h)}if(c.children){var i=a(d),j=document.createElement("strong");j.className="select2-results__group",a(j),this.template(c,j);for(var k=[],l=0;l<c.children.length;l++){var m=c.children[l],n=this.option(m);k.push(n)}var o=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});o.append(k),i.append(j),i.append(o)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(!(c<=0)){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a)+1;if(!(c>=b.length)){var d=b.eq(c);d.trigger("mouseenter");var f=e.$results.offset().top+e.$results.outerHeight(!1),g=d.offset().top+d.outerHeight(!1),h=e.$results.scrollTop()+g-f;0===c?e.$results.scrollTop(0):f<g&&e.$results.scrollTop(h)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=0<a.deltaY&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");"true"!==d.attr("aria-selected")?e.trigger("select",{originalEvent:c,data:f}):e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]").index(a),c=this.$results.offset().top,d=a.offset().top,e=this.$results.scrollTop()+(d-c),f=d-c;e-=2*a.outerHeight(!1),b<=2?this.$results.scrollTop(0):(f>this.$results.outerHeight()||f<0)&&this.$results.scrollTop(e)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),i.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),i.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var c=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),c.attr("aria-disabled","false"),this.$selection=c},d.prototype.bind=function(a,b){var d=this,e=a.id+"-results";this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.trigger("focus"),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex),d.$selection.attr("aria-disabled","false")}),a.on("disable",function(){d.$selection.attr("tabindex","-1"),d.$selection.attr("aria-disabled","true")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target).closest(".select2");a(".select2.select2-container--open").each(function(){this!=d[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d}),i.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.trigger("focus")})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0!==a.length){var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d);var e=b.title||b.text;e?c.attr("title",e):c.removeAttr("title")}else this.clear()},e}),i.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.isDisabled()){var d=a(this).parent(),e=c.GetData(d[0],"data");f.trigger("unselect",{originalEvent:b,data:e})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g);var h=e.title||e.text;h&&f.attr("title",h),c.StoreData(f[0],"data",e),b.push(f)}var i=this.$selection.find(".select2-selection__rendered");c.appendMany(i,b)}},d}),i.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id;if(1<b.length||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),i.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},d.prototype._handleClear=function(a,b){if(!this.isDisabled()){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)this.$element.val(f);else{for(var h=0;h<e.length;h++)if(g={data:e[h]},this.trigger("unselect",g),g.prevented)return void this.$element.val(f);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},d.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},d.prototype.update=function(b,d){if(b.call(this,d),!(0<this.$selection.find(".select2-selection__placeholder").length||0===d.length)){var e=this.options.get("translations").get("removeAllItems"),f=a('<span class="select2-selection__clear" title="'+e()+'">&times;</span>');c.StoreData(f[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(f)}},d}),i.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,d,e){var f=this,g=d.id+"-results";a.call(this,d,e),d.on("open",function(){f.$search.attr("aria-controls",g),f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-controls"),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){a.data._resultId?f.$search.attr("aria-activedescendant",a.data._resultId):f.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(0<d.length){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(a){f.$search.val()&&a.stopPropagation()});var h=document.documentMode,i=h&&h<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){i?f.$selection.off("input.search input.searchcheck"):f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(i&&"input"===a.type)f.$selection.off("input.search input.searchcheck");else{var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.handleSearch(a)}})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.trigger("focus")},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";a=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").width():.75*(this.$search.val().length+1)+"em",this.$search.css("width",a)},d}),i.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),i.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),i.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),i.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),i.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];(a=[a]).push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("input").trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("input").trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("input").trigger("change")})}},d.prototype.bind=function(a,b){var c=this;(this.container=a).on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){b.RemoveData(this)})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var d;a.children?(d=document.createElement("optgroup")).label=a.text:void 0!==(d=document.createElement("option")).textContent?d.textContent=a.text:d.innerText=a.text,void 0!==a.id&&(d.value=a.id),a.disabled&&(d.disabled=!0),a.selected&&(d.selected=!0),a.title&&(d.title=a.title);var e=c(d),f=this._normalizeItem(a);return f.element=d,b.StoreData(d,"data",f),e},d.prototype.item=function(a){var d={};if(null!=(d=b.GetData(a[0],"data")))return d;if(a.is("option"))d={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){d={text:a.prop("label"),children:[],title:a.prop("title")};for(var e=a.children("option"),f=[],g=0;g<e.length;g++){var h=c(e[g]),i=this.item(h);f.push(i)}d.children=f}return(d=this._normalizeItem(d)).element=a[0],b.StoreData(a[0],"data",d),d},d.prototype._normalizeItem=function(a){return a!==Object(a)&&(a={id:a,text:a}),null!=(a=c.extend({},{text:""},a)).id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),
8
- c.extend({},{selected:!1,disabled:!1},a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),i.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){this._dataToConvert=b.get("data")||[],d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype.bind=function(a,b){d.__super__.bind.call(this,a,b),this.addOptions(this.convertToOptions(this._dataToConvert))},d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(0<=c.inArray(j.id,g)){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),i.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){"status"in d&&(0===d.status||"0"===d.status)||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),i.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){var d=this;this._removeOldTags(),null!=b.term&&null==b.page?a.call(this,b,function a(e,f){for(var g=e.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!a({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(e.data=g,void c(e))}if(f)return!0;var k=d.createTag(b);if(null!=k){var l=d.option(k);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(g,k)}e.results=g,c(e)}):a.call(this,b,c)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),i.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){var e=this;c.term=c.term||"";var f=this.tokenizer(c,this.options,function(b){var c,d=e._normalizeItem(b);if(!e.$element.find("option").filter(function(){return a(this).val()===d.id}).length){var f=e.option(d);f.attr("data-select2-tag",!0),e._removeOldTags(),e.addOptions([f])}c=d,e.trigger("select",{data:c})});f.term!==c.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.trigger("focus")),c.term=f.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=i(a.extend({},c,{term:k}));null!=l?(e(l),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),i.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.term=b.term||"",b.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),i.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.term=b.term||"",0<this.maximumInputLength&&b.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),i.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(){d._checkIfMaximumSelected()})},a.prototype.query=function(a,b,c){var d=this;this._checkIfMaximumSelected(function(){a.call(d,b,c)})},a.prototype._checkIfMaximumSelected=function(a,b){var c=this;this.current(function(a){var d=null!=a?a.length:0;0<c.maximumSelectionLength&&d>=c.maximumSelectionLength?c.trigger("results:message",{message:"maximumSelected",args:{maximum:c.maximumSelectionLength}}):b&&b()})},a}),i.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),i.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.attr("aria-controls",f),e.$search.trigger("focus"),window.setTimeout(function(){e.$search.trigger("focus")},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-controls"),e.$search.removeAttr("aria-activedescendant"),e.$search.val(""),e.$search.trigger("blur")}),c.on("focus",function(){c.isOpen()||e.$search.trigger("focus")}),c.on("results:all",function(a){null!=a.query.term&&""!==a.query.term||(e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide"))}),c.on("results:focus",function(a){a.data._resultId?e.$search.attr("aria-activedescendant",a.data._resultId):e.$search.removeAttr("aria-activedescendant")})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),i.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;0<=d;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),i.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("query",function(a){d.lastParams=a,d.loading=!0}),b.on("query:append",function(a){d.lastParams=a,d.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},b.prototype.loadMoreIfNeeded=function(){var b=a.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&b){var c=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=c+50&&this.loadMore()}},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),i.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=a(d.get("dropdownParent")||document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),d._bindContainerResultHandlers(b)}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._bindContainerResultHandlers=function(a,b){if(!this._containerResultsHandlersBound){var c=this;b.on("results:all",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("results:append",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("results:message",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("select",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("unselect",function(){c._positionDropdown(),c._resizeDropdown()}),this._containerResultsHandlersBound=!0}},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h=this.$dropdown.outerHeight(!1),i=b.scrollTop(),j=b.scrollTop()+b.height(),k=i<f.top-h,l=j>f.bottom+h,m={left:f.left,top:g.bottom},n=this.$dropdownParent;"static"===n.css("position")&&(n=n.offsetParent());var o={top:0,left:0};(a.contains(document.body,n[0])||n[0].isConnected)&&(o=n.offset()),m.top-=o.top,m.left-=o.left,c||d||(e="below"),l||!k||c?!k&&l&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(m.top=g.top-o.top-h),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(m)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),i.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return a.prototype.showSearch=function(a,b){return!(function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}(b.data.results)<this.minimumResultsForSearch)&&a.call(this,b)},a}),i.define("select2/dropdown/selectOnClose",["../utils"],function(a){function b(){}return b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},b.prototype._handleSelectOnClose=function(b,c){if(c&&null!=c.originalSelect2Event){var d=c.originalSelect2Event;if("select"===d._type||"unselect"===d._type)return}var e=this.getHighlightedResults();if(!(e.length<1)){var f=a.GetData(e[0],"data");null!=f.element&&f.element.selected||null==f.element&&f.selected||this.trigger("select",{data:f})}},b}),i.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&(c.ctrlKey||c.metaKey)||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),i.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),i.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}return D.prototype.apply=function(k){if(null==(k=a.extend(!0,{},this.defaults,k)).dataAdapter){if(null!=k.ajax?k.dataAdapter=o:null!=k.data?k.dataAdapter=n:k.dataAdapter=m,0<k.minimumInputLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,r)),0<k.maximumInputLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,s)),0<k.maximumSelectionLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,t)),k.tags&&(k.dataAdapter=j.Decorate(k.dataAdapter,p)),null==k.tokenSeparators&&null==k.tokenizer||(k.dataAdapter=j.Decorate(k.dataAdapter,q)),null!=k.query){var l=b(k.amdBase+"compat/query");k.dataAdapter=j.Decorate(k.dataAdapter,l)}if(null!=k.initSelection){var C=b(k.amdBase+"compat/initSelection");k.dataAdapter=j.Decorate(k.dataAdapter,C)}}if(null==k.resultsAdapter&&(k.resultsAdapter=c,null!=k.ajax&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,x)),null!=k.placeholder&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,w)),k.selectOnClose&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,A))),null==k.dropdownAdapter){if(k.multiple)k.dropdownAdapter=u;else{var D=j.Decorate(u,v);k.dropdownAdapter=D}if(0!==k.minimumResultsForSearch&&(k.dropdownAdapter=j.Decorate(k.dropdownAdapter,z)),k.closeOnSelect&&(k.dropdownAdapter=j.Decorate(k.dropdownAdapter,B)),null!=k.dropdownCssClass||null!=k.dropdownCss||null!=k.adaptDropdownCssClass){var E=b(k.amdBase+"compat/dropdownCss");k.dropdownAdapter=j.Decorate(k.dropdownAdapter,E)}k.dropdownAdapter=j.Decorate(k.dropdownAdapter,y)}if(null==k.selectionAdapter){if(k.multiple?k.selectionAdapter=e:k.selectionAdapter=d,null!=k.placeholder&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,f)),k.allowClear&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,g)),k.multiple&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,h)),null!=k.containerCssClass||null!=k.containerCss||null!=k.adaptContainerCssClass){var F=b(k.amdBase+"compat/containerCss");k.selectionAdapter=j.Decorate(k.selectionAdapter,F)}k.selectionAdapter=j.Decorate(k.selectionAdapter,i)}k.language=this._resolveLanguage(k.language),k.language.push("en");for(var G=[],H=0;H<k.language.length;H++){var I=k.language[H];-1===G.indexOf(I)&&G.push(I)}return k.language=G,k.translations=this._processTranslations(k.language,k.debug),k},D.prototype.reset=function(){function b(a){return a.replace(/[^\u0000-\u007E]/g,function(a){return l[a]||a})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:{},matcher:function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&0<e.children.length){for(var f=a.extend(!0,{},e),g=e.children.length-1;0<=g;g--)null==c(d,e.children[g])&&f.children.splice(g,1);return 0<f.children.length?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return-1<h.indexOf(i)?e:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.applyFromElement=function(a,b){var c=a.language,d=this.defaults.language,e=b.prop("lang"),f=b.closest("[lang]").prop("lang"),g=Array.prototype.concat.call(this._resolveLanguage(e),this._resolveLanguage(c),this._resolveLanguage(d),this._resolveLanguage(f));return a.language=g,a},D.prototype._resolveLanguage=function(b){if(!b)return[];if(a.isEmptyObject(b))return[];if(a.isPlainObject(b))return[b];var c;c=a.isArray(b)?b:[b];for(var d=[],e=0;e<c.length;e++)if(d.push(c[e]),"string"==typeof c[e]&&0<c[e].indexOf("-")){var f=c[e].split("-")[0];d.push(f)}return d},D.prototype._processTranslations=function(b,c){for(var d=new k,e=0;e<b.length;e++){var f=new k,g=b[e];if("string"==typeof g)try{f=k.loadPath(g)}catch(a){try{g=this.defaults.amdLanguageBase+g,f=k.loadPath(g)}catch(a){c&&window.console&&console.warn&&console.warn('Select2: The language file for "'+g+'" could not be automatically loaded. A fallback will be used instead.')}}else f=a.isPlainObject(g)?new k(g):g;d.extend(f)}return d},D.prototype.set=function(b,c){var d={};d[a.camelCase(b)]=c;var e=j._convertData(d);a.extend(!0,this.defaults,e)},new D}),i.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),null!=e&&(this.options=c.applyFromElement(this.options,e)),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){function c(a,b){return b.toUpperCase()}var e=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),d.GetData(a[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));for(var f={},g=0;g<a[0].attributes.length;g++){var h=a[0].attributes[g].name,i="data-";if(h.substr(0,i.length)==i){var j=h.substring(i.length),k=d.GetData(a[0],j);f[j.replace(/-([a-z])/g,c)]=k}}b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset&&(f=b.extend(!0,{},a[0].dataset,f));var l=b.extend(!0,{},d.GetData(a[0]),f);for(var m in l=d._convertData(l))-1<b.inArray(m,e)||(b.isPlainObject(this.options[m])?b.extend(this.options[m],l[m]):this.options[m]=l[m]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),i.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){return"select2-"+(null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"!=b)return"computedstyle"!=b?b:window.getComputedStyle(a[0]).width;var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,"").match(c);if(null!==j&&1<=j.length)return j[1]}return null},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var a=this;this.$element.on("change.select2",function(){a.dataAdapter.current(function(b){a.trigger("selection:update",{data:b})})}),this.$element.on("focus.select2",function(b){a.trigger("focus",b)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var b=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=b?(this._observer=new b(function(b){a._syncA(),a._syncS(null,b)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",a._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",a._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",a._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(b),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._isChangeMutation=function(b,c){var d=!1,e=this;if(!b||!b.target||"OPTION"===b.target.nodeName||"OPTGROUP"===b.target.nodeName){if(c)if(c.addedNodes&&0<c.addedNodes.length)for(var f=0;f<c.addedNodes.length;f++)c.addedNodes[f].selected&&(d=!0);else c.removedNodes&&0<c.removedNodes.length?d=!0:a.isArray(c)&&a.each(c,function(a,b){if(e._isChangeMutation(a,b))return!(d=!0)});else d=!0;return d}},e.prototype._syncSubtree=function(a,b){var c=this._isChangeMutation(a,b),d=this;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},e.prototype.close=function(a){this.isOpen()&&this.trigger("close",{originalEvent:a})},e.prototype.isEnabled=function(){return!this.isDisabled()},e.prototype.isDisabled=function(){return this.options.get("disabled")},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("input").trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,
9
- this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(b[0],"element",this.$element),b},e}),i.define("select2/compat/utils",["jquery"],function(a){return{syncCssClasses:function(b,c,d){var e,f,g=[];(e=a.trim(b.attr("class")))&&a((e=""+e).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)}),(e=a.trim(c.attr("class")))&&a((e=""+e).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(f=d(this))&&g.push(f)}),b.attr("class",g.join(" "))}}}),i.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),i.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),i.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;this._isInitialized?b.call(this,c):this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),i.define("select2/compat/inputData",["jquery","../utils"],function(a,b){function c(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return c.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},c.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("input").trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("input").trigger("change")},c.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("input").trigger("change")})},c.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},c.prototype.addOptions=function(c,d){var e=a.map(d,function(a){return b.GetData(a[0],"data")});this._currentData.push.apply(this._currentData,e)},c}),i.define("select2/compat/matcher",["jquery"],function(a){return function(b){return function(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;0<=f;f--){var g=d.children[f];b(c.term,g.text,g)||e.children.splice(f,1)}if(0<e.children.length)return e}return b(c.term,d.text,d)?e:null}}}),i.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c,this.options.get("query").call(null,b)},a}),i.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){c.find(".dropdown-wrapper").append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),i.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c),this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(a){a.stopPropagation()})},a}),i.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c),this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(a){a.stopPropagation()})},a}),y=function(a){function b(b){var g,h=b||window.event,j=i.call(arguments,1),l=0,m=0,n=0,o=0,p=0;if((b=a.event.fix(h)).type="mousewheel","detail"in h&&(n=-1*h.detail),"wheelDelta"in h&&(n=h.wheelDelta),"wheelDeltaY"in h&&(n=h.wheelDeltaY),"wheelDeltaX"in h&&(m=-1*h.wheelDeltaX),"axis"in h&&h.axis===h.HORIZONTAL_AXIS&&(m=-1*n,n=0),l=0===n?m:n,"deltaY"in h&&(l=n=-1*h.deltaY),"deltaX"in h&&(m=h.deltaX,0===n&&(l=-1*m)),0!==n||0!==m){if(1===h.deltaMode){var q=a.data(this,"mousewheel-line-height");l*=q,n*=q,m*=q}else if(2===h.deltaMode){var r=a.data(this,"mousewheel-page-height");l*=r,n*=r,m*=r}if(g=Math.max(Math.abs(n),Math.abs(m)),(!f||g<f)&&d(h,f=g)&&(f/=40),d(h,g)&&(l/=40,m/=40,n/=40),l=Math[1<=l?"floor":"ceil"](l/f),m=Math[1<=m?"floor":"ceil"](m/f),n=Math[1<=n?"floor":"ceil"](n/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=m,b.deltaY=n,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,j.unshift(b,l,m,n),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,j)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120==0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})},"function"==typeof i.define&&i.define.amd?i.define("jquery-mousewheel",["jquery"],y):"object"==typeof exports?module.exports=y:y(a),i.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(a,b,c,d,e){if(null==a.fn.select2){var f=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"!=typeof b)throw new Error("Invalid arguments for Select2: "+b);var d,g=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=e.GetData(this,"select2");null==a&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=a[b].apply(a,g)}),-1<a.inArray(b,f)?this:d}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:i.define,require:i.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}),!function(a){"undefined"!=typeof jQuery&&jQuery||"function"!=typeof define||!define.amd?"undefined"!=typeof jQuery&&jQuery||"object"!=typeof exports?a(jQuery,document,window,navigator):a(require("jquery"),document,window,navigator):define(["jquery"],function(b){return a(b,document,window,navigator)})}(function(a,b,c,d,e){"use strict";function f(d,f,g){this.VERSION="2.3.1",this.input=d,this.plugin_count=g,this.current_plugin=0,this.calc_count=0,this.update_tm=0,this.old_from=0,this.old_to=0,this.old_min_interval=null,this.raf_id=null,this.dragging=!1,this.force_redraw=!1,this.no_diapason=!1,this.has_tab_index=!0,this.is_key=!1,this.is_update=!1,this.is_start=!0,this.is_finish=!1,this.is_active=!1,this.is_resize=!1,this.is_click=!1,f=f||{},this.$cache={win:a(c),body:a(b.body),input:a(d),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var h,i,j,k=this.$cache.input,l=k.prop("value");for(j in h={skin:"flat",type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null},"INPUT"!==k[0].nodeName&&console&&console.warn&&console.warn("Base element should be <input>!",k[0]),(i={skin:k.data("skin"),type:k.data("type"),min:k.data("min"),max:k.data("max"),from:k.data("from"),to:k.data("to"),step:k.data("step"),min_interval:k.data("minInterval"),max_interval:k.data("maxInterval"),drag_interval:k.data("dragInterval"),values:k.data("values"),from_fixed:k.data("fromFixed"),from_min:k.data("fromMin"),from_max:k.data("fromMax"),from_shadow:k.data("fromShadow"),to_fixed:k.data("toFixed"),to_min:k.data("toMin"),to_max:k.data("toMax"),to_shadow:k.data("toShadow"),prettify_enabled:k.data("prettifyEnabled"),prettify_separator:k.data("prettifySeparator"),force_edges:k.data("forceEdges"),keyboard:k.data("keyboard"),grid:k.data("grid"),grid_margin:k.data("gridMargin"),grid_num:k.data("gridNum"),grid_snap:k.data("gridSnap"),hide_min_max:k.data("hideMinMax"),hide_from_to:k.data("hideFromTo"),prefix:k.data("prefix"),postfix:k.data("postfix"),max_postfix:k.data("maxPostfix"),decorate_both:k.data("decorateBoth"),values_separator:k.data("valuesSeparator"),input_values_separator:k.data("inputValuesSeparator"),disable:k.data("disable"),block:k.data("block"),extra_classes:k.data("extraClasses")}).values=i.values&&i.values.split(","),i)i.hasOwnProperty(j)&&(i[j]!==e&&""!==i[j]||delete i[j]);l!==e&&""!==l&&((l=l.split(i.input_values_separator||f.input_values_separator||";"))[0]&&l[0]==+l[0]&&(l[0]=+l[0]),l[1]&&l[1]==+l[1]&&(l[1]=+l[1]),f&&f.values&&f.values.length?(h.from=l[0]&&f.values.indexOf(l[0]),h.to=l[1]&&f.values.indexOf(l[1])):(h.from=l[0]&&+l[0],h.to=l[1]&&+l[1])),a.extend(h,f),a.extend(h,i),this.options=h,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()}var g,h,i=0,j=(g=d.userAgent,h=/msie\s\d+/i,0<g.search(h)&&h.exec(g).toString().split(" ")[1]<9&&(a("html").addClass("lt-ie9"),!0));Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=[].slice;if("function"!=typeof b)throw new TypeError;var d=c.call(arguments,1),e=function(){if(this instanceof e){var f=function(){};f.prototype=b.prototype;var g=new f,h=b.apply(g,d.concat(c.call(arguments)));return Object(h)===h?h:g}return b.apply(a,d.concat(c.call(arguments)))};return e}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0==e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),e<=f)return-1;for(c=Math.max(0<=f?f:e-Math.abs(f),0);c<e;){if(c in d&&d[c]===a)return c;c++}return-1}),f.prototype={init:function(a){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),a?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var a='<span class="irs irs--'+this.options.skin+" js-irs-"+this.plugin_count+" "+this.options.extra_classes+'"></span>';this.$cache.input.before(a),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('<span class="irs"><span class="irs-line" tabindex="0"></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span>'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append('<span class="irs-bar irs-bar--single"></span><span class="irs-shadow shadow-single"></span><span class="irs-handle single"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append('<span class="irs-bar"></span><span class="irs-shadow shadow-from"></span><span class="irs-shadow shadow-to"></span><span class="irs-handle from"><i></i><i></i><i></i></span><span class="irs-handle to"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var a=this.options.min,b=this.options.max,c=this.options.from,d=this.options.to;a<c&&d===b?this.$cache.s_from.addClass("type_last"):d<b&&this.$cache.s_to.addClass("type_last")},changeLevel:function(a){switch(a){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake),this.$cache.s_single.addClass("state_hover");break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.$cache.s_from.addClass("state_hover"),this.$cache.s_from.addClass("type_last"),this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake),this.$cache.s_to.addClass("state_hover"),this.$cache.s_to.addClass("type_last"),this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append('<span class="irs-disable-mask"></span>'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),j&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),j&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(a){var b,c;this.target||(b=(c="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,b+=c.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:b}))},pointerMove:function(a){if(this.dragging){var b=a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX;this.coords.x_pointer=b-this.coords.x_gap,this.calc()}},pointerUp:function(b){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,j&&a("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(a.contains(this.$cache.cont[0],b.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(b,c){c.preventDefault();var d=c.pageX||c.originalEvent.touches&&c.originalEvent.touches[0].pageX;2!==c.button&&("both"===b&&this.setTempMinInterval(),b=b||this.target||"from",this.current_plugin=this.plugin_count,this.target=b,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=d-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(b),j&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(a,b){b.preventDefault();var c=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(c-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey||b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,c=(this.options.max-this.options.min)/100;c=this.options.step/c,a?b+=c:b-=c,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*b),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var a=this._prettify(this.options.min),b=this._prettify(this.options.max);this.result.min_pretty=a,this.result.max_pretty=b,this.$cache.min.html(this.decorate(a,this.options.min)),this.$cache.max.html(this.decorate(b,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var a=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=a},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(a){if(this.options&&(this.calc_count++,10!==this.calc_count&&!a||(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var b=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,b=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,b=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(b)),this.target){case"base":var c=(this.options.max-this.options.min)/100,d=(this.result.from-this.options.min)/c,e=(this.result.to-this.options.min)/c;this.coords.p_single_real=this.toFixed(d),this.coords.p_from_real=this.toFixed(d),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(b),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(b),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(b),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;b=this.toFixed(b+.001*this.coords.p_handle),this.coords.p_from_real=this.convertToRealPercent(b)-this.coords.p_gap_left,this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.convertToRealPercent(b)+this.coords.p_gap_right,this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both_one":if(this.options.from_fixed||this.options.to_fixed)break;var f=this.convertToRealPercent(b),g=this.result.from_percent,h=this.result.to_percent-g,i=h/2,j=f-i,k=f+i;j<0&&(k=(j=0)+h),100<k&&(j=(k=100)-h),this.coords.p_from_real=this.calcWithStep(j),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(k),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(a){return a/(100-this.coords.p_handle)*100},convertToFakePercent:function(a){return a/100*(100-this.coords.p_handle)},getHandleX:function(){var a=100-this.coords.p_handle,b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return b<0?b=0:a<b&&(b=a),
10
- b},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(a){return"single"===this.options.type?"single":this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2<=a?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),this.coords.w_rs===this.coords.w_rs_old&&!this.force_redraw||(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.bar[0].style.left=0,this.$cache.bar[0].style.width=this.coords.p_bar_w+this.coords.p_bar_x+"%",this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",this.old_from===this.result.from&&!this.force_redraw||(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),this.old_to===this.result.to&&!this.force_redraw||(this.$cache.to[0].style.left=this.labels.p_to_left+"%")),this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var a,b,c,d,e,f=this.options.values.length,g=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)a=f?this.decorate(g[this.result.from]):(d=this._prettify(this.result.from),this.decorate(d,this.result.from)),this.$cache.single.html(a),this.calcLabels(),this.labels.p_single_left<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{c=f?(this.options.decorate_both?(a=this.decorate(g[this.result.from]),a+=this.options.values_separator,a+=this.decorate(g[this.result.to])):a=this.decorate(g[this.result.from]+this.options.values_separator+g[this.result.to]),b=this.decorate(g[this.result.from]),this.decorate(g[this.result.to])):(d=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(a=this.decorate(d,this.result.from),a+=this.options.values_separator,a+=this.decorate(e,this.result.to)):a=this.decorate(d+this.options.values_separator+e,this.result.to),b=this.decorate(d,this.result.from),this.decorate(e,this.result.to)),this.$cache.single.html(a),this.$cache.from.html(b),this.$cache.to.html(c),this.calcLabels();var h=Math.min(this.labels.p_single_left,this.labels.p_from_left),i=this.labels.p_single_left+this.labels.p_single_fake,j=this.labels.p_to_left+this.labels.p_to_fake,k=Math.max(i,j);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",k=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",j):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(i,j))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),h<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",k>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var a,b,c,d,e=this.options,f=this.$cache,g="number"==typeof e.from_min&&!isNaN(e.from_min),h="number"==typeof e.from_max&&!isNaN(e.from_max),i="number"==typeof e.to_min&&!isNaN(e.to_min),j="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(g||h)?(a=this.convertToPercent(g?e.from_min:e.min),b=this.convertToPercent(h?e.from_max:e.max)-a,a=this.toFixed(a-this.coords.p_handle/100*a),b=this.toFixed(b-this.coords.p_handle/100*b),a+=this.coords.p_handle/2,f.shad_single[0].style.display="block",f.shad_single[0].style.left=a+"%",f.shad_single[0].style.width=b+"%"):f.shad_single[0].style.display="none":(e.from_shadow&&(g||h)?(a=this.convertToPercent(g?e.from_min:e.min),b=this.convertToPercent(h?e.from_max:e.max)-a,a=this.toFixed(a-this.coords.p_handle/100*a),b=this.toFixed(b-this.coords.p_handle/100*b),a+=this.coords.p_handle/2,f.shad_from[0].style.display="block",f.shad_from[0].style.left=a+"%",f.shad_from[0].style.width=b+"%"):f.shad_from[0].style.display="none",e.to_shadow&&(i||j)?(c=this.convertToPercent(i?e.to_min:e.min),d=this.convertToPercent(j?e.to_max:e.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/100*d),c+=this.coords.p_handle/2,f.shad_to[0].style.display="block",f.shad_to[0].style.left=c+"%",f.shad_to[0].style.width=d+"%"):f.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(a,b){var c,d=this.options.max-this.options.min,e=d/100;return d?(c=(b?a:a-this.options.min)/e,this.toFixed(c)):(this.no_diapason=!0,0)},convertToValue:function(a){var b,c,d=this.options.min,e=this.options.max,f=d.toString().split(".")[1],g=e.toString().split(".")[1],h=0,i=0;if(0===a)return this.options.min;if(100===a)return this.options.max;f&&(h=b=f.length),g&&(h=c=g.length),b&&c&&(h=c<=b?b:c),d<0&&(d=+(d+(i=Math.abs(d))).toFixed(h),e=+(e+i).toFixed(h));var j,k=(e-d)/100*a+d,l=this.options.step.toString().split(".")[1];return k=l?+k.toFixed(l.length):(k/=this.options.step,+(k*=this.options.step).toFixed(0)),i&&(k-=i),(j=l?+k.toFixed(l.length):this.toFixed(k))<this.options.min?j=this.options.min:j>this.options.max&&(j=this.options.max),j},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)*this.coords.p_step;return 100<b&&(b=100),100===a&&(b=100),this.toFixed(b)},checkMinInterval:function(a,b,c){var d,e,f=this.options;return f.min_interval?(d=this.convertToValue(a),e=this.convertToValue(b),"from"===c?e-d<f.min_interval&&(d=e-f.min_interval):d-e<f.min_interval&&(d=e+f.min_interval),this.convertToPercent(d)):a},checkMaxInterval:function(a,b,c){var d,e,f=this.options;return f.max_interval?(d=this.convertToValue(a),e=this.convertToValue(b),"from"===c?e-d>f.max_interval&&(d=e-f.max_interval):d-e>f.max_interval&&(d=e+f.max_interval),this.convertToPercent(d)):a},checkDiapason:function(a,b,c){var d=this.convertToValue(a),e=this.options;return"number"!=typeof b&&(b=e.min),"number"!=typeof c&&(c=e.max),d<b&&(d=b),c<d&&(d=c),this.convertToPercent(d)},toFixed:function(a){return+(a=a.toFixed(20))},_prettify:function(a){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(a,b){return this.options.force_edges&&(a<0?a=0:100-b<a&&(a=100-b)),this.toFixed(a)},validate:function(){var a,b,c=this.options,d=this.result,e=c.values,f=e.length;if("string"==typeof c.min&&(c.min=+c.min),"string"==typeof c.max&&(c.max=+c.max),"string"==typeof c.from&&(c.from=+c.from),"string"==typeof c.to&&(c.to=+c.to),"string"==typeof c.step&&(c.step=+c.step),"string"==typeof c.from_min&&(c.from_min=+c.from_min),"string"==typeof c.from_max&&(c.from_max=+c.from_max),"string"==typeof c.to_min&&(c.to_min=+c.to_min),"string"==typeof c.to_max&&(c.to_max=+c.to_max),"string"==typeof c.grid_num&&(c.grid_num=+c.grid_num),c.max<c.min&&(c.max=c.min),f)for(c.p_values=[],c.min=0,c.max=f-1,c.step=1,c.grid_num=c.max,c.grid_snap=!0,b=0;b<f;b++)a=+e[b],a=isNaN(a)?e[b]:(e[b]=a,this._prettify(a)),c.p_values.push(a);"number"==typeof c.from&&!isNaN(c.from)||(c.from=c.min),"number"==typeof c.to&&!isNaN(c.to)||(c.to=c.max),"single"===c.type?(c.from<c.min&&(c.from=c.min),c.from>c.max&&(c.from=c.max)):(c.from<c.min&&(c.from=c.min),c.from>c.max&&(c.from=c.max),c.to<c.min&&(c.to=c.min),c.to>c.max&&(c.to=c.max),this.update_check.from&&(this.update_check.from!==c.from&&c.from>c.to&&(c.from=c.to),this.update_check.to!==c.to&&c.to<c.from&&(c.to=c.from)),c.from>c.to&&(c.from=c.to),c.to<c.from&&(c.to=c.from)),("number"!=typeof c.step||isNaN(c.step)||!c.step||c.step<0)&&(c.step=1),"number"==typeof c.from_min&&c.from<c.from_min&&(c.from=c.from_min),"number"==typeof c.from_max&&c.from>c.from_max&&(c.from=c.from_max),"number"==typeof c.to_min&&c.to<c.to_min&&(c.to=c.to_min),"number"==typeof c.to_max&&c.from>c.to_max&&(c.to=c.to_max),d&&(d.min!==c.min&&(d.min=c.min),d.max!==c.max&&(d.max=c.max),(d.from<d.min||d.from>d.max)&&(d.from=c.from),(d.to<d.min||d.to>d.max)&&(d.to=c.to)),("number"!=typeof c.min_interval||isNaN(c.min_interval)||!c.min_interval||c.min_interval<0)&&(c.min_interval=0),("number"!=typeof c.max_interval||isNaN(c.max_interval)||!c.max_interval||c.max_interval<0)&&(c.max_interval=0),c.min_interval&&c.min_interval>c.max-c.min&&(c.min_interval=c.max-c.min),c.max_interval&&c.max_interval>c.max-c.min&&(c.max_interval=c.max-c.min)},decorate:function(a,b){var c="",d=this.options;return d.prefix&&(c+=d.prefix),c+=a,d.max_postfix&&(d.values.length&&a===d.p_values[d.max]?(c+=d.max_postfix,d.postfix&&(c+=" ")):b===d.max&&(c+=d.max_postfix,d.postfix&&(c+=" "))),d.postfix&&(c+=d.postfix),c},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var a,b,c,d,e,f,g=this.options,h=g.max-g.min,i=g.grid_num,j=0,k=4,l="";for(this.calcGridMargin(),g.grid_snap&&(i=h/g.step),50<i&&(i=50),c=this.toFixed(100/i),4<i&&(k=3),7<i&&(k=2),14<i&&(k=1),28<i&&(k=0),a=0;a<i+1;a++){for(d=k,100<(j=this.toFixed(c*a))&&(j=100),e=((this.coords.big[a]=j)-c*(a-1))/(d+1),b=1;b<=d&&0!==j;b++)l+='<span class="irs-grid-pol small" style="left: '+this.toFixed(j-e*b)+'%"></span>';l+='<span class="irs-grid-pol" style="left: '+j+'%"></span>',f=this.convertToValue(j),l+='<span class="irs-grid-text js-grid-text-'+a+'" style="left: '+j+'%">'+(f=g.values.length?g.p_values[f]:this._prettify(f))+"</span>"}this.coords.big_num=Math.ceil(i+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(l),this.cacheGridLabels()}},cacheGridLabels:function(){var a,b,c=this.coords.big_num;for(b=0;b<c;b++)a=this.$cache.grid.find(".js-grid-text-"+b),this.$cache.grid_labels.push(a);this.calcGridLabels()},calcGridLabels:function(){var a,b,c=[],d=[],e=this.coords.big_num;for(a=0;a<e;a++)this.coords.big_w[a]=this.$cache.grid_labels[a].outerWidth(!1),this.coords.big_p[a]=this.toFixed(this.coords.big_w[a]/this.coords.w_rs*100),this.coords.big_x[a]=this.toFixed(this.coords.big_p[a]/2),c[a]=this.toFixed(this.coords.big[a]-this.coords.big_x[a]),d[a]=this.toFixed(c[a]+this.coords.big_p[a]);for(this.options.force_edges&&(c[0]<-this.coords.grid_gap&&(c[0]=-this.coords.grid_gap,d[0]=this.toFixed(c[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),d[e-1]>100+this.coords.grid_gap&&(d[e-1]=100+this.coords.grid_gap,c[e-1]=this.toFixed(d[e-1]-this.coords.big_p[e-1]),this.coords.big_x[e-1]=this.toFixed(this.coords.big_p[e-1]-this.coords.grid_gap))),this.calcGridCollision(2,c,d),this.calcGridCollision(4,c,d),a=0;a<e;a++)b=this.$cache.grid_labels[a][0],this.coords.big_x[a]!==Number.POSITIVE_INFINITY&&(b.style.marginLeft=-this.coords.big_x[a]+"%")},calcGridCollision:function(a,b,c){var d,e,f,g=this.coords.big_num;for(d=0;d<g&&!(g<=(e=d+a/2));d+=a)f=this.$cache.grid_labels[e][0],c[d]<=b[e]?f.style.visibility="visible":f.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(b){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=a.extend(this.options,b),this.validate(),this.updateResult(b),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),a.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},a.fn.ionRangeSlider=function(b){return this.each(function(){a.data(this,"ionRangeSlider")||a.data(this,"ionRangeSlider",new f(this,b,i++))})},function(){for(var a=0,b=["ms","moz","webkit","o"],d=0;d<b.length&&!c.requestAnimationFrame;++d)c.requestAnimationFrame=c[b[d]+"RequestAnimationFrame"],c.cancelAnimationFrame=c[b[d]+"CancelAnimationFrame"]||c[b[d]+"CancelRequestAnimationFrame"];c.requestAnimationFrame||(c.requestAnimationFrame=function(b,d){var e=(new Date).getTime(),f=Math.max(0,16-(e-a)),g=c.setTimeout(function(){b(e+f)},f);return a=e+f,g}),c.cancelAnimationFrame||(c.cancelAnimationFrame=function(a){clearTimeout(a)})}()});
1
+ function berocket_make_args_array(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b}function berocket_apply_filters(a,b){if("undefined"!=typeof berocket_filters[a]){var c=berocket_make_args_array(arguments);c.splice(0,1),jQuery.each(berocket_filters[a],function(a,d){b=d.callback.apply(null,c),c[0]=b})}return b}function berocket_do_action(a){if("undefined"!=typeof berocket_filters[a]){var b=berocket_make_args_array(arguments);b.splice(0,1),jQuery.each(berocket_filters[a],function(a,c){c.callback.apply(null,b)})}}function berocket_throw_error(a){var b="berocket_throw_error";if(error_exist=!0,"undefined"!=typeof berocket_filters[b]){for(var c,d=[error_exist];c<arguments.length;c++)d.push(arguments[c]);jQuery.each(berocket_filters[b],function(a,b){if(error_exist=b.callback.apply(null,d),d[0]=error_exist,!error_exist)return!1})}return error_exist}function berocket_add_filter(a,b,c){"undefined"==typeof c&&(c=10),"undefined"==typeof berocket_filters[a]&&(berocket_filters[a]=[]);var d=!1;jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b&&(d=!0)}),d||(berocket_filters[a].push({callback:b,priority:c}),berocket_filters[a]=berocket_sort_by_priority(berocket_filters[a]))}function berocket_remove_filter(a,b,c){if("undefined"==typeof c&&(c=10),"undefined"!=typeof berocket_filters[a]){var d=[];jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b||d.push(e)}),berocket_filters[a]=berocket_sort_by_priority(d)}}function berocket_sort_by_priority(a){return Array.isArray(a)&&a.sort(function(a,b){return a.priority>b.priority?1:a.priority<b.priority?-1:0}),a}function berocket_format_number(a,b){"undefined"==typeof b&&(b=the_ajax_script.number_style);var c=a.toFixed(b[2]);c=c.toString();var d=c.split("."),e=d[0];return c.indexOf(".")!=-1&&(d=d[1]),e=e.replace(/\d(?=(?:\d{3})+(?:$))/g,function(a,c){return a+b[0]}),c.indexOf(".")!=-1&&(e=e+b[1]+d),e}function braapf_grab_all_init(){braapf_grab_all()}function braapf_selected_filters_area_set_init(){braapf_selected_filters_area_set()}function braapf_filtered_filters_set(){braapf_filtered_filters=braapf_selected_filters.slice(),berocket_do_action("braapf_init_filtered_set",braapf_filtered_filters)}var berocket_filters={};berocket_add_filter("compat_filters_result_single",function(a){return"object"==typeof a&&"string"==typeof a.taxonomy&&"pa_"==a.taxonomy.substr(0,3)&&(a.taxonomy=a.taxonomy.substr(3)),a}),jQuery(document).trigger("berocket_hooks_ready");var braapf_filter_blocked=!1,braapf_selected_filters=[],braapf_filtered_filters=[],braapf_filters_var,braapf_ajax_request,braapf_checkbox_same,braapf_update_products,braapf_grab_all,braapf_grab_single,braapf_compact_filters,braapf_compat_filters_to_string,braapf_build_url_from_urldata,braapf_apply_additional_filter_data,braapf_glue_by_operator,braapf_ajax_load_from_url,braapf_ajax_load_from_url_request,braapf_init_load,braapf_remove_pages_from_url_data,braapf_filter_products_by_url,braapf_get_current_url_data,braapf_reset_buttons_hide,bapf_universal_theme_compatibility,braapf_disable_ajax_loading,braapf_close_tippy;!function(a){function b(a){return berocket_remove_filter("ajax_load_from_url_beforeSend",b),a.setRequestHeader("X-Braapfdisable","1"),a}function c(a){return a.setRequestHeader("X-Braapf","1"),a}a(document).on("change",".bapf_sfilter.bapf_ckbox input[type=checkbox]",function(){var b=a(this).val(),c=a(this).parents(".bapf_sfilter").data("taxonomy"),d=a(this).prop("checked");braapf_checkbox_same(c,b,d),berocket_apply_filters("input_ckbox_changed",this,c,b,d);var e={element:"#"+a(this).attr("id"),parent:1,find:!1};berocket_apply_filters("filter_changed_element",e,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_checkbox_same=function(b,c,d){a('.bapf_sfilter[data-taxonomy="'+b+'"] input[value="'+c+'"]').prop("checked",d),a('.bapf_sfilter[data-taxonomy="'+b+'"]').length<a('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+b+'"]').length&&berocket_throw_error("multiple_filters_for_same_taxonomy",b)},a(document).on("braapf_unselect",".bapf_ckbox",function(b,c){if("undefined"==typeof c&&(c=!1),0==c)var d=a(this).find("input[type=checkbox]");else var d=a(this).find('input[value="'+c.value+'"]');if(d.length>0){var e=d.val(),f=a(this).data("taxonomy");d.prop("checked",!1),braapf_checkbox_same(f,e,!1)}}),a(document).on("braapf_unselect_all",".bapf_ckbox",function(b,c){a(this).trigger("braapf_unselect",!1)}),a(document).on("berocket_filters_document_ready",function(){a(".bapf_ckbox input[type=checkbox]:checked").closest("li").parents("li").trigger("bapf_ochild")}),a(document).on("click",".berocket_aapf_widget_update_button, .bapf_update",function(b){b.preventDefault(),berocket_do_action("update_products","update",a(this))}),a(document).on("click",".berocket_aapf_reset_button, .bapf_reset",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),braapf_reset_buttons_hide=function(){berocket_apply_filters("bapf_rst_nofltr_hide","undefined"==typeof braapf_filtered_filters||braapf_filtered_filters.length<=0)?a(".bapf_rst_nofltr").hide():a(".bapf_rst_nofltr").show();var b=!1;"undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0&&a.each(braapf_filtered_filters,function(a,c){if(c.values.length>0)return b=!0,!1}),berocket_apply_filters("bapf_rst_sel_show",b)?a(".bapf_rst_sel").show():a(".bapf_rst_sel").hide()},berocket_add_filter("braapf_init",braapf_reset_buttons_hide,1500),berocket_add_filter("braapf_init_filtered_set",braapf_reset_buttons_hide,1500);var d=the_ajax_script.pagination_class;d=d.replace(","," a,"),d=berocket_apply_filters("pagination_links_a_tags",d+" a",the_ajax_script.pagination_class),!the_ajax_script.disable_ajax_loading&&the_ajax_script.pagination_ajax&&a(document).on("click",d,function(c){c.preventDefault();var d=a(this).attr("href");d=berocket_apply_filters("pagination_href_from_clicked_a",decodeURI(d),a(this)),braapf_change_url_history_api(d,{replace:the_ajax_script.seo_friendly_urls}),berocket_add_filter("ajax_load_from_url_beforeSend",b),braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_pagination",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_init_load,braapf_update_data_from_current]},d))}),!the_ajax_script.disable_ajax_loading&&the_ajax_script.control_sorting&&a(document).on("submit",the_ajax_script.ordering_class,function(b){b.preventDefault();var c=braapf_get_current_url_data();if(c=braapf_remove_pages_from_url_data(c),Array.isArray(c.queryargs)){var d=[];a.each(c.queryargs,function(a,b){"orderby"!=b.name&&d.push(b)}),c.queryargs=d}else c.queryargs=[];var e=a(this).serializeArray();Array.isArray(e)&&a.each(e,function(a,b){"paged"==b.name?c.page=parseInt(b.value):"orderby"==b.name?the_ajax_script.default_sorting!=b.value&&c.queryargs.push(b):c.queryargs.push(b)});var f=braapf_build_url_from_urldata(c);braapf_filter_products_by_url(f)}),braapf_get_url_with_filters_selected=function(){braapf_grab_all();var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split),d=braapf_get_current_url_data();d.filter=c,d=braapf_remove_pages_from_url_data(d),d=braapf_apply_additional_filter_data(d);var e=braapf_build_url_from_urldata(d);return e},braapf_update_products=function(b,c){"undefined"==typeof b&&(b="filter"),"undefined"==typeof c&&(c=!1),b=berocket_apply_filters("before_update_products_context",b,c);var d=berocket_apply_filters("before_update_products_context_url_filtered",braapf_get_url_with_filters_selected(),b,c);berocket_apply_filters("apply_filters_to_page",0==a(".berocket_aapf_widget_update_button:visible, .bapf_update:visible").length||"filter"!=b,b,c,d)?(braapf_selected_filters_area_set(),braapf_filter_products_by_url(d)):berocket_apply_filters("apply_filters_to_page_partial",!1,b,c,d)&&braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_filters_partial",{done:[braapf_replace_each_filter,braapf_init_load]},d,"partial"),"partial")},braapf_filter_products_by_url=function(b){berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,b)?location.href=b:(braapf_change_url_history_api(b,{replace:the_ajax_script.seo_friendly_urls}),braapf_ajax_load_from_url(b,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},b,"default")))},braapf_update_data_from_current=function(){braapf_grab_all();braapf_compact_filters()},braapf_update_url_history_api_from_current=function(){the_ajax_script.seo_friendly_urls&&(url_filtered=braapf_get_url_with_filters_selected(),history.replaceState(history.state,"BeRocket Rules",url_filtered))},braapf_grab_all=function(b){"undefined"==typeof b&&(b=!1);var c=berocket_apply_filters("before_grab_all_filters",[],b);if(b===!1)var d=a(".bapf_sfilter");else var d=a(b).find(".bapf_sfilter");return d.each(function(){var a=braapf_grab_single(this,c);a!==!1&&c.push(a)}),c=berocket_apply_filters("grab_all_filters",c,b),b===!1&&(braapf_selected_filters=c),c},braapf_grab_single=function(b,c,d){"undefined"==typeof d&&(d=!1),b=a(b);var e=!1,f=!1,g=b.data("taxonomy");if("undefined"==typeof g||!g)return berocket_apply_filters("grab_single_filter_taxonomy_undefined",e,b,c);if(a.each(c,function(a,b){b.taxonomy==g&&(f=!0)}),!berocket_apply_filters("grab_single_filter_exist",f,b,c)){if(e=berocket_apply_filters("grab_single_filter",e,b,c),e!==!1)return e;var h=b.data("op"),i=b.data("name");"undefined"==typeof i&&(i="");var j=braapf_glue_by_operator(h),k=[],l=[];if(d)var m=b;else var m=a(".bapf_sfilter[data-taxonomy="+g+"]");m.find("input:checked:not(:disabled)").each(function(b,c){l.indexOf(a(this).val())==-1&&(k.push({value:a(this).val(),html:a(this).data("name")}),l.push(a(this).val()))}),e={name:i,taxonomy:g,values:k,glue:j,operator:h}}return berocket_apply_filters("grab_single_filter_default",e,b,c)},braapf_glue_by_operator=function(a){"string"!=typeof a&&(a="");var b="-";return"and"==a.toLowerCase()&&(b="+"),berocket_apply_filters("glue_by_operator",b,a)},braapf_compact_filters=function(b){"undefined"==typeof b&&(b=braapf_selected_filters);var c=[];return a.each(b,function(b,d){var e="";"undefined"!=typeof d.customValuesLine?e=d.customValuesLine:a.each(d.values,function(a,b){e.length&&(e+=d.glue),e+=b.value}),e.length&&c.push(berocket_apply_filters("compat_filters_result_single",{taxonomy:d.taxonomy,values:e},d))}),berocket_apply_filters("compat_filters_result",c,b)},braapf_compat_filters_to_string=function(b,c,d){var e="";return a.each(b,function(a,f){e.length&&(e+=d);var g=c;g=g.replace("%t%",f.taxonomy),g=g.replace("%v%",f.values),e+=berocket_apply_filters("compat_filters_to_string_single",g,f,b,c,d)}),berocket_apply_filters("compat_filters_to_string",e,b,c,d)},braapf_get_current_url_data=function(b){if("undefined"==typeof b)var c=location.href.split("#")[0].split("?")[0],d=location.search.substring(1);else{var c=b.split("#")[0].split("?")[0];if(b.split("#")[0].split("?").length>1)var d=b.split("#")[0].split("?")[1];else var d=""}var e=[],f=1,g=c.match(/\/page\/(\d+)/);return g&&"string"==typeof g[1]&&(f=parseInt(g[1]),c=c.replace(/\/page\/(\d+)/,"")),d=d.split("&"),a.each(d,function(a,b){b.length&&(d[a]=b.split("="),"paged"==d[a][0]?f=parseInt(d[a][1]):e.push({name:d[a][0],value:d[a][1]}))}),berocket_apply_filters("get_current_url_data",{baselink:c,queryargs:e,filter:"",page:f})},braapf_remove_pages_from_url_data=function(b){if(b.page=1,Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"product-page"!=b.name&&c.push(b)}),b.queryargs=c}return b},braapf_apply_additional_filter_data=function(b,c){return"undefined"==typeof c&&(c=braapf_selected_filters),a.each(c,function(a,c){b=berocket_apply_filters("apply_additional_filter_data",b,c)}),b},braapf_build_url_from_urldata=function(b,c){"undefined"==typeof c&&(c=braapf_build_url_parameters_default());var d=berocket_apply_filters("url_from_urldata_baselink",b.baselink,b,c),e="";return b.queryargs.length&&a.each(b.queryargs,function(a,b){e.length&&(e+="&"),b.name.length&&(e+=b.name+"="+b.value)}),b.page&&b.page>1&&(e.length&&(e+="&"),e+="paged="+b.page),e.length&&(e="?"+e),d=berocket_apply_filters("url_from_urldata_linkget",d+e,b,c,d,e)},braapf_build_url_parameters_default=function(){return berocket_apply_filters("build_url_parameters_default",{})},braapf_replace_current_with_new=function(b,c,d){"undefined"==typeof d&&(d={}),args={replace:!1},jQuery.extend(args,d);var e=a("<div><div>"+b+"</div></div>"),f=e.find(c),g=a(c);0!=g.length&&(f.length!=g.length&&0!=f.length&&berocket_throw_error("error_notsame_block_qty",c,f.length,g.length),0==f.length?(g.html("").addClass("braapfNotReplaced"),g.hide()):(g.each(function(b,c){"undefined"!=typeof f[b]?args.replace?a(c).replaceWith(a(f[b])):a(c).html(a(f[b]).html()).removeClass("braapfNotReplaced"):a(c).html("").addClass("braapfNotReplaced")}),g.show()))},braapf_replace_products=function(b){var c=the_ajax_script.products_holder_id;a("<div><div>"+b+"</div></div>");a(".bapf_no_products").remove(),braapf_replace_current_with_new(b,c),a(".braapfNotReplaced").filter(c).length&&a(".braapfNotReplaced").filter(c).before(a(the_ajax_script.no_products))},braapf_replace_pagination=function(b){var c=the_ajax_script.pagination_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().after(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_result_count=function(b){var c=the_ajax_script.result_count_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_orderby=function(b){var c=the_ajax_script.ordering_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_each_filter=function(b){var c=a("<div><div>"+b+"</div></div>");a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).html(c.find(".berocket_single_filter_widget_"+b).last().html()),c.find(".berocket_single_filter_widget_"+b).is(".bapf_mt_none")?a(".berocket_single_filter_widget_"+b).addClass("bapf_mt_none"):a(".berocket_single_filter_widget_"+b).removeClass("bapf_mt_none")})},braapf_change_url_history_api=function(a,b){if("undefined"!=typeof b&&b.replace){var c={BeRocket:"Rules"};history.replaceState(c,""),history.pushState(c,"",a),history.pathname=a}},berocket_apply_filters("load_products_ajax_on_popstate",!0)&&(window.onpopstate=function(b){if(null!=b.state&&"Rules"==b.state.BeRocket){var c=location.href;berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,c)?location.href=c:braapf_ajax_load_from_url(c,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_data_from_current]},c,"default"))}}),braapf_ajax_load_from_url=function(a,b,c,d){"undefined"==typeof d&&(d="default"),"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={done:[],fail:[],always:[]}),"undefined"!=typeof c.done&&Array.isArray(c.done)||(c.done=[]),"undefined"!=typeof c.fail&&Array.isArray(c.fail)||(c.fail=[]),"undefined"!=typeof c.always&&Array.isArray(c.always)||(c.always=[]),a=berocket_apply_filters("ajax_load_from_url_url",a,b,c,d),b=berocket_apply_filters("ajax_load_from_url_data",b,a,c,d),c=berocket_apply_filters("ajax_load_from_url_callback",c,a,b,d),braapf_ajax_load_from_url_request(a,b,c,d)},braapf_ajax_load_from_url_request=function(b,c,d,e){a(document).trigger("berocket_ajax_filtering_start"),"object"==typeof braapf_ajax_request&&"undefined"!=typeof braapf_ajax_request.abort&&braapf_ajax_request.abort(),braapf_ajax_request=a.ajax({method:"GET",url:b,data:c,beforeSend:function(a){a=berocket_apply_filters("ajax_load_from_url_beforeSend",a,b,c,d,e)}}).done(function(f,g,h){a(document).trigger("berocket_ajax_filtering_on_update"),f=berocket_apply_filters("ajax_load_from_url_done",f,b,c,d,e),a.each(d.done,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_done_after",f,b,c,d,e),a(document).trigger("berocket_ajax_products_loaded")}).fail(function(f,g,h){if("abort"==g)return!1;if(a(document).trigger("berocket_ajax_products_not_loaded"),f=berocket_apply_filters("ajax_load_from_url_fail",f,b,c,d,e),a.each(d.fail,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_fail_after",f,b,c,d,e),"default"==e){var i=jQuery.param(c);i&&(b=b.split("?").length>1?b+"&"+i:b+"?"+i),location.href=b}}).always(function(f,g,h){f=berocket_apply_filters("ajax_load_from_url_always",f,b,c,d,e),a.each(d.always,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_always_after",f,b,c,d,e),a(document).trigger("berocket_ajax_filtering_end")})},braapf_init_load=function(){var b=berocket_apply_filters("filter_mobile_width",767),c=berocket_apply_filters("filter_tablet_width",1024);a(window).width()<=b&&a(".bapf_sngl_hd_mobile").remove(),a(window).width()>b&&a(window).width()<=c&&a(".bapf_sngl_hd_tablet").remove(),a(window).width()>c&&a(".bapf_sngl_hd_desktop").remove(),a(".bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)").each(function(){a(this).css("max-height",a(this).data("mcs-h")).mCustomScrollbar({scrollInertia:300}).addClass("bapf_mcs_ready")}),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");berocket_apply_filters("remove_same_filters_to_prevent_errors",a(".berocket_single_filter_widget_"+b).length>1,a(this),b)&&a(".berocket_single_filter_widget_"+b).not(a(".berocket_single_filter_widget_"+b).first()).remove()}),a("body").on("click",".bapf_desci",function(a){a.stopPropagation()}),a("body").on("hover",".bapf_desci",function(a){a.stopPropagation()}),berocket_do_action("braapf_init",braapf_selected_filters),a(document).trigger("berocket_filters_first_load")},braapf_update_page_on_error=function(){berocket_apply_filters("update_page_on_error",!0)&&location.reload()},braapf_selected_filters_area_set=function(){if("undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0){var b="";a.each(braapf_filtered_filters,function(c,d){if(d.values.length>0){var e='<div class="bapf_sfa_taxonomy"><span>'+d.name+"</span>";e+="<ul>";var f="";a.each(d.values,function(a,b){f+=berocket_apply_filters("default_selected_filters_area_single",'<li><a href="#unselect_'+b.value+'" class="braapf_unselect" data-taxonomy="'+d.taxonomy+'" data-value="'+b.value+'"><i class="fa fa-times"></i>'+b.html+"</a></li>",b)}),e+=f,e+="</ul></div>",b+=berocket_apply_filters("default_selected_filters_area_single_taxonomy",e,d,f)}}),b?(a(".bapf_sfa_mt_hide").show().parent().removeClass("bapf_mt_none"),b=berocket_apply_filters("default_selected_filters_area_full_exist",'<div class="berocket_aapf_widget_selected_filter">'+b+'<ul class="bapf_sfa_unall"><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+"</a></li></ul>",b,braapf_filtered_filters)):(b=berocket_apply_filters("default_selected_filters_area_full_notexist",the_ajax_script.translate.nothing_selected,b,braapf_filtered_filters),a(".bapf_sfa_mt_hide").hide().parent().addClass("bapf_mt_none")),a(".berocket_aapf_widget_selected_area").html(b)}},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect",function(b){b.preventDefault(),a(".bapf_sfilter[data-taxonomy="+a(this).data("taxonomy")+"]").trigger("braapf_unselect",a(this).data()),berocket_do_action("update_products","reset_single",a(this))}),braapf_unselect_all=function(){braapf_grab_all(),"undefined"!=typeof braapf_selected_filters&&braapf_selected_filters.length>0&&a.each(braapf_selected_filters,function(b,c){c.values.length>0&&a(".bapf_sfilter[data-taxonomy="+c.taxonomy+"]").trigger("braapf_unselect_all",c)})},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect_all",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),berocket_add_filter("braapf_init",braapf_grab_all_init,1e3),berocket_add_filter("braapf_init",braapf_selected_filters_area_set_init,1100),berocket_add_filter("braapf_init_filtered_set",braapf_selected_filters_area_set_init,1100),braapf_reload_page_for_products_error=function(a,b){return b==the_ajax_script.products_holder_id&&braapf_update_page_on_error(),a},berocket_add_filter("ajax_load_from_url_beforeSend",c),berocket_add_filter("update_products",braapf_update_products),berocket_add_filter("error_notsame_block_qty",braapf_reload_page_for_products_error),bapf_universal_theme_compatibility=function(b){if(berocket_apply_filters("universal_theme_compatibility",!0)){a(window).trigger("resize");try{berocket_apply_filters("uncode_theme_compatibility","object"==typeof UNCODE&&"function"==typeof UNCODE.init)&&UNCODE.init()}catch(a){berocket_throw_error("uncode_theme_compatibility",a)}try{berocket_apply_filters("flatsome_theme_compatibility","object"==typeof Flatsome&&"function"==typeof Flatsome.attach&&jQuery(the_ajax_script.products_holder_id).length)&&Flatsome.attach(jQuery(the_ajax_script.products_holder_id))}catch(a){berocket_throw_error("flatsome_theme_compatibility",a)}try{berocket_apply_filters("woodmart_theme_compatibility","object"==typeof woodmartThemeModule&&"function"==typeof woodmartThemeModule.init)&&(woodmartThemeModule.wooInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.productsLoadMore())}catch(a){berocket_throw_error("woodmart_theme_compatibility",a)}try{berocket_apply_filters("divi_theme_compatibility","function"==typeof et_reinit_waypoint_modules)&&et_reinit_waypoint_modules()}catch(a){berocket_throw_error("divi_theme_compatibility",a)}try{berocket_apply_filters("rey_theme_compatibility","object"==typeof jQuery.reyTheme&&"function"==typeof jQuery.reyTheme.init)&&jQuery.reyTheme.init()}catch(a){berocket_throw_error("rey_theme_compatibility",a)}try{berocket_apply_filters("layzyloadimage_script_compatibility","function"==typeof layzyLoadImage)&&layzyLoadImage()}catch(a){berocket_throw_error("layzyloadimage_script_compatibility",a)}try{berocket_apply_filters("jetpacklazyimages_script_compatibility","function"==typeof jetpackLazyImagesModule)&&jetpackLazyImagesModule()}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{jQuery("img.jetpack-lazy-image").each(function(){jQuery(this).removeClass("jetpack-lazy-image").attr("src",jQuery(this).data("lazy-src")),jQuery(this).removeClass("jetpack-lazy-image").attr("srcset","")})}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{berocket_apply_filters("swift_script_compatibility","object"==typeof SWIFT&&"object"==typeof SWIFT.woocommerce&&"function"==typeof SWIFT.woocommerce.init)&&SWIFT.woocommerce.init()}catch(a){berocket_throw_error("swift_script_compatibility",a)}try{"undefined"!=typeof baapfGet_wprocketInstance&&baapfGet_wprocketInstance.update()}catch(a){berocket_throw_error("wprocket_script_compatibility",a)}try{jQuery(document).trigger("facetwp-loaded")}catch(a){berocket_throw_error("facetwp_script_compatibility",a)}try{berocket_apply_filters("etTheme_compatibility","object"==typeof etTheme&&"function"==typeof etTheme.global_image_lazy)&&etTheme.global_image_lazy()}catch(a){berocket_throw_error("etTheme_compatibility",a)}}return b},berocket_add_filter("ajax_load_from_url_always_after",bapf_universal_theme_compatibility,2500),a(document).ready(function(){berocket_apply_filters("remove_shortcode_fix_filters",a(".berocket_wc_shortcode_fix").length)&&(braapf_replace_each_filter(a(".berocket_wc_shortcode_fix").html()),a(".berocket_wc_shortcode_fix").html("")),braapf_init_load(),braapf_filtered_filters_set(),a(document).trigger("berocket_filters_document_ready")}),braapf_disable_ajax_loading=function(a){return!0},the_ajax_script.disable_ajax_loading&&berocket_add_filter("page_has_products_holder",braapf_disable_ajax_loading),braapf_close_tippy=function(){try{a(".tippy-box").length&&a(".tippy-box").each(function(){"undefined"!=typeof a(this).parent()[0]._tippy&&a(this).parent()[0]._tippy.hide()})}catch(a){}},berocket_add_filter("update_products",braapf_close_tippy)}(jQuery);var braapf_get_current_filters,braapf_filters_url_decode,braapf_scroll_shop_to_top,braapf_set_filters_to_link,braapf_convert_ckbox_to_radio,braapf_hierarhical_save,braapf_hierarhical_set,braapf_collapse_status_save,braapf_collapse_status_set,braapf_show_hide_values_save,braapf_show_hide_values_set,berocket_custom_sidebar_close,berocket_custom_sidebar_open;!function(a){function b(){jQuery(".berocket_product_table_compat .dataTables_length select").length&&jQuery(".berocket_product_table_compat .wc-product-table").dataTable()._fnSaveState();var a=jQuery(".berocket_product_table_compat .wc-product-table").attr("id");if("undefined"!=typeof window["config_"+a]&&window["config_"+a].serverSide){jQuery(".berocket_product_table_compat .wc-product-table").DataTable().destroy();var b=jQuery(".berocket_product_table_compat").html();jQuery(".berocket_product_table_compat").html(""),jQuery(".berocket_product_table_compat").html(b),jQuery(".berocket_product_table_compat .blockUI.blockOverlay").remove(),jQuery(".berocket_product_table_compat .wc-product-table").productTable()}}braapf_get_current_filters=function(b){if(b.queryargs.length){var c=[];a.each(b.queryargs,function(a,d){d.name==the_ajax_script.url_variable||decodeURI(d.name)==the_ajax_script.url_variable?b.filter=d.value:c.push(d)}),b.queryargs=c}return b},braapf_set_filters_to_link=function(a,b,c,d,e){return"string"==typeof b.filter&&b.filter.length&&(a+=e.length?"&":"?",a+=the_ajax_script.url_variable+"="+b.filter),a},braapf_convert_ckbox_to_radio=function(b,c,d,e){var f=(a(b),a(b).closest(".bapf_sfilter.bapf_ckbox"));f.is(".bapf_asradio")&&f.find("input[type=checkbox]:checked:not(:disabled)").each(function(){var b=a(this).val();b!=d&&braapf_checkbox_same(c,b,!1)})},berocket_add_filter("input_ckbox_changed",braapf_convert_ckbox_to_radio),a(document).on("click",".bapf_ochild, .bapf_cchild",function(b){b.preventDefault(),b.stopPropagation(),a(this).is(".bapf_ochild")?a(this).trigger("bapf_ochild"):a(this).trigger("bapf_cchild")}),a(document).on("bapf_ochild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_open_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().removeClass("bapf_ochild").removeClass("fa-plus").addClass("bapf_cchild").addClass("fa-minus"),a(this).find("ul").first().show())}),a(document).on("bapf_cchild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_close_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().addClass("bapf_ochild").addClass("fa-plus").removeClass("bapf_cchild").removeClass("fa-minus"),a(this).find("ul").first().hide())});var c=[];braapf_hierarhical_save=function(b){return c=[],a(".bapf_cchild").each(function(){c.push(a(this).parent().children("input[type=checkbox]").attr("id"))}),b},braapf_hierarhical_set=function(b){return a.each(c,function(b,c){a("#"+c).trigger("bapf_ochild")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_hierarhical_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_hierarhical_set,1e3),a(document).on("click",".bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl",function(b){b.preventDefault,a(this).closest(".bapf_ocolaps, .bapf_ccolaps").is(".bapf_ocolaps")?a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ocolaps"):a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ccolaps")}),a(document).on("bapf_ocolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).removeClass("bapf_ocolaps").addClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_open_apply",!0,a(this))&&(a(this).find(".bapf_body").first().show(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").removeClass("fa-chevron-down").addClass("fa-chevron-up"))}),a(document).on("bapf_ccolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).addClass("bapf_ocolaps").removeClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_close_apply",!0,a(this))&&(a(this).find(".bapf_body").first().hide(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").addClass("fa-chevron-down").removeClass("fa-chevron-up"))});var d={open:[],close:[]};braapf_collapse_status_save=function(b){return d={open:[],close:[]},a(".bapf_ocolaps, .bapf_ccolaps").each(function(){a(this).is(".bapf_ocolaps")?d.open.push(a(this).attr("id")):d.close.push(a(this).attr("id"))}),b},braapf_collapse_status_set=function(b){return a.each(d.open,function(b,c){a("#"+c).trigger("bapf_ccolaps")}),a.each(d.close,function(b,c){a("#"+c).trigger("bapf_ocolaps")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_collapse_status_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_collapse_status_set,1e3),a(document).on("click",".bapf_show_hide",function(){a(this).closest(".bapf_sfilter").toggleClass("bapf_fhide"),a(this).closest(".bapf_sfilter").is(".bapf_fhide")?a(this).text(a(this).data("show")):a(this).text(a(this).data("hide"))});var e={open:[],close:[]};braapf_show_hide_values_save=function(b){return e={open:[],close:[]},a(".bapf_sfilter").each(function(){a(this).is(".bapf_fhide")?e.close.push(a(this).attr("id")):e.open.push(a(this).attr("id"))}),b},braapf_show_hide_values_set=function(b){return a.each(e.open,function(b,c){a("#"+c).removeClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("hide"))}),a.each(e.close,function(b,c){a("#"+c).addClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("show"))}),b},berocket_add_filter("ajax_load_from_url_done",braapf_show_hide_values_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_show_hide_values_set,1e3),braapf_scroll_shop_to_top=function(b,c,d,e,f){var g=berocket_apply_filters("filter_mobile_width",767);if(berocket_apply_filters("scroll_shop_to_top","default"==f&&(1==the_ajax_script.scroll_shop_top||2==the_ajax_script.scroll_shop_top&&a(window).width()<g||3==the_ajax_script.scroll_shop_top&&a(window).width()>=g))){var h=0;a(the_ajax_script.products_holder_id).length?(h=a(the_ajax_script.products_holder_id).offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)):a(".bapf_no_products").length&&(h=a(".bapf_no_products").offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)),a("html, body").animate({scrollTop:h},"slow")}return b},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_scroll_shop_to_top),a(document).on("mousedown",".wc-product-table-reset a",function(){a(this).remove(),br_reset_all_filters()}),a(document).on("click",".berocket_element_above_products_is_hide_toggle",function(b){b.preventDefault(),a(this).toggleClass("active").next().slideToggle(200,"linear");var c="inactive";a(this).is(".active")&&(c="active"),a(document).trigger("berocket_element_above_products_"+c)}),berocket_custom_sidebar_close=function(){a(".berocket_ajax_filters_sidebar_toggle").removeClass("active"),a("#berocket-ajax-filters-sidebar").removeClass("active"),a("body").removeClass("berocket_ajax_filters_sidebar_active")},berocket_custom_sidebar_open=function(){a(".berocket_ajax_filters_sidebar_toggle").addClass("active"),
2
+ a("#berocket-ajax-filters-sidebar").addClass("active"),a("body").addClass("berocket_ajax_filters_sidebar_active")},a(document).on("berocket_custom_sidebar_close",berocket_custom_sidebar_close),a(document).on("berocket_custom_sidebar_open",berocket_custom_sidebar_open),a(document).on("click",".berocket_ajax_filters_sidebar_toggle",function(b){b.preventDefault(),a(this).is(".active")&&a("#berocket-ajax-filters-sidebar").is(".active")?berocket_custom_sidebar_close():berocket_custom_sidebar_open()}),a(document).on("click","#berocket-ajax-filters-sidebar-shadow, #berocket-ajax-filters-sidebar-close",function(a){a.preventDefault(),berocket_custom_sidebar_close()}),a(document).on("berocket_ajax_filtering_start",function(){jQuery(".berocket_product_table_compat").length&&b()}),braapf_filters_url_decode=function(a){return the_ajax_script.seo_uri_decode&&(a=encodeURIComponent(a),the_ajax_script.nice_urls&&(a=a.replace(/%2F/g,"/"))),a},jQuery(document).on("elementor/popup/show",function(){try{braapf_init_load()}catch(a){berocket_throw_error("wprocketInstance_get",a)}})}(jQuery),berocket_add_filter("get_current_url_data",braapf_get_current_filters),berocket_add_filter("compat_filters_to_string",braapf_filters_url_decode,900),berocket_add_filter("url_from_urldata_linkget",braapf_set_filters_to_link);var braapf_child_parent_grab_single,braapf_child_parent_fix_selected,braapf_child_parent_load_with_update_button,braapf_add_loader_element,braapf_remove_loader_element,braapf_elementor_sticky_fix,baapfGet_wprocketInstance;!function(a){braapf_child_parent_grab_single=function(b,c,d){var e=c.data("child");if("undefined"!=typeof e&&e>0&&"object"==typeof b&&"undefined"!=typeof b.values&&Array.isArray(b.values)&&b.values.length>0){e++;var f=c.data("taxonomy"),g=a(".bapf_sfilter.bapf_child_"+e+"[data-taxonomy="+f+"]");if(g.length){var h=braapf_grab_single(g,[],!0);"object"==typeof h&&"undefined"!=typeof h.values&&Array.isArray(h.values)&&h.values.length>0&&(b=h)}}return b},braapf_child_parent_fix_selected=function(b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child"),f=d.data("taxonomy");if("undefined"!=typeof e&&e>0)for(i=e+1;a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").length;i++)a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").trigger("braapf_unselect",!1)}}return b},braapf_child_parent_load_with_update_button=function(a,b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child");d.data("taxonomy");"undefined"!=typeof e&&e>0&&(a=!0)}}return a},berocket_add_filter("grab_single_filter_default",braapf_child_parent_grab_single,9e6),berocket_add_filter("before_update_products_context",braapf_child_parent_fix_selected),berocket_add_filter("apply_filters_to_page_partial",braapf_child_parent_load_with_update_button);var b;braapf_add_loader_element=function(c,d,e,f,g){return"default"==g&&("undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),b=a(the_ajax_script.load_image),a("body").append(b)),c},braapf_remove_loader_element=function(a){return"undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),a},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_add_loader_element),berocket_add_filter("ajax_load_from_url_always_after",braapf_remove_loader_element),a(document).on("click",".bapf_sfilter.bapf_ckbox .bapf_body li label a",function(b){b.preventDefault(),a(this).parent().trigger("click")}),jQuery(".elementor-widget").length&&jQuery(window).on("scroll",function(){jQuery(".elementor-sticky__spacer .bapf_sfilter").remove()});try{window.addEventListener("LazyLoad::Initialized",function(a){baapfGet_wprocketInstance=a.detail.instance})}catch(a){berocket_throw_error("wprocketInstance_get",a)}a(document).on("change","form.cart input.qty",function(){try{a(this.form).find("[data-quantity]").attr("data-quantity",this.value)}catch(a){berocket_throw_error("wc_quantity_change",a)}})}(jQuery);var braapf_init_ion_slidr,braapf_ion_slidr_same,braapf_jqrui_slidr_ion_value_wc_price,braapf_jqrui_slidr_ion_value_arr_attr,braapf_init_ion_slidr_for_parent,braapf_grab_single_ion,braapf_jqrui_slidr_ion_values_link_arr_attr;!function(a){braapf_init_ion_slidr=function(){braapf_init_ion_slidr_for_parent(a(document))},braapf_init_ion_slidr_for_parent=function(b){b.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_all .bapf_slidr_main"),c=function(a){if(!b.is(".bapf_ion_blocked")){b.addClass("bapf_ion_blocked");var c=b.closest(".bapf_sfilter").data("taxonomy");braapf_ion_slidr_same(c,a);var d={element:"#"+b.closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",d,b),berocket_do_action("update_products","filter",b),b.removeClass("bapf_ion_blocked")}},d=berocket_apply_filters("jqrui_data_slidr_ion",{type:"double",from:b.data("start"),to:b.data("end"),grid:!1,force_edges:!0,onFinish:c,onUpdate:c,prettify:function(a){return a=berocket_apply_filters("jqrui_slidr_ion_"+b.data("display"),a,b)}},b);b.ionRangeSlider(d),a(this).addClass("bapf_slidr_ready")})},braapf_ion_slidr_same=function(b,c){a(".bapf_slidr_ion.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_ion_blocked");var d=b.data("ionRangeSlider");d.update({from:c.from,to:c.to}),b.removeClass("bapf_ion_blocked")})},braapf_jqrui_slidr_ion_value_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a=berocket_format_number(parseFloat(a),c)},braapf_jqrui_slidr_ion_value_arr_attr=function(a,b){var c=b.data("attr");return a=c[a].n},braapf_grab_single_ion=function(a,b){if(b.is(".bapf_slidr_ion.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main").data("ionRangeSlider"),d=b.find(".bapf_slidr_main"),e=[c.options.from,c.options.to],f=[berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.from,d),berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.to,d)],g=d.data("prefix");"undefined"==typeof g&&(g="");var h=d.data("postfix");if("undefined"==typeof h&&(h=""),f[0]=g+f[0]+h,f[1]=g+f[1]+h,e[0]!=d.data("min")||e[1]!=d.data("max")){var i={value:e[0]+"_"+e[1],html:f[0]+" - "+f[1]};i=berocket_apply_filters("jqrui_slidr_ion_link_"+d.data("display"),i,e,f,d,a),a.values=[i]}}return a},braapf_jqrui_slidr_ion_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_ion",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("ionRangeSlider");d.addClass("bapf_ion_blocked"),e.update({from:e.options.min,to:e.options.max}),d.removeClass("bapf_ion_blocked")}),berocket_add_filter("braapf_init",braapf_init_ion_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_ion_slidr_for_parent),berocket_add_filter("grab_single_filter_default",braapf_grab_single_ion),berocket_add_filter("jqrui_slidr_ion_link_arr_attr",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_wc_price",braapf_jqrui_slidr_ion_value_wc_price),berocket_add_filter("jqrui_slidr_ion_arr_attr",braapf_jqrui_slidr_ion_value_arr_attr)}(jQuery);var braapf_grab_single_select;!function(a){a(document).on("change",".bapf_slct .bapf_body select",function(){var b={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",b,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_grab_single_select=function(b,c){if(c.is(".bapf_slct")&&0!=b){var d=a('.bapf_slct[data-taxonomy="'+b.taxonomy+'"] .bapf_body select:not(:disabled)'),e=[];d.find("option:selected:not(:disabled)").each(function(){var c=a(this).val();c&&e.indexOf(c)===-1&&(e.push(c),b.values.push({value:c,html:a(this).data("name")}))})}return b},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slct",function(b,c){a(this).find(".bapf_body select:not(:disabled) option:selected:not(:disabled)").each(function(){"undefined"!=typeof c&&"undefined"!=typeof c.value&&c.value!=a(this).val()||a(this).prop("selected",!1)})}),berocket_add_filter("grab_single_filter_default",braapf_grab_single_select)}(jQuery);var bapf_select2_init,bapf_select2_init_for_parent,bapf_select2_disable_for_parent;jQuery(document).ready(function(){bapf_select2_init=function(){bapf_select2_init_for_parent(jQuery(document))},bapf_select2_init_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){if(!jQuery(this).data("select2")&&!jQuery(this).is(".select2-hidden-accessible")){var a={width:"100%",theme:"default"};jQuery(this).prop("multiple")&&(a.placeholder=jQuery(this).data("placeholder")),jQuery(this).parents("#berocket-ajax-filters-sidebar").length&&(0==jQuery("#bapf-select2-high-zindex").length&&jQuery("body").append('<div id="bapf-select2-high-zindex"></div>'),a.dropdownParent=jQuery("#bapf-select2-high-zindex")),a=berocket_apply_filters("jqrui_data_select2",a,jQuery(this)),jQuery(this).select2(a)}})},bapf_select2_disable_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){jQuery(this).data("select2")&&jQuery(this).select2("destroy")})},jQuery(document).on("berocket_ajax_filtering_on_update",function(){bapf_select2_disable_for_parent(jQuery(document))}),bapf_select2_init(),berocket_add_filter("braapf_init",bapf_select2_init,2e3),berocket_add_filter("braapf_init_for_parent",bapf_select2_init_for_parent)});var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price,braapf_init_jqrui_slidr_for_parent,braapf_grab_single_jqrui,braapf_jqrui_slidr_values_arr_attr,braapf_jqrui_slidr_values_link_arr_attr;!function(a){function b(b,c){var d=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main"),e=d.slider("values");a(b).val(e[c]),a(b).data("val",e[c])}function c(b,c,d){var e=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main");if("focusout"==d){if(a(b).val()==a(b).data("val")){var f=e.slider("values");e.trigger("braapf_change_jqrui_slidr",[f])}}else{var g=parseInt(a(b).val());e.slider("values",c,g)}}a.each([{position:0,className:"bapf_from"},{position:1,className:"bapf_to"}],function(d,e){a(document).on("focusin",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(){b(this,e.position)}),a(document).on("change focusout",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(a){c(this,e.position,a.type)}),a(document).on("change",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" select",function(a){c(this,e.position,a.type)})}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").text(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").text(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").val(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").val(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=d.data("attr");if(d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length||d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length){var e=d.data("attr"),f=[],g=[],h=!1,i=!1;a.each(e,function(a,b){a==c[0]&&(i=!0),h||f.push({v:b.v,n:b.n,ov:a}),i&&g.push({v:b.v,n:b.n,ov:a}),a==c[1]&&(h=!0)})}d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_from select option").remove(),a.each(f,function(b,e){var f="";e.ov==c[0]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_from select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))})),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_to select option").remove(),a.each(g,function(b,e){var f="";e.ov==c[1]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))}))}),braapf_init_jqrui_slidr=function(){braapf_init_jqrui_slidr_for_parent(a(document))},braapf_init_jqrui_slidr_for_parent=function(b){b.find(".bapf_slidr_jqrui:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_main"),c=berocket_apply_filters("jqrui_data_slidr_jqrui",{range:!0,min:b.data("min"),max:b.data("max"),values:[b.data("start"),b.data("end")],step:b.data("step"),create:function(b,c){var d=a(this).slider("values");a(this).trigger("braapf_change_jqrui_slidr",[d])},slide:function(b,c){a(this).trigger("braapf_change_jqrui_slidr",[c.values])},change:function(b,c){var d=a(this).slider("values");if(a(this).trigger("braapf_change_jqrui_slidr",[d]),!a(this).is(".bapf_jqrui_blocked")){var d=a(this).slider("values"),e=a(this).parents(".bapf_sfilter").data("taxonomy");braapf_jqrui_slidr_same(e,d);var f={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",f,a(this)),berocket_do_action("update_products","filter",a(this))}}},b);b.slider(c),a(this).addClass("bapf_slidr_ready")})},braapf_jqrui_slidr_same=function(b,c){a(".bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_jqrui_blocked"),b.slider("values",c),b.removeClass("bapf_jqrui_blocked")})},braapf_jqrui_slidr_values_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a[0]=berocket_format_number(a[0],c),a[1]=berocket_format_number(a[1],c),a},braapf_grab_single_jqrui=function(a,b){if(b.is(".bapf_slidr_jqrui.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main"),d=c.slider("values"),e=c.slider("values"),f="";b.find(".bapf_tbprice").length&&(f=b.find(".bapf_tbprice").first().text());var g="";if(b.find(".bapf_taprice").length&&(g=b.find(".bapf_taprice").first().text()),d[0]!=c.data("min")||d[1]!=c.data("max")){e=berocket_apply_filters("jqrui_slidr_"+c.data("display"),e,c),e[0]=f+e[0]+g,e[1]=f+e[1]+g;var h={value:d[0]+"_"+d[1],html:e[0]+" - "+e[1]};h=berocket_apply_filters("jqrui_slidr_link_"+c.data("display"),h,d,e,c,a),a.values=[h]}}return a},braapf_jqrui_slidr_values_arr_attr=function(a,b){var c=b.data("attr");return Array.isArray(a)&&2==a.length?(a[0]=c[a[0]].n,a[1]=c[a[1]].n):(a=["",""],a[0]=c[0].n,a[1]=c[c.length-1].n),a},braapf_jqrui_slidr_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_jqrui",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("min"),f=d.data("max");d.addClass("bapf_jqrui_blocked"),d.slider("values",[e,f]),d.removeClass("bapf_jqrui_blocked")}),berocket_add_filter("jqrui_slidr_wc_price",braapf_jqrui_slidr_values_wc_price),berocket_add_filter("jqrui_slidr_arr_attr",braapf_jqrui_slidr_values_arr_attr),berocket_add_filter("jqrui_slidr_link_arr_attr",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("grab_single_filter_default",braapf_grab_single_jqrui),berocket_add_filter("braapf_init",braapf_init_jqrui_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_jqrui_slidr_for_parent)}(jQuery),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(b,d){var e,f,g,h=b.nodeName.toLowerCase();return"area"===h?(e=b.parentNode,f=e.name,!(!b.href||!f||"map"!==e.nodeName.toLowerCase())&&(g=a("img[usemap='#"+f+"']")[0],!!g&&c(g))):(/^(input|select|textarea|button|object)$/.test(h)?!b.disabled:"a"===h?b.href||d:d)&&c(b)}function c(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}function d(a){return function(){var b=this.element.val();a.apply(this,arguments),this._refresh(),b!==this.element.val()&&this._trigger("change")}}a.ui=a.ui||{},a.extend(a.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({scrollParent:function(b){var c=this.css("position"),d="absolute"===c,e=b?/(auto|scroll|hidden)/:/(auto|scroll)/,f=this.parents().filter(function(){var b=a(this);return(!d||"static"!==b.css("position"))&&e.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&f.length?f:a(this[0].ownerDocument||document)},uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(c){return b(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var d=a.attr(c,"tabindex"),e=isNaN(d);return(e||d>=0)&&b(c,!e)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(b,c){function d(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===c?["Left","Right"]:["Top","Bottom"],f=c.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){return void 0===b?g["inner"+c].call(this):this.each(function(){a(this).css(f,d(this,b)+"px")})},a.fn["outer"+c]=function(b,e){return"number"!=typeof b?g["outer"+c].call(this,b):this.each(function(){a(this).css(f,d(this,b,!0,e)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(void 0!==b)return this.css("zIndex",b);if(this.length)for(var c,d,e=a(this[0]);e.length&&e[0]!==document;){if(c=e.css("position"),("absolute"===c||"relative"===c||"fixed"===c)&&(d=parseInt(e.css("zIndex"),10),!isNaN(d)&&0!==d))return d;e=e.parent()}return 0}}),a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c,d){var e,f=a.plugins[b];if(f&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;f.length>e;e++)a.options[f[e][0]]&&f[e][1].apply(a.element,c)}};var e=0,f=Array.prototype.slice;a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(a){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];return b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g),g},a.widget.extend=function(b){for(var c,d,e=f.call(arguments,1),g=0,h=e.length;h>g;g++)for(c in e[g])d=e[g][c],e[g].hasOwnProperty(c)&&void 0!==d&&(b[c]=a.isPlainObject(d)?a.isPlainObject(b[c])?a.widget.extend({},b[c],d):a.widget.extend({},d):d);return b},a.widget.bridge=function(b,c){var d=c.prototype.widgetFullName||b;a.fn[b]=function(e){var g="string"==typeof e,h=f.call(arguments,1),i=this;return g?this.each(function(){var c,f=a.data(this,d);return"instance"===e?(i=f,!1):f?a.isFunction(f[e])&&"_"!==e.charAt(0)?(c=f[e].apply(f,h),c!==f&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+e+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+e+"'")}):(h.length&&(e=a.widget.extend.apply(null,[e].concat(h))),this.each(function(){var b=a.data(this,d);b?(b.option(e||{}),b._init&&b._init()):a.data(this,d,new c(e,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(b,c){c=a(c||this.defaultElement||this)[0],this.element=a(c),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),c!==this&&(a.data(c,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===c&&this.destroy()}}),this.document=a(c.style?c.ownerDocument:c.document||c),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;d.length-1>f;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){return b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled")?("string"==typeof g?f[g]:g).apply(f,arguments):void 0}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.unbind(c).undelegate(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.widget;var g=!1;a(document).mouseup(function(){g=!1}),a.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){return!0===a.data(c.target,b.widgetName+".preventClickEvent")?(a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(!g){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var c=this,d=1===b.which,e=!("string"!=typeof this.options.cancel||!b.target.nodeName)&&a(b.target).closest(this.options.cancel).length;return!(d&&!e&&this._mouseCapture(b))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(b)!==!1,!this._mouseStarted)?(b.preventDefault(),!0):(!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return c._mouseMove(a)},this._mouseUpDelegate=function(a){return c._mouseUp(a)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),g=!0,!0))}},_mouseMove:function(b){if(this._mouseMoved){if(a.ui.ie&&(!document.documentMode||9>document.documentMode)&&!b.button)return this._mouseUp(b);if(!b.which)return this._mouseUp(b)}return(b.which||b.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(b){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target===this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),g=!1,!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function b(a,b,c){return[parseFloat(a[0])*(n.test(a[0])?b/100:1),parseFloat(a[1])*(n.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}a.ui=a.ui||{};var e,f,g=Math.max,h=Math.abs,i=Math.round,j=/left|center|right/,k=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,m=/^\w+/,n=/%$/,o=a.fn.position;a.position={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType;return{element:c,isWindow:d,isDocument:e,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:d||e?c.width():c.outerWidth(),height:d||e?c.height():c.outerHeight()}}},a.fn.position=function(e){if(!e||!e.of)return o.apply(this,arguments);e=a.extend({},e);var n,p,q,r,s,t,u=a(e.of),v=a.position.getWithinInfo(e.within),w=a.position.getScrollInfo(v),x=(e.collision||"flip").split(" "),y={};return t=d(u),u[0].preventDefault&&(e.at="left top"),p=t.width,q=t.height,r=t.offset,s=a.extend({},r),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=j.test(c[0])?c.concat(["center"]):k.test(c[0])?["center"].concat(c):["center","center"]),c[0]=j.test(c[0])?c[0]:"center",c[1]=k.test(c[1])?c[1]:"center",a=l.exec(c[0]),b=l.exec(c[1]),y[this]=[a?a[0]:0,b?b[0]:0],e[this]=[m.exec(c[0])[0],m.exec(c[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?s.left+=p:"center"===e.at[0]&&(s.left+=p/2),"bottom"===e.at[1]?s.top+=q:"center"===e.at[1]&&(s.top+=q/2),n=b(y.at,p,q),s.left+=n[0],s.top+=n[1],this.each(function(){var d,j,k=a(this),l=k.outerWidth(),m=k.outerHeight(),o=c(this,"marginLeft"),t=c(this,"marginTop"),z=l+o+c(this,"marginRight")+w.width,A=m+t+c(this,"marginBottom")+w.height,B=a.extend({},s),C=b(y.my,k.outerWidth(),k.outerHeight());
3
+ "right"===e.my[0]?B.left-=l:"center"===e.my[0]&&(B.left-=l/2),"bottom"===e.my[1]?B.top-=m:"center"===e.my[1]&&(B.top-=m/2),B.left+=C[0],B.top+=C[1],f||(B.left=i(B.left),B.top=i(B.top)),d={marginLeft:o,marginTop:t},a.each(["left","top"],function(b,c){a.ui.position[x[b]]&&a.ui.position[x[b]][c](B,{targetWidth:p,targetHeight:q,elemWidth:l,elemHeight:m,collisionPosition:d,collisionWidth:z,collisionHeight:A,offset:[n[0]+C[0],n[1]+C[1]],my:e.my,at:e.at,within:v,elem:k})}),e.using&&(j=function(a){var b=r.left-B.left,c=b+p-l,d=r.top-B.top,f=d+q-m,i={target:{element:u,left:r.left,top:r.top,width:p,height:q},element:{element:k,left:B.left,top:B.top,width:l,height:m},horizontal:0>c?"left":b>0?"right":"center",vertical:0>f?"top":d>0?"bottom":"middle"};l>p&&p>h(b+c)&&(i.horizontal="center"),m>q&&q>h(d+f)&&(i.vertical="middle"),i.important=g(h(b),h(c))>g(h(d),h(f))?"horizontal":"vertical",e.using.call(this,a,i)}),k.offset(a.extend(B,{using:j}))})},a.ui.position={fit:{left:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollLeft:d.offset.left,f=d.width,h=a.left-b.collisionPosition.marginLeft,i=e-h,j=h+b.collisionWidth-f-e;b.collisionWidth>f?i>0&&0>=j?(c=a.left+i+b.collisionWidth-f-e,a.left+=i-c):a.left=j>0&&0>=i?e:i>j?e+f-b.collisionWidth:e:i>0?a.left+=i:j>0?a.left-=j:a.left=g(a.left-h,a.left)},top:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollTop:d.offset.top,f=b.within.height,h=a.top-b.collisionPosition.marginTop,i=e-h,j=h+b.collisionHeight-f-e;b.collisionHeight>f?i>0&&0>=j?(c=a.top+i+b.collisionHeight-f-e,a.top+=i-c):a.top=j>0&&0>=i?e:i>j?e+f-b.collisionHeight:e:i>0?a.top+=i:j>0?a.top-=j:a.top=g(a.top-h,a.top)}},flip:{left:function(a,b){var c,d,e=b.within,f=e.offset.left+e.scrollLeft,g=e.width,i=e.isWindow?e.scrollLeft:e.offset.left,j=a.left-b.collisionPosition.marginLeft,k=j-i,l=j+b.collisionWidth-g-i,m="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,n="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,o=-2*b.offset[0];0>k?(c=a.left+m+n+o+b.collisionWidth-g-f,(0>c||h(k)>c)&&(a.left+=m+n+o)):l>0&&(d=a.left-b.collisionPosition.marginLeft+m+n+o-i,(d>0||l>h(d))&&(a.left+=m+n+o))},top:function(a,b){var c,d,e=b.within,f=e.offset.top+e.scrollTop,g=e.height,i=e.isWindow?e.scrollTop:e.offset.top,j=a.top-b.collisionPosition.marginTop,k=j-i,l=j+b.collisionHeight-g-i,m="top"===b.my[1],n=m?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,o="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,p=-2*b.offset[1];0>k?(d=a.top+n+o+p+b.collisionHeight-g-f,(0>d||h(k)>d)&&(a.top+=n+o+p)):l>0&&(c=a.top-b.collisionPosition.marginTop+n+o+p-i,(c>0||l>h(c))&&(a.top+=n+o+p))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,g,h=document.getElementsByTagName("body")[0],i=document.createElement("div");b=document.createElement(h?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},h&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(g in d)b.style[g]=d[g];b.appendChild(i),c=h||document.documentElement,c.insertBefore(b,c.firstChild),i.style.cssText="position: absolute; left: 10.7432222px;",e=a(i).offset().left,f=e>10&&11>e,b.innerHTML="",c.removeChild(b)}()}(),a.ui.position,a.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var b=this.options;this.prevShow=this.prevHide=a(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),b.collapsible||b.active!==!1&&null!=b.active||(b.active=0),this._processPanels(),0>b.active&&(b.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():a()}},_createIcons:function(){var b=this.options.icons;b&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),a=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){return"active"===a?void this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a,b),"collapsible"!==a||b||this.options.active!==!1||this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),void("disabled"===a&&(this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b))))},_keydown:function(b){if(!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b);break;case c.HOME:f=this.headers[0];break;case c.END:f=this.headers[d-1]}f&&(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),b.preventDefault())}},_panelKeyDown:function(b){b.keyCode===a.ui.keyCode.UP&&b.ctrlKey&&a(b.currentTarget).prev().focus()},refresh:function(){var b=this.options;this._processPanels(),b.active===!1&&b.collapsible===!0||!this.headers.length?(b.active=!1,this.active=a()):b.active===!1?this._activate(0):this.active.length&&!a.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(b.active=!1,this.active=a()):this._activate(Math.max(0,b.active-1)):b.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var a=this.headers,b=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),b&&(this._off(a.not(this.headers)),this._off(b.not(this.panels)))},_refresh:function(){var b,c=this.options,d=c.heightStyle,e=this.element.parent();this.active=this._findActive(c.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var b=a(this),c=b.uniqueId().attr("id"),d=b.next(),e=d.uniqueId().attr("id");b.attr("aria-controls",e),d.attr("aria-labelledby",c)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(c.event),"fill"===d?(b=e.height(),this.element.siblings(":visible").each(function(){var c=a(this),d=c.css("position");"absolute"!==d&&"fixed"!==d&&(b-=c.outerHeight(!0))}),this.headers.each(function(){b-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===d&&(b=0,this.headers.next().each(function(){b=Math.max(b,a(this).css("height","").height())}).height(b))},_activate:function(b){var c=this._findActive(b)[0];c!==this.active[0]&&(c=c||this.active[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return"number"==typeof b?this.headers.eq(b):a()},_setupEvents:function(b){var c={keydown:"_keydown"};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,c),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e[0]===d[0],g=f&&c.collapsible,h=g?a():e.next(),i=d.next(),j={oldHeader:d,oldPanel:i,newHeader:g?a():e,newPanel:h};b.preventDefault(),f&&!c.collapsible||this._trigger("beforeActivate",b,j)===!1||(c.active=!g&&this.headers.index(e),this.active=f?a():e,this._toggle(j),d.removeClass("ui-accordion-header-active ui-state-active"),c.icons&&d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header),f||(e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),c.icons&&e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(b){var c=b.newPanel,d=this.prevShow.length?this.prevShow:b.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=c,this.prevHide=d,this.options.animate?this._animate(c,d,b):(d.hide(),c.show(),this._toggleComplete(b)),d.attr({"aria-hidden":"true"}),d.prev().attr({"aria-selected":"false","aria-expanded":"false"}),c.length&&d.length?d.prev().attr({tabIndex:-1,"aria-expanded":"false"}):c.length&&this.headers.filter(function(){return 0===parseInt(a(this).attr("tabIndex"),10)}).attr("tabIndex",-1),c.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(a,b,c){var d,e,f,g=this,h=0,i=a.css("box-sizing"),j=a.length&&(!b.length||a.index()<b.index()),k=this.options.animate||{},l=j&&k.down||k,m=function(){g._toggleComplete(c)};return"number"==typeof l&&(f=l),"string"==typeof l&&(e=l),e=e||l.easing||k.easing,f=f||l.duration||k.duration,b.length?a.length?(d=a.show().outerHeight(),b.animate(this.hideProps,{duration:f,easing:e,step:function(a,b){b.now=Math.round(a)}}),void a.hide().animate(this.showProps,{duration:f,easing:e,complete:m,step:function(a,c){c.now=Math.round(a),"height"!==c.prop?"content-box"===i&&(h+=c.now):"content"!==g.options.heightStyle&&(c.now=Math.round(d-b.outerHeight()-h),h=0)}})):b.animate(this.hideProps,f,e,m):a.animate(this.showProps,f,e,m)},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),b.length&&(b.parent()[0].className=b.parent()[0].className),this._trigger("activate",null,a)}}),a.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(a){a.preventDefault()},"click .ui-menu-item":function(b){var c=a(b.target);!this.mouseHandled&&c.not(".ui-state-disabled").length&&(this.select(b),b.isPropagationStopped()||(this.mouseHandled=!0),c.has(".ui-menu").length?this.expand(b):!this.element.is(":focus")&&a(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(b){if(!this.previousFilter){var c=a(b.currentTarget);c.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(b,c)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.find(this.options.items).eq(0);b||this.focus(a,c)},blur:function(b){this._delay(function(){a.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(b)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(a){this._closeOnDocumentClick(a)&&this.collapseAll(a),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var b=a(this);b.data("ui-menu-submenu-carat")&&b.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(b){var c,d,e,f,g=!0;switch(b.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(b);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(b);break;case a.ui.keyCode.HOME:this._move("first","first",b);break;case a.ui.keyCode.END:this._move("last","last",b);break;case a.ui.keyCode.UP:this.previous(b);break;case a.ui.keyCode.DOWN:this.next(b);break;case a.ui.keyCode.LEFT:this.collapse(b);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(b);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(b);break;case a.ui.keyCode.ESCAPE:this.collapse(b);break;default:g=!1,d=this.previousFilter||"",e=String.fromCharCode(b.keyCode),f=!1,clearTimeout(this.filterTimer),e===d?f=!0:e=d+e,c=this._filterMenuItems(e),c=f&&-1!==c.index(this.active.next())?this.active.nextAll(".ui-menu-item"):c,c.length||(e=String.fromCharCode(b.keyCode),c=this._filterMenuItems(e)),c.length?(this.focus(b,c),this.previousFilter=e,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}g&&b.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(a):this.select(a))},refresh:function(){var b,c,d=this,e=this.options.icons.submenu,f=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),f.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var b=a(this),c=b.parent(),d=a("<span>").addClass("ui-menu-icon ui-icon "+e).data("ui-menu-submenu-carat",!0);c.attr("aria-haspopup","true").prepend(d),b.attr("aria-labelledby",c.attr("id"))}),b=f.add(this.element),c=b.find(this.options.items),c.not(".ui-menu-item").each(function(){var b=a(this);d._isDivider(b)&&b.addClass("ui-widget-content ui-menu-divider")}),c.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),c.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,b){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(b.submenu),"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this._super(a,b)},focus:function(a,b){var c,d;this.blur(a,a&&"focus"===a.type),this._scrollIntoView(b),this.active=b.first(),d=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",d.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),c=b.children(".ui-menu"),c.length&&a&&/^mouse/.test(a.type)&&this._startOpening(c),this.activeMenu=b.parent(),this._trigger("focus",a,{item:b})},_scrollIntoView:function(b){var c,d,e,f,g,h;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,e=b.offset().top-this.activeMenu.offset().top-c-d,f=this.activeMenu.scrollTop(),g=this.activeMenu.height(),h=b.outerHeight(),0>e?this.activeMenu.scrollTop(f+e):e+h>g&&this.activeMenu.scrollTop(f+e-g+h))},blur:function(a,b){b||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer),"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(a)},this.delay))},_open:function(b){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden","true"),b.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(b,c){clearTimeout(this.timer),this.timer=this._delay(function(){var d=c?this.element:a(b&&b.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element),this._close(d),this.blur(b),this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element),a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(b){return!a(b.target).closest(".ui-menu").length},_isDivider:function(a){return!/[^\-\u2014\u2013\s]/.test(a.text())},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var d;this.active&&(d="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0)),d&&d.length&&this.active||(d=this.activeMenu.find(this.options.items)[b]()),this.focus(c,d)},nextPage:function(b){var c,d,e;return this.active?void(this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return c=a(this),0>c.offset().top-d-e}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(b)},previousPage:function(b){var c,d,e;return this.active?void(this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d+e>0}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items).first()))):void this.next(b)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(b){this.active=this.active||a(b.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(b,!0),this._trigger("select",b,c)},_filterMenuItems:function(b){var c=b.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),d=RegExp("^"+c,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return d.test(a.trim(a(this).text()))})}}),a.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var b,c,d,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e,g="input"===e;this.isMultiLine=!!f||!g&&this.element.prop("isContentEditable"),this.valueMethod=this.element[f||g?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))return b=!0,d=!0,void(c=!0);b=!1,d=!1,c=!1;var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:b=!0,this._move("previousPage",e);break;case f.PAGE_DOWN:b=!0,this._move("nextPage",e);break;case f.UP:b=!0,this._keyEvent("previous",e);break;case f.DOWN:b=!0,this._keyEvent("next",e);break;case f.ENTER:this.menu.active&&(b=!0,e.preventDefault(),this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:c=!0,this._searchTimeout(e)}},keypress:function(d){if(b)return b=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&d.preventDefault());if(!c){var e=a.ui.keyCode;switch(d.keyCode){case e.PAGE_UP:this._move("previousPage",d);break;case e.PAGE_DOWN:this._move("nextPage",d);break;case e.UP:this._keyEvent("previous",d);break;case e.DOWN:this._keyEvent("next",d)}}},input:function(a){return d?(d=!1,void a.preventDefault()):void this._searchTimeout(a)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),void this._change(a))}}),this._initSource(),this.menu=a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(b){b.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var c=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(d){d.target===b.element[0]||d.target===c||a.contains(c,d.target)||b.close()})})},menufocus:function(b,c){var d,e;return this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)})):(e=c.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",b,{item:e})&&b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(e.value),d=c.item.attr("aria-label")||e.value,void(d&&a.trim(d).length&&(this.liveRegion.children().hide(),a("<div>").text(d).appendTo(this.liveRegion))))},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d,this.selectedItem=c})),!1!==this._trigger("select",a,{item:c})&&this._value(c.value),this.term=this._value(),this.close(a),this.selectedItem=c}}),this.liveRegion=a("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(a,b){this._super(a,b),"source"===a&&this._initSource(),"appendTo"===a&&this.menu.element.appendTo(this._appendTo()),"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b&&b[0]||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_initSource:function(){var b,c,d=this;a.isArray(this.options.source)?(b=this.options.source,this.source=function(c,d){d(a.ui.autocomplete.filter(b,c.term))}):"string"==typeof this.options.source?(c=this.options.source,this.source=function(b,e){d.xhr&&d.xhr.abort(),d.xhr=a.ajax({url:c,data:b,dataType:"json",success:function(a){e(a)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching),this.searching=this._delay(function(){var b=this.term===this._value(),c=this.menu.element.is(":visible"),d=a.altKey||a.ctrlKey||a.metaKey||a.shiftKey;(!b||b&&!c&&!d)&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){return a=null!=a?a:this._value(),this.term=this._value(),a.length<this.options.minLength?this.close(b):this._trigger("search",b)!==!1?this._search(a):void 0},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:a},this._response())},_response:function(){var b=++this.requestIndex;return a.proxy(function(a){b===this.requestIndex&&this.__response(a),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(a){a&&(a=this._normalize(a)),this._trigger("response",null,{content:a}),!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0,this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return"string"==typeof b?{label:b,value:b}:a.extend({},b,{label:b.label||b.value,value:b.value||b.label})})},_suggest:function(b){var c=this.menu.element.empty();this._renderMenu(c,b),this.isNewMenu=!0,this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItemData(b,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(b,c){return a("<li>").text(c.label).appendTo(b)},_move:function(a,b){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[a](b):void this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(a,b),b.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(a>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(b){var c;this._superApply(arguments),this.options.disabled||this.cancelSearch||(c=b&&b.length?this.options.messages.results(b.length):this.options.messages.noResults,this.liveRegion.children().hide(),a("<div>").text(c).appendTo(this.liveRegion))}}),a.ui.autocomplete;var h,i="ui-button ui-widget ui-state-default ui-corner-all",j="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",k=function(){var b=a(this);setTimeout(function(){b.find(":ui-button").button("refresh")},1)},l=function(b){var c=b.name,d=b.form,e=a([]);return c&&(c=c.replace(/'/g,"\\'"),e=d?a(d).find("[name='"+c+"'][type=radio]"):a("[name='"+c+"'][type=radio]",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,k),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d="checkbox"===this.type||"radio"===this.type,e=d?"":"ui-state-active";null===c.label&&(c.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){c.disabled||this===h&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){c.disabled||a(this).removeClass(e)}).bind("click"+this.eventNamespace,function(a){c.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),d&&this.element.bind("change"+this.eventNamespace,function(){b.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return!c.disabled&&void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(c.disabled)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var d=b.element[0];l(d).not(d).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!c.disabled&&(a(this).addClass("ui-state-active"),h=this,void b.document.one("mouseup",function(){h=null}))}).bind("mouseup"+this.eventNamespace,function(){return!c.disabled&&void a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(b){return!c.disabled&&void((b.keyCode===a.ui.keyCode.SPACE||b.keyCode===a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",c.disabled),this._resetButton()},_determineButtonType:function(){var a,b,c;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),
4
+ b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),c=this.element.is(":checked"),c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",c)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+j).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){return this._super(a,b),"disabled"===a?(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),void(b&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b),"radio"===this.type?l(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var b=this.buttonElement.removeClass(j),c=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",a.trim(c)))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){"disabled"===a&&this.buttons.button("option",a,b),this._super(a,b)},refresh:function(){var b="rtl"===this.element.css("direction"),c=this.element.find(this.options.items),d=c.filter(":ui-button");c.not(":ui-button").button(),d.button("refresh"),this.buttons=c.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),a.ui.button,a.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var a=this.element.uniqueId().attr("id");this.ids={element:a,button:a+"-button",menu:a+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var b=this;this.label=a("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(a){this.button.focus(),a.preventDefault()}}),this.element.hide(),this.button=a("<span>",{class:"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),a("<span>",{class:"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=a("<span>",{class:"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){b.menuItems||b._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var b=this;this.menu=a("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=a("<div>",{class:"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(a,c){a.preventDefault(),b._setSelection(),b._select(c.item.data("ui-selectmenu-item"),a)},focus:function(a,c){var d=c.item.data("ui-selectmenu-item");null!=b.focusIndex&&d.index!==b.focusIndex&&(b._trigger("focus",a,{item:d}),b.isOpen||b._select(d,a)),b.focusIndex=d.index,b.button.attr("aria-activedescendant",b.menuItems.eq(d.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var a,b=this.element.find("option");b.length&&(this._parseOptions(b),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),a=this._getSelectedItem(),this.menuInstance.focus(null,a),this._setAria(a.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(a){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",a))},_position:function(){this.menuWrap.position(a.extend({of:this.button},this.options.position))},close:function(a){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",a))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(b,c){var d=this,e="";a.each(c,function(c,f){f.optgroup!==e&&(a("<li>",{class:"ui-selectmenu-optgroup ui-menu-divider"+(f.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:f.optgroup}).appendTo(b),e=f.optgroup),d._renderItemData(b,f)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-selectmenu-item",b)},_renderItem:function(b,c){var d=a("<li>");return c.disabled&&d.addClass("ui-state-disabled"),this._setText(d,c.label),d.appendTo(b)},_setText:function(a,b){b?a.text(b):a.html("&#160;")},_move:function(a,b){var c,d,e=".ui-menu-item";this.isOpen?c=this.menuItems.eq(this.focusIndex):(c=this.menuItems.eq(this.element[0].selectedIndex),e+=":not(.ui-state-disabled)"),d="first"===a||"last"===a?c["first"===a?"prevAll":"nextAll"](e).eq(-1):c[a+"All"](e).eq(0),d.length&&this.menuInstance.focus(b,d)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(a){this[this.isOpen?"close":"open"](a)},_setSelection:function(){var a;this.range&&(window.getSelection?(a=window.getSelection(),a.removeAllRanges(),a.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(b){this.isOpen&&(a(b.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(b))}},_buttonEvents:{mousedown:function(){var a;window.getSelection?(a=window.getSelection(),a.rangeCount&&(this.range=a.getRangeAt(0))):this.range=document.selection.createRange()},click:function(a){this._setSelection(),this._toggle(a)},keydown:function(b){var c=!0;switch(b.keyCode){case a.ui.keyCode.TAB:case a.ui.keyCode.ESCAPE:this.close(b),c=!1;break;case a.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(b);break;case a.ui.keyCode.UP:b.altKey?this._toggle(b):this._move("prev",b);break;case a.ui.keyCode.DOWN:b.altKey?this._toggle(b):this._move("next",b);break;case a.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(b):this._toggle(b);break;case a.ui.keyCode.LEFT:this._move("prev",b);break;case a.ui.keyCode.RIGHT:this._move("next",b);break;case a.ui.keyCode.HOME:case a.ui.keyCode.PAGE_UP:this._move("first",b);break;case a.ui.keyCode.END:case a.ui.keyCode.PAGE_DOWN:this._move("last",b);break;default:this.menu.trigger(b),c=!1}c&&b.preventDefault()}},_selectFocusedItem:function(a){var b=this.menuItems.eq(this.focusIndex);b.hasClass("ui-state-disabled")||this._select(b.data("ui-selectmenu-item"),a)},_select:function(a,b){var c=this.element[0].selectedIndex;this.element[0].selectedIndex=a.index,this._setText(this.buttonText,a.label),this._setAria(a),this._trigger("select",b,{item:a}),a.index!==c&&this._trigger("change",b,{item:a}),this.close(b)},_setAria:function(a){var b=this.menuItems.eq(a.index).attr("id");this.button.attr({"aria-labelledby":b,"aria-activedescendant":b}),this.menu.attr("aria-activedescendant",b)},_setOption:function(a,b){"icons"===a&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(b.button),this._super(a,b),"appendTo"===a&&this.menuWrap.appendTo(this._appendTo()),"disabled"===a&&(this.menuInstance.option("disabled",b),this.button.toggleClass("ui-state-disabled",b).attr("aria-disabled",b),this.element.prop("disabled",b),b?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===a&&this._resizeButton()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b&&b[0]||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var a=this.options.width;a||(a=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(a)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(b){var c=[];b.each(function(b,d){var e=a(d),f=e.parent("optgroup");c.push({element:e,index:b,value:e.val(),label:e.text(),optgroup:f.attr("label")||"",disabled:f.prop("disabled")||e.prop("disabled")})}),this.items=c},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),a.widget("ui.slider",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var b,c,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",g=[];for(c=d.values&&d.values.length||1,e.length>c&&(e.slice(c).remove(),e=e.slice(0,c)),b=e.length;c>b;b++)g.push(f);this.handles=e.add(a(g.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)})},_createRange:function(){var b=this.options,c="";b.range?(b.range===!0&&(b.values?b.values.length&&2!==b.values.length?b.values=[b.values[0],b.values[0]]:a.isArray(b.values)&&(b.values=b.values.slice(0)):b.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=a("<div></div>").appendTo(this.element),c="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(c+("min"===b.range||"max"===b.range?" ui-slider-range-"+b.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(b){var c,d,e,f,g,h,i,j,k=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),e=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));(e>c||e===c&&(b===k._lastChangedValue||k.values(b)===l.min))&&(e=c,f=a(this),g=b)}),h=this._start(b,g),h!==!1&&(this._mouseSliding=!0,this._handleIndex=g,f.addClass("ui-state-active").focus(),i=f.offset(),j=!a(b.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}:{left:b.pageX-i.left-f.width()/2,top:b.pageY-i.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return"horizontal"===this.orientation?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),0>d&&(d=0),"vertical"===this.orientation&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),2===this.options.values.length&&this.options.range===!0&&(0===b&&c>d||1===b&&d>c)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._lastChangedValue=b,this._trigger("change",a,c)}},value:function(a){return arguments.length?(this.options.value=this._trimAlignValue(a),this._refreshValue(),void this._change(null,0)):this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)return this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),void this._change(null,b);if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();for(d=this.options.values,e=arguments[0],f=0;d.length>f;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;switch("range"===b&&this.options.range===!0&&("min"===c?(this.options.value=this._values(0),this.options.values=null):"max"===c&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),a.isArray(this.options.values)&&(e=this.options.values.length),"disabled"===b&&this.element.toggleClass("ui-state-disabled",!!c),this._super(b,c),b){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===c?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),d=0;e>d;d+=1)this._change(null,d);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b);if(this.options.values&&this.options.values.length){for(c=this.options.values.slice(),d=0;c.length>d;d+=1)c[d]=this._trimAlignValue(c[d]);return c}return[]},_trimAlignValue:function(a){if(this._valueMin()>=a)return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return 2*Math.abs(c)>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_calculateNewMax:function(){var a=this.options.max,b=this._valueMin(),c=this.options.step,d=Math.floor(+(a-b).toFixed(this._precision())/c)*c;a=d+b,this.max=parseFloat(a.toFixed(this._precision()))},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=""+a,c=b.indexOf(".");return-1===c?0:b.length-c-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var b,c,d,e,f,g=this.options.range,h=this.options,i=this,j=!this._animateOff&&h.animate,k={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=100*((i.values(d)-i._valueMin())/(i._valueMax()-i._valueMin())),k["horizontal"===i.orientation?"left":"bottom"]=c+"%",a(this).stop(1,1)[j?"animate":"css"](k,h.animate),i.options.range===!0&&("horizontal"===i.orientation?(0===d&&i.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({width:c-b+"%"},{queue:!1,duration:h.animate})):(0===d&&i.range.stop(1,1)[j?"animate":"css"]({bottom:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({height:c-b+"%"},{queue:!1,duration:h.animate}))),b=c}):(d=this.value(),e=this._valueMin(),f=this._valueMax(),c=f!==e?100*((d-e)/(f-e)):0,k["horizontal"===this.orientation?"left":"bottom"]=c+"%",this.handle.stop(1,1)[j?"animate":"css"](k,h.animate),"min"===g&&"horizontal"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({width:c+"%"},h.animate),"max"===g&&"horizontal"===this.orientation&&this.range[j?"animate":"css"]({width:100-c+"%"},{queue:!1,duration:h.animate}),"min"===g&&"vertical"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},h.animate),"max"===g&&"vertical"===this.orientation&&this.range[j?"animate":"css"]({height:100-c+"%"},{queue:!1,duration:h.animate}))},_handleEvents:{keydown:function(b){var c,d,e,f,g=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),c=this._start(b,g),c===!1))return}switch(f=this.options.step,d=e=this.options.values&&this.options.values.length?this.values(g):this.value(),b.keyCode){case a.ui.keyCode.HOME:e=this._valueMin();break;case a.ui.keyCode.END:e=this._valueMax();break;case a.ui.keyCode.PAGE_UP:e=this._trimAlignValue(d+(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.PAGE_DOWN:e=this._trimAlignValue(d-(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(d===this._valueMax())return;e=this._trimAlignValue(d+f);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(d===this._valueMin())return;e=this._trimAlignValue(d-f)}this._slide(b,g,e)},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}}}),a.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var b={},c=this.element;return a.each(["min","max","step"],function(a,d){var e=c.attr(d);void 0!==e&&e.length&&(b[d]=e)}),b},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",a)))},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return!1;this._spin((b>0?1:-1)*this.options.step,a),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100),a.preventDefault()}},"mousedown .ui-spinner-button":function(b){function c(){var a=this.element[0]===this.document[0].activeElement;a||(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d}))}var d;d=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),b.preventDefault(),c.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,c.call(this)}),this._start(b)!==!1&&this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(b){return a(b.currentTarget).hasClass("ui-state-active")?this._start(b)!==!1&&void this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*a.height())&&a.height()>0&&a.height(a.height()),this.options.disabled&&this.disable()},_keydown:function(b){var c=this.options,d=a.ui.keyCode;switch(b.keyCode){case d.UP:return this._repeat(null,1,b),!0;case d.DOWN:return this._repeat(null,-1,b),!0;case d.PAGE_UP:return this._repeat(null,c.page,b),!0;case d.PAGE_DOWN:return this._repeat(null,-c.page,b),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){return!(!this.spinning&&this._trigger("start",a)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(a,b,c){a=a||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,b,c)},a),this._spin(b*this.options.step,c)},_spin:function(a,b){var c=this.value()||0;this.counter||(this.counter=1),c=this._adjustValue(c+a*this._increment(this.counter)),this.spinning&&this._trigger("spin",b,{value:c})===!1||(this._value(c),this.counter++)},_increment:function(b){var c=this.options.incremental;return c?a.isFunction(c)?c(b):Math.floor(b*b*b/5e4-b*b/500+17*b/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=""+a,c=b.indexOf(".");return-1===c?0:b.length-c-1},_adjustValue:function(a){var b,c,d=this.options;return b=null!==d.min?d.min:0,c=a-b,c=Math.round(c/d.step)*d.step,a=b+c,a=parseFloat(a.toFixed(this._precision())),null!==d.max&&a>d.max?d.max:null!==d.min&&d.min>a?d.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,b){if("culture"===a||"numberFormat"===a){var c=this._parse(this.element.val());return this.options[a]=b,void this.element.val(this._format(c))}("max"===a||"min"===a||"step"===a)&&"string"==typeof b&&(b=this._parse(b)),"icons"===a&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(b.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(b.down)),this._super(a,b),"disabled"===a&&(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),this.buttons.button(b?"disable":"enable"))},_setOptions:d(function(a){this._super(a)}),_parse:function(a){return"string"==typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,10,this.options.culture):+a),""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var a=this.value();return null!==a&&a===this._adjustValue(a)},_value:function(a,b){var c;""!==a&&(c=this._parse(a),null!==c&&(b||(c=this._adjustValue(c)),a=this._format(c))),this.element.val(a),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:d(function(a){this._stepUp(a)}),_stepUp:function(a){this._start()&&(this._spin((a||1)*this.options.step),this._stop())},stepDown:d(function(a){this._stepDown(a)}),_stepDown:function(a){this._start()&&(this._spin((a||1)*-this.options.step),this._stop())},pageUp:d(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:d(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){return arguments.length?void d(this._value).call(this,a):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),a.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var a=/#.*$/;return function(b){var c,d;b=b.cloneNode(!1),c=b.href.replace(a,""),d=location.href.replace(a,"");try{c=decodeURIComponent(c)}catch(a){}try{d=decodeURIComponent(d)}catch(a){}return b.hash.length>1&&c===d}}(),_create:function(){var b=this,c=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",c.collapsible),this._processTabs(),c.active=this._initialActive(),a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(c.active):a(),this._refresh(),this.active.length&&this.load(c.active)},_initialActive:function(){var b=this.options.active,c=this.options.collapsible,d=location.hash.substring(1);return null===b&&(d&&this.tabs.each(function(c,e){return a(e).attr("aria-controls")===d?(b=c,!1):void 0}),null===b&&(b=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===b||-1===b)&&(b=!!this.tabs.length&&0)),b!==!1&&(b=this.tabs.index(this.tabs.eq(b)),-1===b&&(b=!c&&0)),!c&&b===!1&&this.anchors.length&&(b=0),b},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(this.document[0].activeElement).closest("li"),d=this.tabs.index(c),e=!0;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1,d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=0;break;case a.ui.keyCode.SPACE:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d);case a.ui.keyCode.ENTER:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d!==this.options.active&&d);default:return}b.preventDefault(),clearTimeout(this.activating),d=this._focusNextTab(d,e),b.ctrlKey||b.metaKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),this.active.focus())},_handlePageNav:function(b){return b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(b,c){function d(){return b>e&&(b=0),0>b&&(b=e),b}for(var e=this.tabs.length-1;-1!==a.inArray(d(),this.options.disabled);)b=c?b+1:b-1;return b},_focusNextTab:function(a,b){return a=this._findNextTab(a,b),this.tabs.eq(a).focus(),a},_setOption:function(a,b){return"active"===a?void this._activate(b):"disabled"===a?void this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),
5
+ b||this.options.active!==!1||this._activate(0)),"event"===a&&this._setupEvents(b),void("heightStyle"===a&&this._setupHeightStyle(b)))},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var b=this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)}),this._processTabs(),b.active!==!1&&this.anchors.length?this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),!1)):b.active=this.tabs.index(this.active):(b.active=!1,this.active=a()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var b=this,c=this.tabs,d=this.anchors,e=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=a(),this.anchors.each(function(c,d){var e,f,g,h=a(d).uniqueId().attr("id"),i=a(d).closest("li"),j=i.attr("aria-controls");b._isLocal(d)?(e=d.hash,g=e.substring(1),f=b.element.find(b._sanitizeSelector(e))):(g=i.attr("aria-controls")||a({}).uniqueId()[0].id,e="#"+g,f=b.element.find(e),f.length||(f=b._createPanel(g),f.insertAfter(b.panels[c-1]||b.tablist)),f.attr("aria-live","polite")),f.length&&(b.panels=b.panels.add(f)),j&&i.data("ui-tabs-aria-controls",j),i.attr({"aria-controls":g,"aria-labelledby":h}),f.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),c&&(this._off(c.not(this.tabs)),this._off(d.not(this.anchors)),this._off(e.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(b){a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=!0):b=!1);for(var c,d=0;c=this.tabs[d];d++)b===!0||-1!==a.inArray(d,b)?a(c).addClass("ui-state-disabled").attr("aria-disabled","true"):a(c).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=b},_setupEvents:function(b){var c={};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(a){a.preventDefault()}}),this._on(this.anchors,c),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d=this.element.parent();"fill"===b?(c=d.height(),c-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(c-=b.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){c-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===b&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e.closest("li"),g=f[0]===d[0],h=g&&c.collapsible,i=h?a():this._getPanelForTab(f),j=d.length?this._getPanelForTab(d):a(),k={oldTab:d,oldPanel:j,newTab:h?a():f,newPanel:i};b.preventDefault(),f.hasClass("ui-state-disabled")||f.hasClass("ui-tabs-loading")||this.running||g&&!c.collapsible||this._trigger("beforeActivate",b,k)===!1||(c.active=!h&&this.tabs.index(f),this.active=g?a():f,this.xhr&&this.xhr.abort(),j.length||i.length||a.error("jQuery UI Tabs: Mismatching fragment identifier."),i.length&&this.load(this.tabs.index(f),b),this._toggle(b,k))},_toggle:function(b,c){function d(){f.running=!1,f._trigger("activate",b,c)}function e(){c.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),g.length&&f.options.show?f._show(g,f.options.show,d):(g.show(),d())}var f=this,g=c.newPanel,h=c.oldPanel;this.running=!0,h.length&&this.options.hide?this._hide(h,this.options.hide,function(){c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),e()}):(c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),h.hide(),e()),h.attr("aria-hidden","true"),c.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),g.length&&h.length?c.oldTab.attr("tabIndex",-1):g.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),g.attr("aria-hidden","false"),c.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(b){var c,d=this._findActive(b);d[0]!==this.active[0]&&(d.length||(d=this.active),c=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return b===!1?a():this.tabs.eq(b)},_getIndex:function(a){return"string"==typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");c?b.attr("aria-controls",c).removeData("ui-tabs-aria-controls"):b.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(b){var c=this.options.disabled;c!==!1&&(void 0===b?c=!1:(b=this._getIndex(b),c=a.isArray(c)?a.map(c,function(a){return a!==b?a:null}):a.map(this.tabs,function(a,c){return c!==b?c:null})),this._setupDisabled(c))},disable:function(b){var c=this.options.disabled;if(c!==!0){if(void 0===b)c=!0;else{if(b=this._getIndex(b),-1!==a.inArray(b,c))return;c=a.isArray(c)?a.merge([b],c).sort():[b]}this._setupDisabled(c)}},load:function(b,c){b=this._getIndex(b);var d=this,e=this.tabs.eq(b),f=e.find(".ui-tabs-anchor"),g=this._getPanelForTab(e),h={tab:e,panel:g},i=function(a,b){"abort"===b&&d.panels.stop(!1,!0),e.removeClass("ui-tabs-loading"),g.removeAttr("aria-busy"),a===d.xhr&&delete d.xhr};this._isLocal(f[0])||(this.xhr=a.ajax(this._ajaxSettings(f,c,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(e.addClass("ui-tabs-loading"),g.attr("aria-busy","true"),this.xhr.done(function(a,b,e){setTimeout(function(){g.html(a),d._trigger("load",c,h),i(e,b)},1)}).fail(function(a,b){setTimeout(function(){i(a,b)},1)})))},_ajaxSettings:function(b,c,d){var e=this;return{url:b.attr("href"),beforeSend:function(b,f){return e._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:f},d))}}},_getPanelForTab:function(b){var c=a(b).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+c))}}),a.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var b=a(this).attr("title")||"";return a("<a>").text(b).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(b,c){var d=(b.attr("aria-describedby")||"").split(/\s+/);d.push(c),b.data("ui-tooltip-id",c).attr("aria-describedby",a.trim(d.join(" ")))},_removeDescribedBy:function(b){var c=b.data("ui-tooltip-id"),d=(b.attr("aria-describedby")||"").split(/\s+/),e=a.inArray(c,d);-1!==e&&d.splice(e,1),b.removeData("ui-tooltip-id"),d=a.trim(d.join(" ")),d?b.attr("aria-describedby",d):b.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=a("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(b,c){var d=this;return"disabled"===b?(this[c?"_disable":"_enable"](),void(this.options[b]=c)):(this._super(b,c),void("content"===b&&a.each(this.tooltips,function(a,b){d._updateContent(b.element)})))},_disable:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d.element[0],b.close(e,!0)}),this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.is("[title]")&&b.data("ui-tooltip-title",b.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title"))})},open:function(b){var c=this,d=a(b?b.target:this.element).closest(this.options.items);d.length&&!d.data("ui-tooltip-id")&&(d.attr("title")&&d.data("ui-tooltip-title",d.attr("title")),d.data("ui-tooltip-open",!0),b&&"mouseover"===b.type&&d.parents().each(function(){var b,d=a(this);d.data("ui-tooltip-open")&&(b=a.Event("blur"),b.target=b.currentTarget=this,c.close(b,!0)),d.attr("title")&&(d.uniqueId(),c.parents[this.id]={element:this,title:d.attr("title")},d.attr("title",""))}),this._registerCloseHandlers(b,d),this._updateContent(d,b))},_updateContent:function(a,b){var c,d=this.options.content,e=this,f=b?b.type:null;return"string"==typeof d?this._open(b,a,d):(c=d.call(a[0],function(c){e._delay(function(){a.data("ui-tooltip-open")&&(b&&(b.type=f),this._open(b,a,c))})}),void(c&&this._open(b,a,c)))},_open:function(b,c,d){function e(a){j.of=a,g.is(":hidden")||g.position(j)}var f,g,h,i,j=a.extend({},this.options.position);if(d){if(f=this._find(c))return void f.tooltip.find(".ui-tooltip-content").html(d);c.is("[title]")&&(b&&"mouseover"===b.type?c.attr("title",""):c.removeAttr("title")),f=this._tooltip(c),g=f.tooltip,this._addDescribedBy(c,g.attr("id")),g.find(".ui-tooltip-content").html(d),this.liveRegion.children().hide(),d.clone?(i=d.clone(),i.removeAttr("id").find("[id]").removeAttr("id")):i=d,a("<div>").html(i).appendTo(this.liveRegion),this.options.track&&b&&/^mouse/.test(b.type)?(this._on(this.document,{mousemove:e}),e(b)):g.position(a.extend({of:c},this.options.position)),g.hide(),this._show(g,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){g.is(":visible")&&(e(j.of),clearInterval(h))},a.fx.interval)),this._trigger("open",b,{tooltip:g})}},_registerCloseHandlers:function(b,c){var d={keyup:function(b){if(b.keyCode===a.ui.keyCode.ESCAPE){var d=a.Event(b);d.currentTarget=c[0],this.close(d,!0)}}};c[0]!==this.element[0]&&(d.remove=function(){this._removeTooltip(this._find(c).tooltip)}),b&&"mouseover"!==b.type||(d.mouseleave="close"),b&&"focusin"!==b.type||(d.focusout="close"),this._on(!0,c,d)},close:function(b){var c,d=this,e=a(b?b.currentTarget:this.element),f=this._find(e);return f?(c=f.tooltip,void(f.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&!e.attr("title")&&e.attr("title",e.data("ui-tooltip-title")),this._removeDescribedBy(e),f.hiding=!0,c.stop(!0),this._hide(c,this.options.hide,function(){d._removeTooltip(a(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),b&&"mouseleave"===b.type&&a.each(this.parents,function(b,c){a(c.element).attr("title",c.title),delete d.parents[b]}),f.closing=!0,this._trigger("close",b,{tooltip:c}),f.hiding||(f.closing=!1)))):void e.removeData("ui-tooltip-open")},_tooltip:function(b){var c=a("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),d=c.uniqueId().attr("id");return a("<div>").addClass("ui-tooltip-content").appendTo(c),c.appendTo(this.document[0].body),this.tooltips[d]={element:b,tooltip:c}},_find:function(a){var b=a.data("ui-tooltip-id");return b?this.tooltips[b]:null},_removeTooltip:function(a){a.remove(),delete this.tooltips[a.attr("id")]},_destroy:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur"),f=d.element;e.target=e.currentTarget=f[0],b.close(e,!0),a("#"+c).remove(),f.data("ui-tooltip-title")&&(f.attr("title")||f.attr("title",f.data("ui-tooltip-title")),f.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),!function(a){function b(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var c,d=a.ui.mouse.prototype,e=d._mouseInit,f=d._mouseDestroy;d._touchStart=function(a){var d=this;!c&&d._mouseCapture(a.originalEvent.changedTouches[0])&&(c=!0,d._touchMoved=!1,b(a,"mouseover"),b(a,"mousemove"),b(a,"mousedown"))},d._touchMove=function(a){c&&(this._touchMoved=!0,b(a,"mousemove"))},d._touchEnd=function(a){c&&(b(a,"mouseup"),b(a,"mouseout"),this._touchMoved||b(a,"click"),c=!1)},d._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),e.call(b)},d._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),f.call(b)}}}(jQuery),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(b){var c="function"==typeof define&&define.amd,d="undefined"!=typeof module&&module.exports,e="https:"==document.location.protocol?"https:":"http:",f="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";c||(d?require("jquery-mousewheel")(a):a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src="+e+"//"+f+"%3E%3C/script%3E"))),b()}(function(){var b,c="mCustomScrollbar",d="mCS",e=".mCustomScrollbar",f={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},g=0,h={},i=window.attachEvent&&!window.addEventListener?1:0,j=!1,k=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],l={init:function(b){var b=a.extend(!0,{},f,b),c=m.call(this);if(b.live){var i=b.liveSelector||this.selector||e,j=a(i);if("off"===b.live)return void o(i);h[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(c).each(function(){var c=a(this);if(!c.data(d)){c.data(d,{idx:++g,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=c.data(d),f=e.opt,h=c.data("mcs-axis"),i=c.data("mcs-scrollbar-position"),j=c.data("mcs-theme");h&&(f.axis=h),i&&(f.scrollbarPosition=i),j&&(f.theme=j,n(f)),r.call(this),e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,c)}})},update:function(b,c){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(d)){var e=b.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=a("#mCSB_"+e.idx),i=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&W(b),c&&e&&f.callbacks.onBeforeUpdate&&"function"==typeof f.callbacks.onBeforeUpdate&&f.callbacks.onBeforeUpdate.call(this),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),h.css("max-height","none"),h.height()!==b.height()&&h.css("max-height",b.height()),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g)),e.overflowed=y.call(this),C.call(this),f.autoDraggerLength&&v.call(this),w.call(this),A.call(this);var j=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?i[0].height()>i[0].parent().height()?z.call(this):(X(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(z.call(this),"y"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[1]&&X(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?i[1].width()>i[1].parent().width()?z.call(this):(X(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(z.call(this),"x"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[0]&&X(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),c&&e&&(2===c&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===c&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)),U.call(this)}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,c),j=S.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=T.call(this,j[0],"y"),j[1]=T.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=ea()?0:k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",X(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",X(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(d)&&W(b)})},disable:function(b){var c=m.call(this);return a(c).each(function(){var c=a(this);c.data(d)&&(c.data(d),U.call(this,"remove"),B.call(this),b&&z.call(this),C.call(this,!0),c.addClass(k[3]))})},destroy:function(){var b=m.call(this);return a(b).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(b).selector),U.call(this,"remove"),B.call(this),z.call(this),e.removeData(d),_(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(c+" _"+d+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?e:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=!(a.inArray(b.theme,c)>-1)&&b.autoDraggerLength,b.autoExpandScrollbar=!(a.inArray(b.theme,d)>-1)&&b.autoExpandScrollbar,b.scrollButtons.enable=!(a.inArray(b.theme,e)>-1)&&b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1||b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){h[a]&&(clearTimeout(h[a]),_(h,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var b=a(this),e=b.data(d),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["<div id='mCSB_"+e.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+f.theme+" mCSB_scrollTools_vertical"+g+"'><div class='"+k[12]+"'><div id='mCSB_"+e.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+e.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+f.theme+" mCSB_scrollTools_horizontal"+g+"'><div class='"+k[12]+"'><div id='mCSB_"+e.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"<div id='mCSB_"+e.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:"";f.setWidth&&b.css("width",f.setWidth),f.setHeight&&b.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,b.addClass(c+" _"+d+"_"+e.idx+m+n).wrapInner("<div id='mCSB_"+e.idx+"' class='mCustomScrollBox mCS-"+f.theme+" "+i+"'><div id='mCSB_"+e.idx+"_container' class='mCSB_container' style='position:relative; top:"+f.setTop+"; left:"+f.setLeft+";' dir='"+e.langDir+"' /></div>");var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p)),"outside"===f.scrollbarPosition?("static"===b.css("position")&&b.css("position","relative"),b.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){var c=[b[0].scrollWidth,Math.max.apply(Math,b.children().map(function(){return a(this).outerWidth(!0)}).get())],d=b.parent().width();return c[0]>d?c[0]:c[1]>d?c[1]:"100%"},t=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){f.css({width:"auto","min-width":0,"overflow-x":"scroll"});var g=Math.ceil(f[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&g>f.parent().width()?f.css({width:g,"min-width":"100%","overflow-x":"inherit"}):f.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},u=function(){var b=a(this),c=b.data(d),e=c.opt,f=a(".mCSB_"+c.idx+"_scrollbar:first"),g=ca(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["<a href='#' class='"+k[13]+"' "+g+" />","<a href='#' class='"+k[14]+"' "+g+" />","<a href='#' class='"+k[15]+"' "+g+" />","<a href='#' class='"+k[16]+"' "+g+" />"],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(h[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(h[1]*g[1].parent().width())],k=i&&j[1]<j[0]?j[0]:j[1],l=i&&j[3]<j[2]?j[2]:j[3];g[0].css({height:k,"max-height":g[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":j[0]+"px"}),g[1].css({width:l,"max-width":g[1].parent().width()-10})},w=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[f.outerHeight(!1)-e.height(),f.outerWidth(!1)-e.width()],i=[h[0]/(g[0].parent().height()-g[0].height()),h[1]/(g[1].parent().width()-g[1].width())];
6
+ c.scrollRatio={y:i[0],x:i[1]}},x=function(a,b,c){var d=c?k[0]+"_expanded":"",e=a.closest(".mCSB_scrollTools");"active"===b?(a.toggleClass(k[0]+" "+d),e.toggleClass(k[1]),a[0]._draggable=a[0]._draggable?0:1):a[0]._draggable||("hide"===b?(a.removeClass(k[0]),e.removeClass(k[1])):(a.addClass(k[0]),e.addClass(k[1])))},y=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=null==c.overflowed?f.height():f.outerHeight(!1),h=null==c.overflowed?f.width():f.outerWidth(!1),i=f[0].scrollHeight,j=f[0].scrollWidth;return i>g&&(g=i),j>h&&(h=j),[g>e.height(),h>e.width()]},z=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx),g=a("#mCSB_"+c.idx+"_container"),h=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(W(b),("x"!==e.axis&&!c.overflowed[0]||"y"===e.axis&&c.overflowed[0])&&(h[0].add(g).css("top",0),X(b,"_resetY")),"y"!==e.axis&&!c.overflowed[1]||"x"===e.axis&&c.overflowed[1]){var i=dx=0;"rtl"===c.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/c.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),X(b,"_resetX")}},A=function(){function b(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),H.call(c[0])):b()},100)}var c=a(this),e=c.data(d),f=e.opt;if(!e.bindEvents){if(E.call(this),f.contentTouchScroll&&F.call(this),G.call(this),f.mouseWheel.enable){var g;b()}M.call(this),O.call(this),f.advanced.autoScrollOnFocus&&N.call(this),f.scrollButtons.enable&&P.call(this),f.keyboard.enable&&Q.call(this),e.bindEvents=!0}},B=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=".mCSB_"+c.idx+"_scrollbar",h=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+c.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),e.advanced.extraDraggableSelectors&&h.add(a(e.advanced.extraDraggableSelectors)),c.bindEvents&&(a(document).add(a(!J()||top.document)).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),_(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),_(c.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),_(i[0],"onCompleteTimeout"),c.bindEvents=!1)},C=function(b){var c=a(this),e=c.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?c.removeClass(k[5]):c.addClass(k[5])},D=function(b){var c=b.type,d=b.target.ownerDocument!==document&&null!==frameElement?[a(frameElement).offset().top,a(frameElement).offset().left]:null,e=J()&&b.target.ownerDocument!==top.document&&null!==frameElement?[a(b.view.frameElement).offset().top,a(b.view.frameElement).offset().left]:[0,0];switch(c){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return d?[b.originalEvent.pageY-d[0]+e[0],b.originalEvent.pageX-d[1]+e[1],!1]:[b.originalEvent.pageY,b.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var f=b.originalEvent.touches[0]||b.originalEvent.changedTouches[0],g=b.originalEvent.touches.length||b.originalEvent.changedTouches.length;return b.target.ownerDocument!==document?[f.screenY,f.screenX,g>1]:[f.pageY,f.pageX,g>1];default:return d?[b.pageY-d[0]+e[0],b.pageX-d[1]+e[1],!1]:[b.pageY,b.pageX,!1]}},E=function(){function b(a,b,d,e){if(n[0].idleTimer=k.scrollInertia<233?250:0,c.attr("id")===m[1])var f="x",i=(c[0].offsetLeft-b+e)*h.scrollRatio.x;else var f="y",i=(c[0].offsetTop-a+d)*h.scrollRatio.y;X(g,i.toString(),{dir:f,drag:!0})}var c,e,f,g=a(this),h=g.data(d),k=h.opt,l=d+"_"+h.idx,m=["mCSB_"+h.idx+"_dragger_vertical","mCSB_"+h.idx+"_dragger_horizontal"],n=a("#mCSB_"+h.idx+"_container"),o=a("#"+m[0]+",#"+m[1]),p=k.advanced.releaseDraggableSelectors?o.add(a(k.advanced.releaseDraggableSelectors)):o,q=k.advanced.extraDraggableSelectors?a(!J()||top.document).add(a(k.advanced.extraDraggableSelectors)):a(!J()||top.document);o.bind("contextmenu."+l,function(a){a.preventDefault()}).bind("mousedown."+l+" touchstart."+l+" pointerdown."+l+" MSPointerDown."+l,function(b){if(b.stopImmediatePropagation(),b.preventDefault(),aa(b)){j=!0,i&&(document.onselectstart=function(){return!1}),K.call(n,!1),W(g),c=a(this);var d=c.offset(),h=D(b)[0]-d.top,l=D(b)[1]-d.left,m=c.height()+d.top,o=c.width()+d.left;m>h&&h>0&&o>l&&l>0&&(e=h,f=l),x(c,"active",k.autoExpandScrollbar)}}).bind("touchmove."+l,function(a){a.stopImmediatePropagation(),a.preventDefault();var d=c.offset(),g=D(a)[0]-d.top,h=D(a)[1]-d.left;b(e,f,g,h)}),a(document).add(q).bind("mousemove."+l+" pointermove."+l+" MSPointerMove."+l,function(a){if(c){var d=c.offset(),g=D(a)[0]-d.top,h=D(a)[1]-d.left;if(e===g&&f===h)return;b(e,f,g,h)}}).add(p).bind("mouseup."+l+" touchend."+l+" pointerup."+l+" MSPointerUp."+l,function(){c&&(x(c,"active",k.autoExpandScrollbar),c=null),j=!1,i&&(document.onselectstart=null),K.call(n,!0)})},F=function(){function c(a){if(!ba(a)||j||D(a)[2])return void(b=0);b=1,w=0,x=0,k=1,y.removeClass("mCS_touch_action");var c=E.offset();l=D(a)[0]-c.top,m=D(a)[1]-c.left,L=[D(a)[0],D(a)[1]]}function e(a){if(ba(a)&&!j&&!D(a)[2]&&(A.documentTouchScroll||a.preventDefault(),a.stopImmediatePropagation(),(!x||w)&&k)){q=Z();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left,e="mcsLinearOut";if(G.push(c),H.push(d),L[2]=Math.abs(D(a)[0]-L[0]),L[3]=Math.abs(D(a)[1]-L[1]),z.overflowed[0])var f=F[0].parent().height()-F[0].height(),g=l-c>0&&c-l>-(f*z.scrollRatio.y)&&(2*L[3]<L[2]||"yx"===A.axis);if(z.overflowed[1])var h=F[1].parent().width()-F[1].width(),n=m-d>0&&d-m>-(h*z.scrollRatio.x)&&(2*L[2]<L[3]||"yx"===A.axis);g||n?(O||a.preventDefault(),w=1):(x=1,y.addClass("mCS_touch_action")),O&&a.preventDefault(),u="yx"===A.axis?[l-c,m-d]:"x"===A.axis?[null,m-d]:[l-c,null],E[0].idleTimer=250,z.overflowed[0]&&i(u[0],I,e,"y","all",!0),z.overflowed[1]&&i(u[1],I,e,"x",K,!0)}}function f(a){if(!ba(a)||j||D(a)[2])return void(b=0);b=1,a.stopImmediatePropagation(),W(y),p=Z();var c=C.offset();n=D(a)[0]-c.top,o=D(a)[1]-c.left,G=[],H=[]}function g(a){if(ba(a)&&!j&&!D(a)[2]){k=0,a.stopImmediatePropagation(),w=0,x=0,r=Z();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left;if(!(r-q>30)){t=1e3/(r-p);var e="mcsEaseOut",f=2.5>t,g=f?[G[G.length-2],H[H.length-2]]:[0,0];s=f?[c-g[0],d-g[1]]:[c-n,d-o];var l=[Math.abs(s[0]),Math.abs(s[1])];t=f?[Math.abs(s[0]/4),Math.abs(s[1]/4)]:[t,t];var m=[Math.abs(E[0].offsetTop)-s[0]*h(l[0]/t[0],t[0]),Math.abs(E[0].offsetLeft)-s[1]*h(l[1]/t[1],t[1])];u="yx"===A.axis?[m[0],m[1]]:"x"===A.axis?[null,m[1]]:[m[0],null],v=[4*l[0]+A.scrollInertia,4*l[1]+A.scrollInertia];var y=parseInt(A.contentTouchScroll)||0;u[0]=l[0]>y?u[0]:0,u[1]=l[1]>y?u[1]:0,z.overflowed[0]&&i(u[0],v[0],e,"y",K,!1),z.overflowed[1]&&i(u[1],v[1],e,"x",K,!1)}}}function h(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function i(a,b,c,d,e,f){a&&X(y,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:f})}var k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a(this),z=y.data(d),A=z.opt,B=d+"_"+z.idx,C=a("#mCSB_"+z.idx),E=a("#mCSB_"+z.idx+"_container"),F=[a("#mCSB_"+z.idx+"_dragger_vertical"),a("#mCSB_"+z.idx+"_dragger_horizontal")],G=[],H=[],I=0,K="yx"===A.axis?"none":"all",L=[],M=E.find("iframe"),N=["touchstart."+B+" pointerdown."+B+" MSPointerDown."+B,"touchmove."+B+" pointermove."+B+" MSPointerMove."+B,"touchend."+B+" pointerup."+B+" MSPointerUp."+B],O=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;E.bind(N[0],function(a){c(a)}).bind(N[1],function(a){e(a)}),C.bind(N[0],function(a){f(a)}).bind(N[2],function(a){g(a)}),M.length&&M.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(N[0],function(a){c(a),f(a)}).bind(N[1],function(a){e(a)}).bind(N[2],function(a){g(a)})})})},G=function(){function c(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function e(a,b,c){k.type=c&&f?"stepped":"stepless",k.scrollAmount=10,R(g,a,b,"mcsLinearOut",c?60:null)}var f,g=a(this),h=g.data(d),i=h.opt,k=h.sequential,l=d+"_"+h.idx,m=a("#mCSB_"+h.idx+"_container"),n=m.parent();m.bind("mousedown."+l,function(){b||f||(f=1,j=!0)}).add(document).bind("mousemove."+l,function(a){if(!b&&f&&c()){var d=m.offset(),g=D(a)[0]-d.top+m[0].offsetTop,j=D(a)[1]-d.left+m[0].offsetLeft;g>0&&g<n.height()&&j>0&&j<n.width()?k.step&&e("off",null,"stepped"):("x"!==i.axis&&h.overflowed[0]&&(0>g?e("on",38):g>n.height()&&e("on",40)),"y"!==i.axis&&h.overflowed[1]&&(0>j?e("on",37):j>n.width()&&e("on",39)))}}).bind("mouseup."+l+" dragend."+l,function(){b||(f&&(f=0,e("off",null)),j=!1)})},H=function(){function b(b,d){if(W(c),!L(c,b.target)){var g="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):i&&b.deltaFactor<100?100:b.deltaFactor||100,k=f.scrollInertia;if("x"===f.axis||"x"===f.mouseWheel.axis)var l="x",m=[Math.round(g*e.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.width()?.9*h.width():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetLeft),p=j[1][0].offsetLeft,q=j[1].parent().width()-j[1].width(),r="y"===f.mouseWheel.axis?b.deltaY||d:b.deltaX;else var l="y",m=[Math.round(g*e.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.height()?.9*h.height():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetTop),p=j[0][0].offsetTop,q=j[0].parent().height()-j[0].height(),r=b.deltaY||d;"y"===l&&!e.overflowed[0]||"x"===l&&!e.overflowed[1]||((f.mouseWheel.invert||b.webkitDirectionInvertedFromDevice)&&(r=-r),f.mouseWheel.normalizeDelta&&(r=0>r?-1:1),(r>0&&0!==p||0>r&&p!==q||f.mouseWheel.preventDefault)&&(b.stopImmediatePropagation(),b.preventDefault()),b.deltaFactor<5&&!f.mouseWheel.normalizeDelta&&(n=b.deltaFactor,k=17),X(c,(o-r*n).toString(),{dir:l,dur:k}))}}if(a(this).data(d)){var c=a(this),e=c.data(d),f=e.opt,g=d+"_"+e.idx,h=a("#mCSB_"+e.idx),j=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")],k=a("#mCSB_"+e.idx+"_container").find("iframe");k.length&&k.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+g,function(a,c){b(a,c)})})}),h.bind("mousewheel."+g,function(a,c){b(a,c)})}},I=new Object,J=function(b){var c=!1,d=!1,e=null;if(void 0===b?d="#empty":void 0!==a(b).attr("id")&&(d=a(b).attr("id")),d!==!1&&void 0!==I[d])return I[d];if(b){try{var f=b.contentDocument||b.contentWindow.document;e=f.body.innerHTML}catch(a){}c=null!==e}else{try{var f=top.document;e=f.body.innerHTML}catch(a){}c=null!==e}return d!==!1&&(I[d]=c),c},K=function(a){var b=this.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}},L=function(b,c){var e=c.nodeName.toLowerCase(),f=b.data(d).opt.mouseWheel.disableOver,g=["select","textarea"];return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(c).is(":focus"))},M=function(){var b,c=a(this),e=c.data(d),f=d+"_"+e.idx,g=a("#mCSB_"+e.idx+"_container"),h=g.parent(),i=a(".mCSB_"+e.idx+"_scrollbar ."+k[12]);i.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(c){j=!0,a(c.target).hasClass("mCSB_dragger")||(b=1)}).bind("touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(){j=!1}).bind("click."+f,function(d){if(b&&(b=0,a(d.target).hasClass(k[12])||a(d.target).hasClass("mCSB_draggerRail"))){W(c);var f=a(this),i=f.find(".mCSB_dragger");if(f.parent(".mCSB_scrollTools_horizontal").length>0){if(!e.overflowed[1])return;var j="x",l=d.pageX>i.offset().left?-1:1,m=Math.abs(g[0].offsetLeft)-l*(.9*h.width())}else{if(!e.overflowed[0])return;var j="y",l=d.pageY>i.offset().top?-1:1,m=Math.abs(g[0].offsetTop)-l*(.9*h.height())}X(c,m.toString(),{dir:j,scrollEasing:"mcsEaseInOut"})}})},N=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=a("#mCSB_"+c.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(){var c=a(document.activeElement),d=g.find(".mCustomScrollBox").length,f=0;c.is(e.advanced.autoScrollOnFocus)&&(W(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=d?(f+17)*d:0,b[0]._focusTimeout=setTimeout(function(){var a=[da(c)[0],da(c)[1]],d=[g[0].offsetTop,g[0].offsetLeft],i=[d[0]+a[0]>=0&&d[0]+a[0]<h.height()-c.outerHeight(!1),d[1]+a[1]>=0&&d[0]+a[1]<h.width()-c.outerWidth(!1)],j="yx"!==e.axis||i[0]||i[1]?"all":"none";"x"===e.axis||i[0]||X(b,a[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:j,dur:f}),"y"===e.axis||i[1]||X(b,a[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:j,dur:f})},b[0]._focusTimer))})},O=function(){var b=a(this),c=b.data(d),e=d+"_"+c.idx,f=a("#mCSB_"+c.idx+"_container").parent();f.bind("scroll."+e,function(){0===f.scrollTop()&&0===f.scrollLeft()||a(".mCSB_"+c.idx+"_scrollbar").css("visibility","hidden")})},P=function(){var b=a(this),c=b.data(d),e=c.opt,f=c.sequential,g=d+"_"+c.idx,h=".mCSB_"+c.idx+"_scrollbar",i=a(h+">a");i.bind("contextmenu."+g,function(a){a.preventDefault()}).bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(d){function g(a,c){f.scrollAmount=e.scrollButtons.scrollAmount,R(b,a,c)}if(d.preventDefault(),aa(d)){var h=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,d.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;j=!0,c.tweenRunning=!1,g("on",h);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;j=!1,f.dir&&g("off",h);break;case"click":if("stepped"!==f.type||c.tweenRunning)return;g("on",h)}}})},Q=function(){function b(b){function d(a,b){g.type=f.keyboard.scrollType,g.scrollAmount=f.keyboard.scrollAmount,"stepped"===g.type&&e.tweenRunning||R(c,a,b)}switch(b.type){case"blur":e.tweenRunning&&g.dir&&d("off",null);break;case"keydown":case"keyup":var h=b.keyCode?b.keyCode:b.which,i="on";if("x"!==f.axis&&(38===h||40===h)||"y"!==f.axis&&(37===h||39===h)){if((38===h||40===h)&&!e.overflowed[0]||(37===h||39===h)&&!e.overflowed[1])return;"keyup"===b.type&&(i="off"),a(document.activeElement).is(l)||(b.preventDefault(),b.stopImmediatePropagation(),d(i,h))}else if(33===h||34===h){if((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type){W(c);var m=34===h?-1:1;if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=Math.abs(j[0].offsetLeft)-m*(.9*k.width());else var n="y",o=Math.abs(j[0].offsetTop)-m*(.9*k.height());X(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===h||36===h)&&!a(document.activeElement).is(l)&&((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type)){if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=35===h?Math.abs(k.width()-j.outerWidth(!1)):0;else var n="y",o=35===h?Math.abs(k.height()-j.outerHeight(!1)):0;X(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}}var c=a(this),e=c.data(d),f=e.opt,g=e.sequential,h=d+"_"+e.idx,i=a("#mCSB_"+e.idx),j=a("#mCSB_"+e.idx+"_container"),k=j.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']",m=j.find("iframe"),n=["blur."+h+" keydown."+h+" keyup."+h];m.length&&m.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(n[0],function(a){b(a)})})}),i.attr("tabindex","0").bind(n[0],function(a){b(a)})},R=function(b,c,e,f,g){function h(a){l.snapAmount&&(m.scrollAmount=l.snapAmount instanceof Array?"x"===m.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var c="stepped"!==m.type,d=g?g:a?c?p/1.5:q:1e3/60,e=a?c?7.5:40:2.5,i=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)],k=[j.scrollRatio.y>10?10:j.scrollRatio.y,j.scrollRatio.x>10?10:j.scrollRatio.x],o="x"===m.dir[0]?i[1]+m.dir[1]*(k[1]*e):i[0]+m.dir[1]*(k[0]*e),r="x"===m.dir[0]?i[1]+m.dir[1]*parseInt(m.scrollAmount):i[0]+m.dir[1]*parseInt(m.scrollAmount),s="auto"!==m.scrollAmount?r:o,t=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",u=!!a;return a&&17>d&&(s="x"===m.dir[0]?i[1]:i[0]),X(b,s.toString(),{dir:m.dir[0],scrollEasing:t,dur:d,onComplete:u}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=setTimeout(function(){h()},d)))}function i(){clearTimeout(m.step),_(m,"step"),W(b)}var j=b.data(d),l=j.opt,m=j.sequential,n=a("#mCSB_"+j.idx+"_container"),o="stepped"===m.type,p=l.scrollInertia<26?26:l.scrollInertia,q=l.scrollInertia<1?17:l.scrollInertia;switch(c){case"on":if(m.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],W(b),ca(e)&&"stepped"===m.type)return;h(o);break;case"off":i(),(o||j.tweenRunning&&m.dir)&&h(!0)}},S=function(b){var c=a(this).data(d).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===c.axis?null:b,e[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},T=function(b,c){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;c||(c="x"===g.axis?"x":"y");var k="x"===c?h.outerWidth(!1)-i.width():h.outerHeight(!1)-i.height(),m="x"===c?h[0].offsetLeft:h[0].offsetTop,n="x"===c?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===c?da(o)[1]:da(o)[0];case"string":case"number":if(ca(b))return Math.abs(b);if(-1!==b.indexOf("%"))return Math.abs(k*parseInt(b)/100);if(-1!==b.indexOf("-="))return Math.abs(m-parseInt(b.split("-=")[1]));if(-1!==b.indexOf("+=")){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==b.indexOf("px")&&ca(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===c?da(o)[1]:da(o)[0]}return a(b).length?"x"===c?da(a(b))[1]:da(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},U=function(b){function c(){return clearTimeout(m[0].autoUpdate),0===h.parents("html").length?void(h=null):void(m[0].autoUpdate=setTimeout(function(){return j.advanced.updateOnSelectorChange&&(i.poll.change.n=f(),i.poll.change.n!==i.poll.change.o)?(i.poll.change.o=i.poll.change.n,void g(3)):j.advanced.updateOnContentResize&&(i.poll.size.n=h[0].scrollHeight+h[0].scrollWidth+m[0].offsetHeight+h[0].offsetHeight+h[0].offsetWidth,i.poll.size.n!==i.poll.size.o)?(i.poll.size.o=i.poll.size.n,void g(1)):!j.advanced.updateOnImageLoad||"auto"===j.advanced.updateOnImageLoad&&"y"===j.axis||(i.poll.img.n=m.find("img").length,i.poll.img.n===i.poll.img.o)?void((j.advanced.updateOnSelectorChange||j.advanced.updateOnContentResize||j.advanced.updateOnImageLoad)&&c()):(i.poll.img.o=i.poll.img.n,void m.find("img").each(function(){e(this)}))},j.advanced.autoUpdateTimeout))}function e(b){function c(a,b){return function(){return b.apply(a,arguments)}}function d(){this.onload=null,a(b).addClass(k[2]),g(2)}if(a(b).hasClass(k[2]))return void g();var e=new Image;e.onload=c(e,d),e.src=b.src}function f(){j.advanced.updateOnSelectorChange===!0&&(j.advanced.updateOnSelectorChange="*");var a=0,b=m.find(j.advanced.updateOnSelectorChange);return j.advanced.updateOnSelectorChange&&b.length>0&&b.each(function(){a+=this.offsetHeight+this.offsetWidth}),a}function g(a){clearTimeout(m[0].autoUpdate),l.update.call(null,h[0],a)}var h=a(this),i=h.data(d),j=i.opt,m=a("#mCSB_"+i.idx+"_container");return b?(clearTimeout(m[0].autoUpdate),void _(m[0],"autoUpdate")):void c()},V=function(a,b,c){return Math.round(a/b)*b-c},W=function(b){var c=b.data(d),e=a("#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal");e.each(function(){$.call(this)})},X=function(b,c,e){function f(a){return i&&j.callbacks[a]&&"function"==typeof j.callbacks[a]}function g(){return[j.callbacks.alwaysTriggerOffsets||u>=v[0]+y,j.callbacks.alwaysTriggerOffsets||-z>=u]}function h(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[s[0].offsetTop,s[0].offsetLeft],d=[n.outerHeight(!1),n.outerWidth(!1)],f=[m.height(),m.width()];b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var i=b.data(d),j=i.opt,k={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:j.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(k,e),l=[e.dur,e.drag?0:e.dur],m=a("#mCSB_"+i.idx),n=a("#mCSB_"+i.idx+"_container"),o=n.parent(),p=j.callbacks.onTotalScrollOffset?S.call(b,j.callbacks.onTotalScrollOffset):[0,0],q=j.callbacks.onTotalScrollBackOffset?S.call(b,j.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=e.trigger,0===o.scrollTop()&&0===o.scrollLeft()||(a(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),o.scrollTop(0).scrollLeft(0)),"_resetY"!==c||i.contentReset.y||(f("onOverflowYNone")&&j.callbacks.onOverflowYNone.call(b[0]),i.contentReset.y=1),"_resetX"!==c||i.contentReset.x||(f("onOverflowXNone")&&j.callbacks.onOverflowXNone.call(b[0]),i.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){if(!i.contentReset.y&&b[0].mcs||!i.overflowed[0]||(f("onOverflowY")&&j.callbacks.onOverflowY.call(b[0]),i.contentReset.x=null),!i.contentReset.x&&b[0].mcs||!i.overflowed[1]||(f("onOverflowX")&&j.callbacks.onOverflowX.call(b[0]),i.contentReset.x=null),j.snapAmount){var r=j.snapAmount instanceof Array?"x"===e.dir?j.snapAmount[1]:j.snapAmount[0]:j.snapAmount;c=V(c,r,j.snapOffset)}switch(e.dir){case"x":var s=a("#mCSB_"+i.idx+"_dragger_horizontal"),t="left",u=n[0].offsetLeft,v=[m.width()-n.outerWidth(!1),s.parent().width()-s.width()],w=[c,0===c?0:c/i.scrollRatio.x],y=p[1],z=q[1],A=y>0?y/i.scrollRatio.x:0,B=z>0?z/i.scrollRatio.x:0;break;case"y":var s=a("#mCSB_"+i.idx+"_dragger_vertical"),t="top",u=n[0].offsetTop,v=[m.height()-n.outerHeight(!1),s.parent().height()-s.height()],w=[c,0===c?0:c/i.scrollRatio.y],y=p[0],z=q[0],A=y>0?y/i.scrollRatio.y:0,B=z>0?z/i.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=v[1]?w=[v[0],v[1]]:w[0]=-w[0],b[0].mcs||(h(),f("onInit")&&j.callbacks.onInit.call(b[0])),clearTimeout(n[0].onCompleteTimeout),Y(s[0],t,Math.round(w[1]),l[1],e.scrollEasing),!i.tweenRunning&&(0===u&&w[0]>=0||u===v[0]&&w[0]<=v[0])||Y(n[0],t,Math.round(w[0]),l[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!i.tweenRunning&&(f("onScrollStart")&&(h(),j.callbacks.onScrollStart.call(b[0])),i.tweenRunning=!0,x(s),i.cbOffsets=g())},onUpdate:function(){e.callbacks&&e.onUpdate&&f("whileScrolling")&&(h(),j.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===j.axis&&clearTimeout(n[0].onCompleteTimeout);var a=n[0].idleTimer||0;n[0].onCompleteTimeout=setTimeout(function(){f("onScroll")&&(h(),j.callbacks.onScroll.call(b[0])),f("onTotalScroll")&&w[1]>=v[1]-A&&i.cbOffsets[0]&&(h(),j.callbacks.onTotalScroll.call(b[0])),f("onTotalScrollBack")&&w[1]<=B&&i.cbOffsets[1]&&(h(),j.callbacks.onTotalScrollBack.call(b[0])),i.tweenRunning=!1,n[0].idleTimer=0,x(s,"hide")},a)}}})}},Y=function(a,b,c,d,e,f,g){function h(){v.stop||(s||o.call(),s=Z()-r,i(),s>=v.time&&(v.time=s>v.time?s+m-(s-v.time):s+m-1,v.time<s+1&&(v.time=s+1)),v.time<d?v.id=n(h):q.call())}function i(){d>0?(v.currVal=l(v.time,t,w,d,e),u[b]=Math.round(v.currVal)+"px"):u[b]=c+"px",p.call()}function j(){m=1e3/60,v.time=s+m,n=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return i(),setTimeout(a,.01)},v.id=n(h)}function k(){null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null)}function l(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,1>a?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,1>a?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,1>a?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var m,n,g=g||{},o=g.onStart||function(){},p=g.onUpdate||function(){},q=g.onComplete||function(){},r=Z(),s=0,t=a.offsetTop,u=a.style,v=a._mTween[b];"left"===b&&(t=a.offsetLeft);var w=c-t;v.stop=0,"none"!==f&&k(),j()},Z=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},$=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c<b.length;c++){var d=b[c];a._mTween[d].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(a._mTween[d].id):clearTimeout(a._mTween[d].id),a._mTween[d].id=null,a._mTween[d].stop=1)}},_=function(a,b){try{delete a[b]}catch(c){a[b]=null}},aa=function(a){return!(a.which&&1!==a.which)},ba=function(a){var b=a.originalEvent.pointerType;return!(b&&"touch"!==b&&2!==b)},ca=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},da=function(a){var b=a.parents(".mCSB_container");return[a.offset().top-b.offset().top,a.offset().left-b.offset().left]},ea=function(){function a(){var a=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var b=0;b<a.length;b++)if(a[b]+"Hidden"in document)return a[b]+"Hidden";return null}var b=a();return!!b&&document[b]};a.fn[c]=function(b){return l[b]?l[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):l.init.apply(this,arguments)},a[c]=function(b){return l[b]?l[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):l.init.apply(this,arguments)},a[c].defaults=f,window[c]=!0,a(window).bind("load",function(){a(e)[c](),a.extend(a.expr[":"],{mcsInView:a.expr[":"].mcsInView||function(b){var c,d,e=a(b),f=e.parents(".mCSB_container");if(f.length)return c=f.parent(),d=[f[0].offsetTop,f[0].offsetLeft],d[0]+da(e)[0]>=0&&d[0]+da(e)[0]<c.height()-e.outerHeight(!1)&&d[1]+da(e)[1]>=0&&d[1]+da(e)[1]<c.width()-e.outerWidth(!1)},mcsInSight:a.expr[":"].mcsInSight||function(b,c,d){var e,f,g,h,i=a(b),j=i.parents(".mCSB_container"),k="exact"===d[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(j.length)return e=[i.outerHeight(!1),i.outerWidth(!1)],g=[j[0].offsetTop+da(i)[0],j[0].offsetLeft+da(i)[1]],f=[j.parent()[0].offsetHeight,j.parent()[0].offsetWidth],h=[e[0]<f[0]?k[0]:k[1],e[1]<f[1]?k[0]:k[1]],g[0]-f[0]*h[0][0]<0&&g[0]+e[0]-f[0]*h[0][1]>=0&&g[1]-f[1]*h[1][0]<0&&g[1]+e[1]-f[1]*h[1][1]>=0},mcsOverflow:a.expr[":"].mcsOverflow||function(b){var c=a(b).data(d);if(c)return c.overflowed[0]||c.overflowed[1]}})})})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){function b(a,b){return v.call(a,b)}function c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=t.map,p=o&&o["*"]||{};if(a){for(g=(a=a.split("/")).length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&n&&(a=n.slice(0,n.length-1).concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),--k;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;0<k&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((n||p)&&o){for(k=(c=a.split("/")).length;0<k;--k){if(d=c.slice(0,k).join("/"),n)for(l=n.length;0<l;--l)if(e=(e=o[n.slice(0,l).join("/")])&&e[d]){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function d(a,b){return function(){var c=w.call(arguments,0);return"string"!=typeof c[0]&&1===c.length&&c.push(null),o.apply(m,c.concat([a,b]))}}function e(a){return function(b){r[a]=b}}function f(a){if(b(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(m,c)}if(!b(r,a)&&!b(u,a))throw new Error("No "+a);return r[a]}function g(a){var b,c=a?a.indexOf("!"):-1;return-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function h(a){return a?g(a):[]}if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var i=a.fn.select2.amd;var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;return i&&i.requirejs||(i?k=i:i={},r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/,p=function(a,b){var d,e,h=g(a),i=h[0],j=b[1];return a=h[1],i&&(d=f(i=c(i,j))),i?a=d&&d.normalize?d.normalize(a,(e=j,function(a){return c(a,e)})):c(a,j):(i=(h=g(a=c(a,j)))[0],a=h[1],i&&(d=f(i))),{f:i?i+"!"+a:a,n:a,pr:i,p:d}},q={require:function(a){return d(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:(b=a,function(){return t&&t.config&&t.config[b]||{}})};var b}},n=function(a,c,g,i){var j,k,l,n,o,t,v,w=[],x=typeof g;if(t=h(i=i||a),"undefined"==x||"function"==x){for(c=!c.length&&g.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if("require"===(k=(n=p(c[o],t)).f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)j=w[o]=q.module(a);else if(b(r,k)||b(s,k)||b(u,k))w[o]=f(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,d(i,!0),e(k),{}),w[o]=r[k]}l=g?g.apply(r[a],w):void 0,a&&(j&&j.exports!==m&&j.exports!==r[a]?r[a]=j.exports:l===m&&v||(r[a]=l))}else a&&(r[a]=g)},j=k=o=function(a,b,c,d,e){if("string"==typeof a)return q[a]?q[a](b):f(p(a,h(b)).f);if(!a.splice){if((t=a).deps&&o(t.deps,t.callback),!b)return;b.splice?(a=b,b=c,c=null):a=m}return b=b||function(){},"function"==typeof c&&(c=d,d=e),d?n(m,a,b,c):setTimeout(function(){n(m,a,b,c)},4),o},o.config=function(a){return o(a)},j._defined=r,(l=function(a,c,d){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");c.splice||(d=c,c=[]),b(r,a)||b(s,a)||(s[a]=[a,c,d])}).amd={jQuery:!0},i.requirejs=j,i.require=k,i.define=l),i.define("almond",function(){}),i.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),i.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b)"function"==typeof b[d]&&"constructor"!==d&&c.push(d);return c}function c(){this.listeners={}}var d={};d.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d.Decorate=function(a,c){
7
+ function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;0<d&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new function(){this.constructor=d};for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=0;j<f.length;j++){var k=f[j];d.prototype[k]=e(k)}return d},c.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},c.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),(c[0]._type=a)in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},c.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},d.Observable=c,d.generateChars=function(a){for(var b="",c=0;c<a;c++)b+=Math.floor(36*Math.random()).toString(36);return b},d.bind=function(a,b){return function(){a.apply(b,arguments)}},d._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];(f=f.substring(0,1).toLowerCase()+f.substring(1))in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},d.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return(e!==f||"hidden"!==f&&"visible"!==f)&&("scroll"===e||"scroll"===f||d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth)},d.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},d.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},d.__cache={};var e=0;return d.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},d.StoreData=function(a,b,c){var e=d.GetUniqueElementId(a);d.__cache[e]||(d.__cache[e]={}),d.__cache[e][b]=c},d.GetData=function(b,c){var e=d.GetUniqueElementId(b);return c?d.__cache[e]&&null!=d.__cache[e][c]?d.__cache[e][c]:a(b).data(c):d.__cache[e]},d.RemoveData=function(a){var b=d.GetUniqueElementId(a);null!=d.__cache[b]&&delete d.__cache[b],a.removeAttribute("data-select2-id")},d}),i.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null!=a.results&&0!==a.results.length){a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");0<b.length?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&-1<a.inArray(f,e)?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(a)},c=this.option(b);c.className+=" loading-results",this.$results.prepend(c)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"option","aria-selected":"false"},f=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var g in(null!=c.element&&f.call(c.element,":disabled")||null==c.element&&c.disabled)&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]),e){var h=e[g];d.setAttribute(g,h)}if(c.children){var i=a(d),j=document.createElement("strong");j.className="select2-results__group",a(j),this.template(c,j);for(var k=[],l=0;l<c.children.length;l++){var m=c.children[l],n=this.option(m);k.push(n)}var o=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});o.append(k),i.append(j),i.append(o)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(!(c<=0)){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a)+1;if(!(c>=b.length)){var d=b.eq(c);d.trigger("mouseenter");var f=e.$results.offset().top+e.$results.outerHeight(!1),g=d.offset().top+d.outerHeight(!1),h=e.$results.scrollTop()+g-f;0===c?e.$results.scrollTop(0):f<g&&e.$results.scrollTop(h)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=0<a.deltaY&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");"true"!==d.attr("aria-selected")?e.trigger("select",{originalEvent:c,data:f}):e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]").index(a),c=this.$results.offset().top,d=a.offset().top,e=this.$results.scrollTop()+(d-c),f=d-c;e-=2*a.outerHeight(!1),b<=2?this.$results.scrollTop(0):(f>this.$results.outerHeight()||f<0)&&this.$results.scrollTop(e)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),i.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),i.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var c=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),c.attr("aria-disabled","false"),this.$selection=c},d.prototype.bind=function(a,b){var d=this,e=a.id+"-results";this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.trigger("focus"),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex),d.$selection.attr("aria-disabled","false")}),a.on("disable",function(){d.$selection.attr("tabindex","-1"),d.$selection.attr("aria-disabled","true")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target).closest(".select2");a(".select2.select2-container--open").each(function(){this!=d[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d}),i.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.trigger("focus")})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0!==a.length){var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d);var e=b.title||b.text;e?c.attr("title",e):c.removeAttr("title")}else this.clear()},e}),i.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.isDisabled()){var d=a(this).parent(),e=c.GetData(d[0],"data");f.trigger("unselect",{originalEvent:b,data:e})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g);var h=e.title||e.text;h&&f.attr("title",h),c.StoreData(f[0],"data",e),b.push(f)}var i=this.$selection.find(".select2-selection__rendered");c.appendMany(i,b)}},d}),i.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id;if(1<b.length||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),i.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},d.prototype._handleClear=function(a,b){if(!this.isDisabled()){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)this.$element.val(f);else{for(var h=0;h<e.length;h++)if(g={data:e[h]},this.trigger("unselect",g),g.prevented)return void this.$element.val(f);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},d.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},d.prototype.update=function(b,d){if(b.call(this,d),!(0<this.$selection.find(".select2-selection__placeholder").length||0===d.length)){var e=this.options.get("translations").get("removeAllItems"),f=a('<span class="select2-selection__clear" title="'+e()+'">&times;</span>');c.StoreData(f[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(f)}},d}),i.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,d,e){var f=this,g=d.id+"-results";a.call(this,d,e),d.on("open",function(){f.$search.attr("aria-controls",g),f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-controls"),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){a.data._resultId?f.$search.attr("aria-activedescendant",a.data._resultId):f.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(0<d.length){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(a){f.$search.val()&&a.stopPropagation()});var h=document.documentMode,i=h&&h<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){i?f.$selection.off("input.search input.searchcheck"):f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(i&&"input"===a.type)f.$selection.off("input.search input.searchcheck");else{var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.handleSearch(a)}})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.trigger("focus")},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";a=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").width():.75*(this.$search.val().length+1)+"em",this.$search.css("width",a)},d}),i.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),i.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),i.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),i.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),i.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];(a=[a]).push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("input").trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("input").trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("input").trigger("change")})}},d.prototype.bind=function(a,b){var c=this;(this.container=a).on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){b.RemoveData(this)})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var d;a.children?(d=document.createElement("optgroup")).label=a.text:void 0!==(d=document.createElement("option")).textContent?d.textContent=a.text:d.innerText=a.text,void 0!==a.id&&(d.value=a.id),a.disabled&&(d.disabled=!0),a.selected&&(d.selected=!0),a.title&&(d.title=a.title);var e=c(d),f=this._normalizeItem(a);return f.element=d,b.StoreData(d,"data",f),e},d.prototype.item=function(a){var d={};if(null!=(d=b.GetData(a[0],"data")))return d;if(a.is("option"))d={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){d={text:a.prop("label"),children:[],title:a.prop("title")};for(var e=a.children("option"),f=[],g=0;g<e.length;g++){var h=c(e[g]),i=this.item(h);f.push(i)}d.children=f}return(d=this._normalizeItem(d)).element=a[0],b.StoreData(a[0],"data",d),d},d.prototype._normalizeItem=function(a){return a!==Object(a)&&(a={id:a,text:a}),null!=(a=c.extend({},{text:""},a)).id&&(a.id=a.id.toString()),
8
+ null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},{selected:!1,disabled:!1},a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),i.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){this._dataToConvert=b.get("data")||[],d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype.bind=function(a,b){d.__super__.bind.call(this,a,b),this.addOptions(this.convertToOptions(this._dataToConvert))},d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(0<=c.inArray(j.id,g)){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),i.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){"status"in d&&(0===d.status||"0"===d.status)||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),i.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){var d=this;this._removeOldTags(),null!=b.term&&null==b.page?a.call(this,b,function a(e,f){for(var g=e.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!a({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(e.data=g,void c(e))}if(f)return!0;var k=d.createTag(b);if(null!=k){var l=d.option(k);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(g,k)}e.results=g,c(e)}):a.call(this,b,c)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),i.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){var e=this;c.term=c.term||"";var f=this.tokenizer(c,this.options,function(b){var c,d=e._normalizeItem(b);if(!e.$element.find("option").filter(function(){return a(this).val()===d.id}).length){var f=e.option(d);f.attr("data-select2-tag",!0),e._removeOldTags(),e.addOptions([f])}c=d,e.trigger("select",{data:c})});f.term!==c.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.trigger("focus")),c.term=f.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=i(a.extend({},c,{term:k}));null!=l?(e(l),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),i.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.term=b.term||"",b.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),i.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.term=b.term||"",0<this.maximumInputLength&&b.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),i.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(){d._checkIfMaximumSelected()})},a.prototype.query=function(a,b,c){var d=this;this._checkIfMaximumSelected(function(){a.call(d,b,c)})},a.prototype._checkIfMaximumSelected=function(a,b){var c=this;this.current(function(a){var d=null!=a?a.length:0;0<c.maximumSelectionLength&&d>=c.maximumSelectionLength?c.trigger("results:message",{message:"maximumSelected",args:{maximum:c.maximumSelectionLength}}):b&&b()})},a}),i.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),i.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.attr("aria-controls",f),e.$search.trigger("focus"),window.setTimeout(function(){e.$search.trigger("focus")},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-controls"),e.$search.removeAttr("aria-activedescendant"),e.$search.val(""),e.$search.trigger("blur")}),c.on("focus",function(){c.isOpen()||e.$search.trigger("focus")}),c.on("results:all",function(a){null!=a.query.term&&""!==a.query.term||(e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide"))}),c.on("results:focus",function(a){a.data._resultId?e.$search.attr("aria-activedescendant",a.data._resultId):e.$search.removeAttr("aria-activedescendant")})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),i.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;0<=d;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),i.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("query",function(a){d.lastParams=a,d.loading=!0}),b.on("query:append",function(a){d.lastParams=a,d.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},b.prototype.loadMoreIfNeeded=function(){var b=a.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&b){var c=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=c+50&&this.loadMore()}},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),i.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=a(d.get("dropdownParent")||document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),d._bindContainerResultHandlers(b)}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._bindContainerResultHandlers=function(a,b){if(!this._containerResultsHandlersBound){var c=this;b.on("results:all",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("results:append",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("results:message",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("select",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("unselect",function(){c._positionDropdown(),c._resizeDropdown()}),this._containerResultsHandlersBound=!0}},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h=this.$dropdown.outerHeight(!1),i=b.scrollTop(),j=b.scrollTop()+b.height(),k=i<f.top-h,l=j>f.bottom+h,m={left:f.left,top:g.bottom},n=this.$dropdownParent;"static"===n.css("position")&&(n=n.offsetParent());var o={top:0,left:0};(a.contains(document.body,n[0])||n[0].isConnected)&&(o=n.offset()),m.top-=o.top,m.left-=o.left,c||d||(e="below"),l||!k||c?!k&&l&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(m.top=g.top-o.top-h),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(m)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),i.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return a.prototype.showSearch=function(a,b){return!(function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}(b.data.results)<this.minimumResultsForSearch)&&a.call(this,b)},a}),i.define("select2/dropdown/selectOnClose",["../utils"],function(a){function b(){}return b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},b.prototype._handleSelectOnClose=function(b,c){if(c&&null!=c.originalSelect2Event){var d=c.originalSelect2Event;if("select"===d._type||"unselect"===d._type)return}var e=this.getHighlightedResults();if(!(e.length<1)){var f=a.GetData(e[0],"data");null!=f.element&&f.element.selected||null==f.element&&f.selected||this.trigger("select",{data:f})}},b}),i.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&(c.ctrlKey||c.metaKey)||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),i.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),i.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}return D.prototype.apply=function(k){if(null==(k=a.extend(!0,{},this.defaults,k)).dataAdapter){if(null!=k.ajax?k.dataAdapter=o:null!=k.data?k.dataAdapter=n:k.dataAdapter=m,0<k.minimumInputLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,r)),0<k.maximumInputLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,s)),0<k.maximumSelectionLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,t)),k.tags&&(k.dataAdapter=j.Decorate(k.dataAdapter,p)),null==k.tokenSeparators&&null==k.tokenizer||(k.dataAdapter=j.Decorate(k.dataAdapter,q)),null!=k.query){var l=b(k.amdBase+"compat/query");k.dataAdapter=j.Decorate(k.dataAdapter,l)}if(null!=k.initSelection){var C=b(k.amdBase+"compat/initSelection");k.dataAdapter=j.Decorate(k.dataAdapter,C)}}if(null==k.resultsAdapter&&(k.resultsAdapter=c,null!=k.ajax&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,x)),null!=k.placeholder&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,w)),k.selectOnClose&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,A))),null==k.dropdownAdapter){if(k.multiple)k.dropdownAdapter=u;else{var D=j.Decorate(u,v);k.dropdownAdapter=D}if(0!==k.minimumResultsForSearch&&(k.dropdownAdapter=j.Decorate(k.dropdownAdapter,z)),k.closeOnSelect&&(k.dropdownAdapter=j.Decorate(k.dropdownAdapter,B)),null!=k.dropdownCssClass||null!=k.dropdownCss||null!=k.adaptDropdownCssClass){var E=b(k.amdBase+"compat/dropdownCss");k.dropdownAdapter=j.Decorate(k.dropdownAdapter,E)}k.dropdownAdapter=j.Decorate(k.dropdownAdapter,y)}if(null==k.selectionAdapter){if(k.multiple?k.selectionAdapter=e:k.selectionAdapter=d,null!=k.placeholder&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,f)),k.allowClear&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,g)),k.multiple&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,h)),null!=k.containerCssClass||null!=k.containerCss||null!=k.adaptContainerCssClass){var F=b(k.amdBase+"compat/containerCss");k.selectionAdapter=j.Decorate(k.selectionAdapter,F)}k.selectionAdapter=j.Decorate(k.selectionAdapter,i)}k.language=this._resolveLanguage(k.language),k.language.push("en");for(var G=[],H=0;H<k.language.length;H++){var I=k.language[H];-1===G.indexOf(I)&&G.push(I)}return k.language=G,k.translations=this._processTranslations(k.language,k.debug),k},D.prototype.reset=function(){function b(a){return a.replace(/[^\u0000-\u007E]/g,function(a){return l[a]||a})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:{},matcher:function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&0<e.children.length){for(var f=a.extend(!0,{},e),g=e.children.length-1;0<=g;g--)null==c(d,e.children[g])&&f.children.splice(g,1);return 0<f.children.length?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return-1<h.indexOf(i)?e:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.applyFromElement=function(a,b){var c=a.language,d=this.defaults.language,e=b.prop("lang"),f=b.closest("[lang]").prop("lang"),g=Array.prototype.concat.call(this._resolveLanguage(e),this._resolveLanguage(c),this._resolveLanguage(d),this._resolveLanguage(f));return a.language=g,a},D.prototype._resolveLanguage=function(b){if(!b)return[];if(a.isEmptyObject(b))return[];if(a.isPlainObject(b))return[b];var c;c=a.isArray(b)?b:[b];for(var d=[],e=0;e<c.length;e++)if(d.push(c[e]),"string"==typeof c[e]&&0<c[e].indexOf("-")){var f=c[e].split("-")[0];d.push(f)}return d},D.prototype._processTranslations=function(b,c){for(var d=new k,e=0;e<b.length;e++){var f=new k,g=b[e];if("string"==typeof g)try{f=k.loadPath(g)}catch(a){try{g=this.defaults.amdLanguageBase+g,f=k.loadPath(g)}catch(a){c&&window.console&&console.warn&&console.warn('Select2: The language file for "'+g+'" could not be automatically loaded. A fallback will be used instead.')}}else f=a.isPlainObject(g)?new k(g):g;d.extend(f)}return d},D.prototype.set=function(b,c){var d={};d[a.camelCase(b)]=c;var e=j._convertData(d);a.extend(!0,this.defaults,e)},new D}),i.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),null!=e&&(this.options=c.applyFromElement(this.options,e)),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){function c(a,b){return b.toUpperCase()}var e=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),d.GetData(a[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));for(var f={},g=0;g<a[0].attributes.length;g++){var h=a[0].attributes[g].name,i="data-";if(h.substr(0,i.length)==i){var j=h.substring(i.length),k=d.GetData(a[0],j);f[j.replace(/-([a-z])/g,c)]=k}}b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset&&(f=b.extend(!0,{},a[0].dataset,f));var l=b.extend(!0,{},d.GetData(a[0]),f);for(var m in l=d._convertData(l))-1<b.inArray(m,e)||(b.isPlainObject(this.options[m])?b.extend(this.options[m],l[m]):this.options[m]=l[m]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),i.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){return"select2-"+(null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"!=b)return"computedstyle"!=b?b:window.getComputedStyle(a[0]).width;var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,"").match(c);if(null!==j&&1<=j.length)return j[1]}return null},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var a=this;this.$element.on("change.select2",function(){a.dataAdapter.current(function(b){a.trigger("selection:update",{data:b})})}),this.$element.on("focus.select2",function(b){a.trigger("focus",b)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var b=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=b?(this._observer=new b(function(b){a._syncA(),a._syncS(null,b)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",a._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",a._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",a._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(b),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._isChangeMutation=function(b,c){var d=!1,e=this;if(!b||!b.target||"OPTION"===b.target.nodeName||"OPTGROUP"===b.target.nodeName){if(c)if(c.addedNodes&&0<c.addedNodes.length)for(var f=0;f<c.addedNodes.length;f++)c.addedNodes[f].selected&&(d=!0);else c.removedNodes&&0<c.removedNodes.length?d=!0:a.isArray(c)&&a.each(c,function(a,b){if(e._isChangeMutation(a,b))return!(d=!0)});else d=!0;return d}},e.prototype._syncSubtree=function(a,b){var c=this._isChangeMutation(a,b),d=this;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},e.prototype.close=function(a){this.isOpen()&&this.trigger("close",{originalEvent:a})},e.prototype.isEnabled=function(){return!this.isDisabled()},e.prototype.isDisabled=function(){return this.options.get("disabled")},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("input").trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),
9
+ this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(b[0],"element",this.$element),b},e}),i.define("select2/compat/utils",["jquery"],function(a){return{syncCssClasses:function(b,c,d){var e,f,g=[];(e=a.trim(b.attr("class")))&&a((e=""+e).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)}),(e=a.trim(c.attr("class")))&&a((e=""+e).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(f=d(this))&&g.push(f)}),b.attr("class",g.join(" "))}}}),i.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),i.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),i.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;this._isInitialized?b.call(this,c):this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),i.define("select2/compat/inputData",["jquery","../utils"],function(a,b){function c(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return c.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},c.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("input").trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("input").trigger("change")},c.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("input").trigger("change")})},c.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},c.prototype.addOptions=function(c,d){var e=a.map(d,function(a){return b.GetData(a[0],"data")});this._currentData.push.apply(this._currentData,e)},c}),i.define("select2/compat/matcher",["jquery"],function(a){return function(b){return function(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;0<=f;f--){var g=d.children[f];b(c.term,g.text,g)||e.children.splice(f,1)}if(0<e.children.length)return e}return b(c.term,d.text,d)?e:null}}}),i.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c,this.options.get("query").call(null,b)},a}),i.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){c.find(".dropdown-wrapper").append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),i.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c),this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(a){a.stopPropagation()})},a}),i.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c),this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(a){a.stopPropagation()})},a}),y=function(a){function b(b){var g,h=b||window.event,j=i.call(arguments,1),l=0,m=0,n=0,o=0,p=0;if((b=a.event.fix(h)).type="mousewheel","detail"in h&&(n=-1*h.detail),"wheelDelta"in h&&(n=h.wheelDelta),"wheelDeltaY"in h&&(n=h.wheelDeltaY),"wheelDeltaX"in h&&(m=-1*h.wheelDeltaX),"axis"in h&&h.axis===h.HORIZONTAL_AXIS&&(m=-1*n,n=0),l=0===n?m:n,"deltaY"in h&&(l=n=-1*h.deltaY),"deltaX"in h&&(m=h.deltaX,0===n&&(l=-1*m)),0!==n||0!==m){if(1===h.deltaMode){var q=a.data(this,"mousewheel-line-height");l*=q,n*=q,m*=q}else if(2===h.deltaMode){var r=a.data(this,"mousewheel-page-height");l*=r,n*=r,m*=r}if(g=Math.max(Math.abs(n),Math.abs(m)),(!f||g<f)&&d(h,f=g)&&(f/=40),d(h,g)&&(l/=40,m/=40,n/=40),l=Math[1<=l?"floor":"ceil"](l/f),m=Math[1<=m?"floor":"ceil"](m/f),n=Math[1<=n?"floor":"ceil"](n/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=m,b.deltaY=n,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,j.unshift(b,l,m,n),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,j)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120==0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})},"function"==typeof i.define&&i.define.amd?i.define("jquery-mousewheel",["jquery"],y):"object"==typeof exports?module.exports=y:y(a),i.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(a,b,c,d,e){if(null==a.fn.select2){var f=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"!=typeof b)throw new Error("Invalid arguments for Select2: "+b);var d,g=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=e.GetData(this,"select2");null==a&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=a[b].apply(a,g)}),-1<a.inArray(b,f)?this:d}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:i.define,require:i.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}),!function(a){"undefined"!=typeof jQuery&&jQuery||"function"!=typeof define||!define.amd?"undefined"!=typeof jQuery&&jQuery||"object"!=typeof exports?a(jQuery,document,window,navigator):a(require("jquery"),document,window,navigator):define(["jquery"],function(b){return a(b,document,window,navigator)})}(function(a,b,c,d,e){"use strict";function f(d,f,g){this.VERSION="2.3.1",this.input=d,this.plugin_count=g,this.current_plugin=0,this.calc_count=0,this.update_tm=0,this.old_from=0,this.old_to=0,this.old_min_interval=null,this.raf_id=null,this.dragging=!1,this.force_redraw=!1,this.no_diapason=!1,this.has_tab_index=!0,this.is_key=!1,this.is_update=!1,this.is_start=!0,this.is_finish=!1,this.is_active=!1,this.is_resize=!1,this.is_click=!1,f=f||{},this.$cache={win:a(c),body:a(b.body),input:a(d),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var h,i,j,k=this.$cache.input,l=k.prop("value");for(j in h={skin:"flat",type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null},"INPUT"!==k[0].nodeName&&console&&console.warn&&console.warn("Base element should be <input>!",k[0]),(i={skin:k.data("skin"),type:k.data("type"),min:k.data("min"),max:k.data("max"),from:k.data("from"),to:k.data("to"),step:k.data("step"),min_interval:k.data("minInterval"),max_interval:k.data("maxInterval"),drag_interval:k.data("dragInterval"),values:k.data("values"),from_fixed:k.data("fromFixed"),from_min:k.data("fromMin"),from_max:k.data("fromMax"),from_shadow:k.data("fromShadow"),to_fixed:k.data("toFixed"),to_min:k.data("toMin"),to_max:k.data("toMax"),to_shadow:k.data("toShadow"),prettify_enabled:k.data("prettifyEnabled"),prettify_separator:k.data("prettifySeparator"),force_edges:k.data("forceEdges"),keyboard:k.data("keyboard"),grid:k.data("grid"),grid_margin:k.data("gridMargin"),grid_num:k.data("gridNum"),grid_snap:k.data("gridSnap"),hide_min_max:k.data("hideMinMax"),hide_from_to:k.data("hideFromTo"),prefix:k.data("prefix"),postfix:k.data("postfix"),max_postfix:k.data("maxPostfix"),decorate_both:k.data("decorateBoth"),values_separator:k.data("valuesSeparator"),input_values_separator:k.data("inputValuesSeparator"),disable:k.data("disable"),block:k.data("block"),extra_classes:k.data("extraClasses")}).values=i.values&&i.values.split(","),i)i.hasOwnProperty(j)&&(i[j]!==e&&""!==i[j]||delete i[j]);l!==e&&""!==l&&((l=l.split(i.input_values_separator||f.input_values_separator||";"))[0]&&l[0]==+l[0]&&(l[0]=+l[0]),l[1]&&l[1]==+l[1]&&(l[1]=+l[1]),f&&f.values&&f.values.length?(h.from=l[0]&&f.values.indexOf(l[0]),h.to=l[1]&&f.values.indexOf(l[1])):(h.from=l[0]&&+l[0],h.to=l[1]&&+l[1])),a.extend(h,f),a.extend(h,i),this.options=h,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()}var g,h,i=0,j=(g=d.userAgent,h=/msie\s\d+/i,0<g.search(h)&&h.exec(g).toString().split(" ")[1]<9&&(a("html").addClass("lt-ie9"),!0));Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=[].slice;if("function"!=typeof b)throw new TypeError;var d=c.call(arguments,1),e=function(){if(this instanceof e){var f=function(){};f.prototype=b.prototype;var g=new f,h=b.apply(g,d.concat(c.call(arguments)));return Object(h)===h?h:g}return b.apply(a,d.concat(c.call(arguments)))};return e}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0==e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),e<=f)return-1;for(c=Math.max(0<=f?f:e-Math.abs(f),0);c<e;){if(c in d&&d[c]===a)return c;c++}return-1}),f.prototype={init:function(a){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),a?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var a='<span class="irs irs--'+this.options.skin+" js-irs-"+this.plugin_count+" "+this.options.extra_classes+'"></span>';this.$cache.input.before(a),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('<span class="irs"><span class="irs-line" tabindex="0"></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span>'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append('<span class="irs-bar irs-bar--single"></span><span class="irs-shadow shadow-single"></span><span class="irs-handle single"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append('<span class="irs-bar"></span><span class="irs-shadow shadow-from"></span><span class="irs-shadow shadow-to"></span><span class="irs-handle from"><i></i><i></i><i></i></span><span class="irs-handle to"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var a=this.options.min,b=this.options.max,c=this.options.from,d=this.options.to;a<c&&d===b?this.$cache.s_from.addClass("type_last"):d<b&&this.$cache.s_to.addClass("type_last")},changeLevel:function(a){switch(a){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake),this.$cache.s_single.addClass("state_hover");break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.$cache.s_from.addClass("state_hover"),this.$cache.s_from.addClass("type_last"),this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake),this.$cache.s_to.addClass("state_hover"),this.$cache.s_to.addClass("type_last"),this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append('<span class="irs-disable-mask"></span>'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),j&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),j&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(a){var b,c;this.target||(b=(c="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,b+=c.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:b}))},pointerMove:function(a){if(this.dragging){var b=a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX;this.coords.x_pointer=b-this.coords.x_gap,this.calc()}},pointerUp:function(b){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,j&&a("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(a.contains(this.$cache.cont[0],b.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(b,c){c.preventDefault();var d=c.pageX||c.originalEvent.touches&&c.originalEvent.touches[0].pageX;2!==c.button&&("both"===b&&this.setTempMinInterval(),b=b||this.target||"from",this.current_plugin=this.plugin_count,this.target=b,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=d-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(b),j&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(a,b){b.preventDefault();var c=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(c-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey||b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,c=(this.options.max-this.options.min)/100;c=this.options.step/c,a?b+=c:b-=c,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*b),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var a=this._prettify(this.options.min),b=this._prettify(this.options.max);this.result.min_pretty=a,this.result.max_pretty=b,this.$cache.min.html(this.decorate(a,this.options.min)),this.$cache.max.html(this.decorate(b,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var a=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=a},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(a){if(this.options&&(this.calc_count++,10!==this.calc_count&&!a||(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var b=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,b=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,b=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(b)),this.target){case"base":var c=(this.options.max-this.options.min)/100,d=(this.result.from-this.options.min)/c,e=(this.result.to-this.options.min)/c;this.coords.p_single_real=this.toFixed(d),this.coords.p_from_real=this.toFixed(d),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(b),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(b),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(b),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;b=this.toFixed(b+.001*this.coords.p_handle),this.coords.p_from_real=this.convertToRealPercent(b)-this.coords.p_gap_left,this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.convertToRealPercent(b)+this.coords.p_gap_right,this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both_one":if(this.options.from_fixed||this.options.to_fixed)break;var f=this.convertToRealPercent(b),g=this.result.from_percent,h=this.result.to_percent-g,i=h/2,j=f-i,k=f+i;j<0&&(k=(j=0)+h),100<k&&(j=(k=100)-h),this.coords.p_from_real=this.calcWithStep(j),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(k),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(a){return a/(100-this.coords.p_handle)*100},convertToFakePercent:function(a){return a/100*(100-this.coords.p_handle)},getHandleX:function(){
10
+ var a=100-this.coords.p_handle,b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return b<0?b=0:a<b&&(b=a),b},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(a){return"single"===this.options.type?"single":this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2<=a?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),this.coords.w_rs===this.coords.w_rs_old&&!this.force_redraw||(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.bar[0].style.left=0,this.$cache.bar[0].style.width=this.coords.p_bar_w+this.coords.p_bar_x+"%",this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",this.old_from===this.result.from&&!this.force_redraw||(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),this.old_to===this.result.to&&!this.force_redraw||(this.$cache.to[0].style.left=this.labels.p_to_left+"%")),this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var a,b,c,d,e,f=this.options.values.length,g=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)a=f?this.decorate(g[this.result.from]):(d=this._prettify(this.result.from),this.decorate(d,this.result.from)),this.$cache.single.html(a),this.calcLabels(),this.labels.p_single_left<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{c=f?(this.options.decorate_both?(a=this.decorate(g[this.result.from]),a+=this.options.values_separator,a+=this.decorate(g[this.result.to])):a=this.decorate(g[this.result.from]+this.options.values_separator+g[this.result.to]),b=this.decorate(g[this.result.from]),this.decorate(g[this.result.to])):(d=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(a=this.decorate(d,this.result.from),a+=this.options.values_separator,a+=this.decorate(e,this.result.to)):a=this.decorate(d+this.options.values_separator+e,this.result.to),b=this.decorate(d,this.result.from),this.decorate(e,this.result.to)),this.$cache.single.html(a),this.$cache.from.html(b),this.$cache.to.html(c),this.calcLabels();var h=Math.min(this.labels.p_single_left,this.labels.p_from_left),i=this.labels.p_single_left+this.labels.p_single_fake,j=this.labels.p_to_left+this.labels.p_to_fake,k=Math.max(i,j);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",k=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",j):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(i,j))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),h<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",k>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var a,b,c,d,e=this.options,f=this.$cache,g="number"==typeof e.from_min&&!isNaN(e.from_min),h="number"==typeof e.from_max&&!isNaN(e.from_max),i="number"==typeof e.to_min&&!isNaN(e.to_min),j="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(g||h)?(a=this.convertToPercent(g?e.from_min:e.min),b=this.convertToPercent(h?e.from_max:e.max)-a,a=this.toFixed(a-this.coords.p_handle/100*a),b=this.toFixed(b-this.coords.p_handle/100*b),a+=this.coords.p_handle/2,f.shad_single[0].style.display="block",f.shad_single[0].style.left=a+"%",f.shad_single[0].style.width=b+"%"):f.shad_single[0].style.display="none":(e.from_shadow&&(g||h)?(a=this.convertToPercent(g?e.from_min:e.min),b=this.convertToPercent(h?e.from_max:e.max)-a,a=this.toFixed(a-this.coords.p_handle/100*a),b=this.toFixed(b-this.coords.p_handle/100*b),a+=this.coords.p_handle/2,f.shad_from[0].style.display="block",f.shad_from[0].style.left=a+"%",f.shad_from[0].style.width=b+"%"):f.shad_from[0].style.display="none",e.to_shadow&&(i||j)?(c=this.convertToPercent(i?e.to_min:e.min),d=this.convertToPercent(j?e.to_max:e.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/100*d),c+=this.coords.p_handle/2,f.shad_to[0].style.display="block",f.shad_to[0].style.left=c+"%",f.shad_to[0].style.width=d+"%"):f.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(a,b){var c,d=this.options.max-this.options.min,e=d/100;return d?(c=(b?a:a-this.options.min)/e,this.toFixed(c)):(this.no_diapason=!0,0)},convertToValue:function(a){var b,c,d=this.options.min,e=this.options.max,f=d.toString().split(".")[1],g=e.toString().split(".")[1],h=0,i=0;if(0===a)return this.options.min;if(100===a)return this.options.max;f&&(h=b=f.length),g&&(h=c=g.length),b&&c&&(h=c<=b?b:c),d<0&&(d=+(d+(i=Math.abs(d))).toFixed(h),e=+(e+i).toFixed(h));var j,k=(e-d)/100*a+d,l=this.options.step.toString().split(".")[1];return k=l?+k.toFixed(l.length):(k/=this.options.step,+(k*=this.options.step).toFixed(0)),i&&(k-=i),(j=l?+k.toFixed(l.length):this.toFixed(k))<this.options.min?j=this.options.min:j>this.options.max&&(j=this.options.max),j},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)*this.coords.p_step;return 100<b&&(b=100),100===a&&(b=100),this.toFixed(b)},checkMinInterval:function(a,b,c){var d,e,f=this.options;return f.min_interval?(d=this.convertToValue(a),e=this.convertToValue(b),"from"===c?e-d<f.min_interval&&(d=e-f.min_interval):d-e<f.min_interval&&(d=e+f.min_interval),this.convertToPercent(d)):a},checkMaxInterval:function(a,b,c){var d,e,f=this.options;return f.max_interval?(d=this.convertToValue(a),e=this.convertToValue(b),"from"===c?e-d>f.max_interval&&(d=e-f.max_interval):d-e>f.max_interval&&(d=e+f.max_interval),this.convertToPercent(d)):a},checkDiapason:function(a,b,c){var d=this.convertToValue(a),e=this.options;return"number"!=typeof b&&(b=e.min),"number"!=typeof c&&(c=e.max),d<b&&(d=b),c<d&&(d=c),this.convertToPercent(d)},toFixed:function(a){return+(a=a.toFixed(20))},_prettify:function(a){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(a,b){return this.options.force_edges&&(a<0?a=0:100-b<a&&(a=100-b)),this.toFixed(a)},validate:function(){var a,b,c=this.options,d=this.result,e=c.values,f=e.length;if("string"==typeof c.min&&(c.min=+c.min),"string"==typeof c.max&&(c.max=+c.max),"string"==typeof c.from&&(c.from=+c.from),"string"==typeof c.to&&(c.to=+c.to),"string"==typeof c.step&&(c.step=+c.step),"string"==typeof c.from_min&&(c.from_min=+c.from_min),"string"==typeof c.from_max&&(c.from_max=+c.from_max),"string"==typeof c.to_min&&(c.to_min=+c.to_min),"string"==typeof c.to_max&&(c.to_max=+c.to_max),"string"==typeof c.grid_num&&(c.grid_num=+c.grid_num),c.max<c.min&&(c.max=c.min),f)for(c.p_values=[],c.min=0,c.max=f-1,c.step=1,c.grid_num=c.max,c.grid_snap=!0,b=0;b<f;b++)a=+e[b],a=isNaN(a)?e[b]:(e[b]=a,this._prettify(a)),c.p_values.push(a);"number"==typeof c.from&&!isNaN(c.from)||(c.from=c.min),"number"==typeof c.to&&!isNaN(c.to)||(c.to=c.max),"single"===c.type?(c.from<c.min&&(c.from=c.min),c.from>c.max&&(c.from=c.max)):(c.from<c.min&&(c.from=c.min),c.from>c.max&&(c.from=c.max),c.to<c.min&&(c.to=c.min),c.to>c.max&&(c.to=c.max),this.update_check.from&&(this.update_check.from!==c.from&&c.from>c.to&&(c.from=c.to),this.update_check.to!==c.to&&c.to<c.from&&(c.to=c.from)),c.from>c.to&&(c.from=c.to),c.to<c.from&&(c.to=c.from)),("number"!=typeof c.step||isNaN(c.step)||!c.step||c.step<0)&&(c.step=1),"number"==typeof c.from_min&&c.from<c.from_min&&(c.from=c.from_min),"number"==typeof c.from_max&&c.from>c.from_max&&(c.from=c.from_max),"number"==typeof c.to_min&&c.to<c.to_min&&(c.to=c.to_min),"number"==typeof c.to_max&&c.from>c.to_max&&(c.to=c.to_max),d&&(d.min!==c.min&&(d.min=c.min),d.max!==c.max&&(d.max=c.max),(d.from<d.min||d.from>d.max)&&(d.from=c.from),(d.to<d.min||d.to>d.max)&&(d.to=c.to)),("number"!=typeof c.min_interval||isNaN(c.min_interval)||!c.min_interval||c.min_interval<0)&&(c.min_interval=0),("number"!=typeof c.max_interval||isNaN(c.max_interval)||!c.max_interval||c.max_interval<0)&&(c.max_interval=0),c.min_interval&&c.min_interval>c.max-c.min&&(c.min_interval=c.max-c.min),c.max_interval&&c.max_interval>c.max-c.min&&(c.max_interval=c.max-c.min)},decorate:function(a,b){var c="",d=this.options;return d.prefix&&(c+=d.prefix),c+=a,d.max_postfix&&(d.values.length&&a===d.p_values[d.max]?(c+=d.max_postfix,d.postfix&&(c+=" ")):b===d.max&&(c+=d.max_postfix,d.postfix&&(c+=" "))),d.postfix&&(c+=d.postfix),c},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var a,b,c,d,e,f,g=this.options,h=g.max-g.min,i=g.grid_num,j=0,k=4,l="";for(this.calcGridMargin(),g.grid_snap&&(i=h/g.step),50<i&&(i=50),c=this.toFixed(100/i),4<i&&(k=3),7<i&&(k=2),14<i&&(k=1),28<i&&(k=0),a=0;a<i+1;a++){for(d=k,100<(j=this.toFixed(c*a))&&(j=100),e=((this.coords.big[a]=j)-c*(a-1))/(d+1),b=1;b<=d&&0!==j;b++)l+='<span class="irs-grid-pol small" style="left: '+this.toFixed(j-e*b)+'%"></span>';l+='<span class="irs-grid-pol" style="left: '+j+'%"></span>',f=this.convertToValue(j),l+='<span class="irs-grid-text js-grid-text-'+a+'" style="left: '+j+'%">'+(f=g.values.length?g.p_values[f]:this._prettify(f))+"</span>"}this.coords.big_num=Math.ceil(i+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(l),this.cacheGridLabels()}},cacheGridLabels:function(){var a,b,c=this.coords.big_num;for(b=0;b<c;b++)a=this.$cache.grid.find(".js-grid-text-"+b),this.$cache.grid_labels.push(a);this.calcGridLabels()},calcGridLabels:function(){var a,b,c=[],d=[],e=this.coords.big_num;for(a=0;a<e;a++)this.coords.big_w[a]=this.$cache.grid_labels[a].outerWidth(!1),this.coords.big_p[a]=this.toFixed(this.coords.big_w[a]/this.coords.w_rs*100),this.coords.big_x[a]=this.toFixed(this.coords.big_p[a]/2),c[a]=this.toFixed(this.coords.big[a]-this.coords.big_x[a]),d[a]=this.toFixed(c[a]+this.coords.big_p[a]);for(this.options.force_edges&&(c[0]<-this.coords.grid_gap&&(c[0]=-this.coords.grid_gap,d[0]=this.toFixed(c[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),d[e-1]>100+this.coords.grid_gap&&(d[e-1]=100+this.coords.grid_gap,c[e-1]=this.toFixed(d[e-1]-this.coords.big_p[e-1]),this.coords.big_x[e-1]=this.toFixed(this.coords.big_p[e-1]-this.coords.grid_gap))),this.calcGridCollision(2,c,d),this.calcGridCollision(4,c,d),a=0;a<e;a++)b=this.$cache.grid_labels[a][0],this.coords.big_x[a]!==Number.POSITIVE_INFINITY&&(b.style.marginLeft=-this.coords.big_x[a]+"%")},calcGridCollision:function(a,b,c){var d,e,f,g=this.coords.big_num;for(d=0;d<g&&!(g<=(e=d+a/2));d+=a)f=this.$cache.grid_labels[e][0],c[d]<=b[e]?f.style.visibility="visible":f.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(b){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=a.extend(this.options,b),this.validate(),this.updateResult(b),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),a.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},a.fn.ionRangeSlider=function(b){return this.each(function(){a.data(this,"ionRangeSlider")||a.data(this,"ionRangeSlider",new f(this,b,i++))})},function(){for(var a=0,b=["ms","moz","webkit","o"],d=0;d<b.length&&!c.requestAnimationFrame;++d)c.requestAnimationFrame=c[b[d]+"RequestAnimationFrame"],c.cancelAnimationFrame=c[b[d]+"CancelAnimationFrame"]||c[b[d]+"CancelRequestAnimationFrame"];c.requestAnimationFrame||(c.requestAnimationFrame=function(b,d){var e=(new Date).getTime(),f=Math.max(0,16-(e-a)),g=c.setTimeout(function(){b(e+f)},f);return a=e+f,g}),c.cancelAnimationFrame||(c.cancelAnimationFrame=function(a){clearTimeout(a)})}()});
assets/frontend/js/main.js CHANGED
@@ -243,7 +243,7 @@ function braapf_filtered_filters_set() {
243
  href = berocket_apply_filters('pagination_href_from_clicked_a', decodeURI(href), $(this));
244
  braapf_change_url_history_api(href, {replace:the_ajax_script.seo_friendly_urls});
245
  berocket_add_filter('ajax_load_from_url_beforeSend', braapf_pagination_prevent_filters_load);
246
- braapf_ajax_load_from_url(href, {}, berocket_apply_filters('ajax_load_from_pagination', {done:[braapf_replace_products, braapf_replace_pagination, braapf_replace_result_count, braapf_init_load, braapf_update_url_history_api_from_current]}, href));
247
  });
248
  }
249
  function braapf_pagination_prevent_filters_load(xhr) {
@@ -324,6 +324,10 @@ function braapf_filtered_filters_set() {
324
  braapf_ajax_load_from_url(url, {}, berocket_apply_filters('ajax_load_from_filters', {done:[braapf_replace_products, braapf_replace_pagination, braapf_replace_result_count, braapf_replace_orderby, braapf_replace_each_filter, braapf_init_load, braapf_filtered_filters_set, braapf_update_url_history_api_from_current]}, url, 'default'));
325
  }
326
  }
 
 
 
 
327
  braapf_update_url_history_api_from_current = function() {
328
  if( the_ajax_script.seo_friendly_urls ) {
329
  url_filtered = braapf_get_url_with_filters_selected();
@@ -637,7 +641,7 @@ function braapf_filtered_filters_set() {
637
  if( berocket_apply_filters('page_has_products_holder', (! $(the_ajax_script.products_holder_id).length), url) ) {
638
  location.href = url;
639
  } else {
640
- braapf_ajax_load_from_url(url, {}, berocket_apply_filters('ajax_load_from_filters', {done:[braapf_replace_products, braapf_replace_pagination, braapf_replace_result_count, braapf_replace_orderby, braapf_replace_each_filter, braapf_init_load, braapf_filtered_filters_set, braapf_update_url_history_api_from_current]}, url, 'default'));
641
  }
642
  }
643
  }
@@ -1169,7 +1173,9 @@ berocket_custom_sidebar_open;
1169
  return filter;
1170
  }
1171
  jQuery( document ).on( 'elementor/popup/show', function() {
1172
- braapf_init();
 
 
1173
  } );
1174
  })(jQuery);
1175
  berocket_add_filter('get_current_url_data', braapf_get_current_filters);
@@ -1266,6 +1272,12 @@ baapfGet_wprocketInstance;
1266
  baapfGet_wprocketInstance = e.detail.instance;
1267
  });
1268
  } catch (e) {berocket_throw_error('wprocketInstance_get', e);}
 
 
 
 
 
 
1269
  })(jQuery);
1270
 
1271
  var braapf_init_ion_slidr,
243
  href = berocket_apply_filters('pagination_href_from_clicked_a', decodeURI(href), $(this));
244
  braapf_change_url_history_api(href, {replace:the_ajax_script.seo_friendly_urls});
245
  berocket_add_filter('ajax_load_from_url_beforeSend', braapf_pagination_prevent_filters_load);
246
+ braapf_ajax_load_from_url(href, {}, berocket_apply_filters('ajax_load_from_pagination', {done:[braapf_replace_products, braapf_replace_pagination, braapf_replace_result_count, braapf_init_load, braapf_update_data_from_current]}, href));
247
  });
248
  }
249
  function braapf_pagination_prevent_filters_load(xhr) {
324
  braapf_ajax_load_from_url(url, {}, berocket_apply_filters('ajax_load_from_filters', {done:[braapf_replace_products, braapf_replace_pagination, braapf_replace_result_count, braapf_replace_orderby, braapf_replace_each_filter, braapf_init_load, braapf_filtered_filters_set, braapf_update_url_history_api_from_current]}, url, 'default'));
325
  }
326
  }
327
+ braapf_update_data_from_current = function() {
328
+ braapf_grab_all();
329
+ var compat_filters = braapf_compact_filters();
330
+ }
331
  braapf_update_url_history_api_from_current = function() {
332
  if( the_ajax_script.seo_friendly_urls ) {
333
  url_filtered = braapf_get_url_with_filters_selected();
641
  if( berocket_apply_filters('page_has_products_holder', (! $(the_ajax_script.products_holder_id).length), url) ) {
642
  location.href = url;
643
  } else {
644
+ braapf_ajax_load_from_url(url, {}, berocket_apply_filters('ajax_load_from_filters', {done:[braapf_replace_products, braapf_replace_pagination, braapf_replace_result_count, braapf_replace_orderby, braapf_replace_each_filter, braapf_init_load, braapf_filtered_filters_set, braapf_update_data_from_current]}, url, 'default'));
645
  }
646
  }
647
  }
1173
  return filter;
1174
  }
1175
  jQuery( document ).on( 'elementor/popup/show', function() {
1176
+ try{
1177
+ braapf_init_load();
1178
+ } catch (e) {berocket_throw_error('wprocketInstance_get', e);}
1179
  } );
1180
  })(jQuery);
1181
  berocket_add_filter('get_current_url_data', braapf_get_current_filters);
1272
  baapfGet_wprocketInstance = e.detail.instance;
1273
  });
1274
  } catch (e) {berocket_throw_error('wprocketInstance_get', e);}
1275
+ //WooCommerce quantity fix
1276
+ $(document).on("change", "form.cart input.qty", function() {
1277
+ try {
1278
+ $(this.form).find("[data-quantity]").attr("data-quantity", this.value);
1279
+ } catch (e) {berocket_throw_error('wc_quantity_change', e);}
1280
+ });
1281
  })(jQuery);
1282
 
1283
  var braapf_init_ion_slidr,
assets/frontend/js/main.min.js CHANGED
@@ -1,2 +1,2 @@
1
- function berocket_make_args_array(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b}function berocket_apply_filters(a,b){if("undefined"!=typeof berocket_filters[a]){var c=berocket_make_args_array(arguments);c.splice(0,1),jQuery.each(berocket_filters[a],function(a,d){b=d.callback.apply(null,c),c[0]=b})}return b}function berocket_do_action(a){if("undefined"!=typeof berocket_filters[a]){var b=berocket_make_args_array(arguments);b.splice(0,1),jQuery.each(berocket_filters[a],function(a,c){c.callback.apply(null,b)})}}function berocket_throw_error(a){var b="berocket_throw_error";if(error_exist=!0,"undefined"!=typeof berocket_filters[b]){for(var c,d=[error_exist];c<arguments.length;c++)d.push(arguments[c]);jQuery.each(berocket_filters[b],function(a,b){if(error_exist=b.callback.apply(null,d),d[0]=error_exist,!error_exist)return!1})}return error_exist}function berocket_add_filter(a,b,c){"undefined"==typeof c&&(c=10),"undefined"==typeof berocket_filters[a]&&(berocket_filters[a]=[]);var d=!1;jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b&&(d=!0)}),d||(berocket_filters[a].push({callback:b,priority:c}),berocket_filters[a]=berocket_sort_by_priority(berocket_filters[a]))}function berocket_remove_filter(a,b,c){if("undefined"==typeof c&&(c=10),"undefined"!=typeof berocket_filters[a]){var d=[];jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b||d.push(e)}),berocket_filters[a]=berocket_sort_by_priority(d)}}function berocket_sort_by_priority(a){return Array.isArray(a)&&a.sort(function(a,b){return a.priority>b.priority?1:a.priority<b.priority?-1:0}),a}function berocket_format_number(a,b){"undefined"==typeof b&&(b=the_ajax_script.number_style);var c=a.toFixed(b[2]);c=c.toString();var d=c.split("."),e=d[0];return c.indexOf(".")!=-1&&(d=d[1]),e=e.replace(/\d(?=(?:\d{3})+(?:$))/g,function(a,c){return a+b[0]}),c.indexOf(".")!=-1&&(e=e+b[1]+d),e}function braapf_grab_all_init(){braapf_grab_all()}function braapf_selected_filters_area_set_init(){braapf_selected_filters_area_set()}function braapf_filtered_filters_set(){braapf_filtered_filters=braapf_selected_filters.slice(),berocket_do_action("braapf_init_filtered_set",braapf_filtered_filters)}var berocket_filters={};berocket_add_filter("compat_filters_result_single",function(a){return"object"==typeof a&&"string"==typeof a.taxonomy&&"pa_"==a.taxonomy.substr(0,3)&&(a.taxonomy=a.taxonomy.substr(3)),a}),jQuery(document).trigger("berocket_hooks_ready");var braapf_filter_blocked=!1,braapf_selected_filters=[],braapf_filtered_filters=[],braapf_filters_var,braapf_ajax_request,braapf_checkbox_same,braapf_update_products,braapf_grab_all,braapf_grab_single,braapf_compact_filters,braapf_compat_filters_to_string,braapf_build_url_from_urldata,braapf_apply_additional_filter_data,braapf_glue_by_operator,braapf_ajax_load_from_url,braapf_ajax_load_from_url_request,braapf_init_load,braapf_remove_pages_from_url_data,braapf_filter_products_by_url,braapf_get_current_url_data,braapf_reset_buttons_hide,bapf_universal_theme_compatibility,braapf_disable_ajax_loading,braapf_close_tippy;!function(a){function b(a){return berocket_remove_filter("ajax_load_from_url_beforeSend",b),a.setRequestHeader("X-Braapfdisable","1"),a}function c(a){return a.setRequestHeader("X-Braapf","1"),a}a(document).on("change",".bapf_sfilter.bapf_ckbox input[type=checkbox]",function(){var b=a(this).val(),c=a(this).parents(".bapf_sfilter").data("taxonomy"),d=a(this).prop("checked");braapf_checkbox_same(c,b,d),berocket_apply_filters("input_ckbox_changed",this,c,b,d);var e={element:"#"+a(this).attr("id"),parent:1,find:!1};berocket_apply_filters("filter_changed_element",e,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_checkbox_same=function(b,c,d){a('.bapf_sfilter[data-taxonomy="'+b+'"] input[value="'+c+'"]').prop("checked",d),a('.bapf_sfilter[data-taxonomy="'+b+'"]').length<a('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+b+'"]').length&&berocket_throw_error("multiple_filters_for_same_taxonomy",b)},a(document).on("braapf_unselect",".bapf_ckbox",function(b,c){if("undefined"==typeof c&&(c=!1),0==c)var d=a(this).find("input[type=checkbox]");else var d=a(this).find('input[value="'+c.value+'"]');if(d.length>0){var e=d.val(),f=a(this).data("taxonomy");d.prop("checked",!1),braapf_checkbox_same(f,e,!1)}}),a(document).on("braapf_unselect_all",".bapf_ckbox",function(b,c){a(this).trigger("braapf_unselect",!1)}),a(document).on("berocket_filters_document_ready",function(){a(".bapf_ckbox input[type=checkbox]:checked").closest("li").parents("li").trigger("bapf_ochild")}),a(document).on("click",".berocket_aapf_widget_update_button, .bapf_update",function(b){b.preventDefault(),berocket_do_action("update_products","update",a(this))}),a(document).on("click",".berocket_aapf_reset_button, .bapf_reset",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),braapf_reset_buttons_hide=function(){berocket_apply_filters("bapf_rst_nofltr_hide","undefined"==typeof braapf_filtered_filters||braapf_filtered_filters.length<=0)?a(".bapf_rst_nofltr").hide():a(".bapf_rst_nofltr").show();var b=!1;"undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0&&a.each(braapf_filtered_filters,function(a,c){if(c.values.length>0)return b=!0,!1}),berocket_apply_filters("bapf_rst_sel_show",b)?a(".bapf_rst_sel").show():a(".bapf_rst_sel").hide()},berocket_add_filter("braapf_init",braapf_reset_buttons_hide,1500),berocket_add_filter("braapf_init_filtered_set",braapf_reset_buttons_hide,1500);var d=the_ajax_script.pagination_class;d=d.replace(","," a,"),d=berocket_apply_filters("pagination_links_a_tags",d+" a",the_ajax_script.pagination_class),!the_ajax_script.disable_ajax_loading&&the_ajax_script.pagination_ajax&&a(document).on("click",d,function(c){c.preventDefault();var d=a(this).attr("href");d=berocket_apply_filters("pagination_href_from_clicked_a",decodeURI(d),a(this)),braapf_change_url_history_api(d,{replace:the_ajax_script.seo_friendly_urls}),berocket_add_filter("ajax_load_from_url_beforeSend",b),braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_pagination",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_init_load,braapf_update_url_history_api_from_current]},d))}),!the_ajax_script.disable_ajax_loading&&the_ajax_script.control_sorting&&a(document).on("submit",the_ajax_script.ordering_class,function(b){b.preventDefault();var c=braapf_get_current_url_data();if(c=braapf_remove_pages_from_url_data(c),Array.isArray(c.queryargs)){var d=[];a.each(c.queryargs,function(a,b){"orderby"!=b.name&&d.push(b)}),c.queryargs=d}else c.queryargs=[];var e=a(this).serializeArray();Array.isArray(e)&&a.each(e,function(a,b){"paged"==b.name?c.page=parseInt(b.value):"orderby"==b.name?the_ajax_script.default_sorting!=b.value&&c.queryargs.push(b):c.queryargs.push(b)});var f=braapf_build_url_from_urldata(c);braapf_filter_products_by_url(f)}),braapf_get_url_with_filters_selected=function(){braapf_grab_all();var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split),d=braapf_get_current_url_data();d.filter=c,d=braapf_remove_pages_from_url_data(d),d=braapf_apply_additional_filter_data(d);var e=braapf_build_url_from_urldata(d);return e},braapf_update_products=function(b,c){"undefined"==typeof b&&(b="filter"),"undefined"==typeof c&&(c=!1),b=berocket_apply_filters("before_update_products_context",b,c);var d=berocket_apply_filters("before_update_products_context_url_filtered",braapf_get_url_with_filters_selected(),b,c);berocket_apply_filters("apply_filters_to_page",0==a(".berocket_aapf_widget_update_button:visible, .bapf_update:visible").length||"filter"!=b,b,c,d)?(braapf_selected_filters_area_set(),braapf_filter_products_by_url(d)):berocket_apply_filters("apply_filters_to_page_partial",!1,b,c,d)&&braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_filters_partial",{done:[braapf_replace_each_filter,braapf_init_load]},d,"partial"),"partial")},braapf_filter_products_by_url=function(b){berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,b)?location.href=b:(braapf_change_url_history_api(b,{replace:the_ajax_script.seo_friendly_urls}),braapf_ajax_load_from_url(b,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},b,"default")))},braapf_update_url_history_api_from_current=function(){the_ajax_script.seo_friendly_urls&&(url_filtered=braapf_get_url_with_filters_selected(),history.replaceState(history.state,"BeRocket Rules",url_filtered))},braapf_grab_all=function(b){"undefined"==typeof b&&(b=!1);var c=berocket_apply_filters("before_grab_all_filters",[],b);if(b===!1)var d=a(".bapf_sfilter");else var d=a(b).find(".bapf_sfilter");return d.each(function(){var a=braapf_grab_single(this,c);a!==!1&&c.push(a)}),c=berocket_apply_filters("grab_all_filters",c,b),b===!1&&(braapf_selected_filters=c),c},braapf_grab_single=function(b,c,d){"undefined"==typeof d&&(d=!1),b=a(b);var e=!1,f=!1,g=b.data("taxonomy");if("undefined"==typeof g||!g)return berocket_apply_filters("grab_single_filter_taxonomy_undefined",e,b,c);if(a.each(c,function(a,b){b.taxonomy==g&&(f=!0)}),!berocket_apply_filters("grab_single_filter_exist",f,b,c)){if(e=berocket_apply_filters("grab_single_filter",e,b,c),e!==!1)return e;var h=b.data("op"),i=b.data("name");"undefined"==typeof i&&(i="");var j=braapf_glue_by_operator(h),k=[],l=[];if(d)var m=b;else var m=a(".bapf_sfilter[data-taxonomy="+g+"]");m.find("input:checked:not(:disabled)").each(function(b,c){l.indexOf(a(this).val())==-1&&(k.push({value:a(this).val(),html:a(this).data("name")}),l.push(a(this).val()))}),e={name:i,taxonomy:g,values:k,glue:j,operator:h}}return berocket_apply_filters("grab_single_filter_default",e,b,c)},braapf_glue_by_operator=function(a){"string"!=typeof a&&(a="");var b="-";return"and"==a.toLowerCase()&&(b="+"),berocket_apply_filters("glue_by_operator",b,a)},braapf_compact_filters=function(b){"undefined"==typeof b&&(b=braapf_selected_filters);var c=[];return a.each(b,function(b,d){var e="";"undefined"!=typeof d.customValuesLine?e=d.customValuesLine:a.each(d.values,function(a,b){e.length&&(e+=d.glue),e+=b.value}),e.length&&c.push(berocket_apply_filters("compat_filters_result_single",{taxonomy:d.taxonomy,values:e},d))}),berocket_apply_filters("compat_filters_result",c,b)},braapf_compat_filters_to_string=function(b,c,d){var e="";return a.each(b,function(a,f){e.length&&(e+=d);var g=c;g=g.replace("%t%",f.taxonomy),g=g.replace("%v%",f.values),e+=berocket_apply_filters("compat_filters_to_string_single",g,f,b,c,d)}),berocket_apply_filters("compat_filters_to_string",e,b,c,d)},braapf_get_current_url_data=function(b){if("undefined"==typeof b)var c=location.href.split("#")[0].split("?")[0],d=location.search.substring(1);else{var c=b.split("#")[0].split("?")[0];if(b.split("#")[0].split("?").length>1)var d=b.split("#")[0].split("?")[1];else var d=""}var e=[],f=1,g=c.match(/\/page\/(\d+)/);return g&&"string"==typeof g[1]&&(f=parseInt(g[1]),c=c.replace(/\/page\/(\d+)/,"")),d=d.split("&"),a.each(d,function(a,b){b.length&&(d[a]=b.split("="),"paged"==d[a][0]?f=parseInt(d[a][1]):e.push({name:d[a][0],value:d[a][1]}))}),berocket_apply_filters("get_current_url_data",{baselink:c,queryargs:e,filter:"",page:f})},braapf_remove_pages_from_url_data=function(b){if(b.page=1,Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"product-page"!=b.name&&c.push(b)}),b.queryargs=c}return b},braapf_apply_additional_filter_data=function(b,c){return"undefined"==typeof c&&(c=braapf_selected_filters),a.each(c,function(a,c){b=berocket_apply_filters("apply_additional_filter_data",b,c)}),b},braapf_build_url_from_urldata=function(b,c){"undefined"==typeof c&&(c=braapf_build_url_parameters_default());var d=berocket_apply_filters("url_from_urldata_baselink",b.baselink,b,c),e="";return b.queryargs.length&&a.each(b.queryargs,function(a,b){e.length&&(e+="&"),b.name.length&&(e+=b.name+"="+b.value)}),b.page&&b.page>1&&(e.length&&(e+="&"),e+="paged="+b.page),e.length&&(e="?"+e),d=berocket_apply_filters("url_from_urldata_linkget",d+e,b,c,d,e)},braapf_build_url_parameters_default=function(){return berocket_apply_filters("build_url_parameters_default",{})},braapf_replace_current_with_new=function(b,c,d){"undefined"==typeof d&&(d={}),args={replace:!1},jQuery.extend(args,d);var e=a("<div><div>"+b+"</div></div>"),f=e.find(c),g=a(c);0!=g.length&&(f.length!=g.length&&0!=f.length&&berocket_throw_error("error_notsame_block_qty",c,f.length,g.length),0==f.length?(g.html("").addClass("braapfNotReplaced"),g.hide()):(g.each(function(b,c){"undefined"!=typeof f[b]?args.replace?a(c).replaceWith(a(f[b])):a(c).html(a(f[b]).html()).removeClass("braapfNotReplaced"):a(c).html("").addClass("braapfNotReplaced")}),g.show()))},braapf_replace_products=function(b){var c=the_ajax_script.products_holder_id;a("<div><div>"+b+"</div></div>");a(".bapf_no_products").remove(),braapf_replace_current_with_new(b,c),a(".braapfNotReplaced").filter(c).length&&a(".braapfNotReplaced").filter(c).before(a(the_ajax_script.no_products))},braapf_replace_pagination=function(b){var c=the_ajax_script.pagination_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().after(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_result_count=function(b){var c=the_ajax_script.result_count_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_orderby=function(b){var c=the_ajax_script.ordering_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_each_filter=function(b){var c=a("<div><div>"+b+"</div></div>");a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).html(c.find(".berocket_single_filter_widget_"+b).last().html()),c.find(".berocket_single_filter_widget_"+b).is(".bapf_mt_none")?a(".berocket_single_filter_widget_"+b).addClass("bapf_mt_none"):a(".berocket_single_filter_widget_"+b).removeClass("bapf_mt_none")})},braapf_change_url_history_api=function(a,b){if("undefined"!=typeof b&&b.replace){var c={BeRocket:"Rules"};history.replaceState(c,""),history.pushState(c,"",a),history.pathname=a}},berocket_apply_filters("load_products_ajax_on_popstate",!0)&&(window.onpopstate=function(b){if(null!=b.state&&"Rules"==b.state.BeRocket){var c=location.href;berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,c)?location.href=c:braapf_ajax_load_from_url(c,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},c,"default"))}}),braapf_ajax_load_from_url=function(a,b,c,d){"undefined"==typeof d&&(d="default"),"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={done:[],fail:[],always:[]}),"undefined"!=typeof c.done&&Array.isArray(c.done)||(c.done=[]),"undefined"!=typeof c.fail&&Array.isArray(c.fail)||(c.fail=[]),"undefined"!=typeof c.always&&Array.isArray(c.always)||(c.always=[]),a=berocket_apply_filters("ajax_load_from_url_url",a,b,c,d),b=berocket_apply_filters("ajax_load_from_url_data",b,a,c,d),c=berocket_apply_filters("ajax_load_from_url_callback",c,a,b,d),braapf_ajax_load_from_url_request(a,b,c,d)},braapf_ajax_load_from_url_request=function(b,c,d,e){a(document).trigger("berocket_ajax_filtering_start"),"object"==typeof braapf_ajax_request&&"undefined"!=typeof braapf_ajax_request.abort&&braapf_ajax_request.abort(),braapf_ajax_request=a.ajax({method:"GET",url:b,data:c,beforeSend:function(a){a=berocket_apply_filters("ajax_load_from_url_beforeSend",a,b,c,d,e)}}).done(function(f,g,h){a(document).trigger("berocket_ajax_filtering_on_update"),f=berocket_apply_filters("ajax_load_from_url_done",f,b,c,d,e),a.each(d.done,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_done_after",f,b,c,d,e),a(document).trigger("berocket_ajax_products_loaded")}).fail(function(f,g,h){if("abort"==g)return!1;if(a(document).trigger("berocket_ajax_products_not_loaded"),f=berocket_apply_filters("ajax_load_from_url_fail",f,b,c,d,e),a.each(d.fail,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_fail_after",f,b,c,d,e),"default"==e){var i=jQuery.param(c);i&&(b=b.split("?").length>1?b+"&"+i:b+"?"+i),location.href=b}}).always(function(f,g,h){f=berocket_apply_filters("ajax_load_from_url_always",f,b,c,d,e),a.each(d.always,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_always_after",f,b,c,d,e),a(document).trigger("berocket_ajax_filtering_end")})},braapf_init_load=function(){var b=berocket_apply_filters("filter_mobile_width",767),c=berocket_apply_filters("filter_tablet_width",1024);a(window).width()<=b&&a(".bapf_sngl_hd_mobile").remove(),a(window).width()>b&&a(window).width()<=c&&a(".bapf_sngl_hd_tablet").remove(),a(window).width()>c&&a(".bapf_sngl_hd_desktop").remove(),a(".bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)").each(function(){a(this).css("max-height",a(this).data("mcs-h")).mCustomScrollbar({scrollInertia:300}).addClass("bapf_mcs_ready")}),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");berocket_apply_filters("remove_same_filters_to_prevent_errors",a(".berocket_single_filter_widget_"+b).length>1,a(this),b)&&a(".berocket_single_filter_widget_"+b).not(a(".berocket_single_filter_widget_"+b).first()).remove()}),a("body").on("click",".bapf_desci",function(a){a.stopPropagation()}),a("body").on("hover",".bapf_desci",function(a){a.stopPropagation()}),berocket_do_action("braapf_init",braapf_selected_filters),a(document).trigger("berocket_filters_first_load")},braapf_update_page_on_error=function(){berocket_apply_filters("update_page_on_error",!0)&&location.reload()},braapf_selected_filters_area_set=function(){if("undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0){var b="";a.each(braapf_filtered_filters,function(c,d){if(d.values.length>0){var e='<div class="bapf_sfa_taxonomy"><span>'+d.name+"</span>";e+="<ul>";var f="";a.each(d.values,function(a,b){f+=berocket_apply_filters("default_selected_filters_area_single",'<li><a href="#unselect_'+b.value+'" class="braapf_unselect" data-taxonomy="'+d.taxonomy+'" data-value="'+b.value+'"><i class="fa fa-times"></i>'+b.html+"</a></li>",b)}),e+=f,e+="</ul></div>",b+=berocket_apply_filters("default_selected_filters_area_single_taxonomy",e,d,f)}}),b?(a(".bapf_sfa_mt_hide").show().parent().removeClass("bapf_mt_none"),b=berocket_apply_filters("default_selected_filters_area_full_exist",'<div class="berocket_aapf_widget_selected_filter">'+b+'<ul class="bapf_sfa_unall"><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+"</a></li></ul>",b,braapf_filtered_filters)):(b=berocket_apply_filters("default_selected_filters_area_full_notexist",the_ajax_script.translate.nothing_selected,b,braapf_filtered_filters),a(".bapf_sfa_mt_hide").hide().parent().addClass("bapf_mt_none")),a(".berocket_aapf_widget_selected_area").html(b)}},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect",function(b){b.preventDefault(),a(".bapf_sfilter[data-taxonomy="+a(this).data("taxonomy")+"]").trigger("braapf_unselect",a(this).data()),berocket_do_action("update_products","reset_single",a(this))}),braapf_unselect_all=function(){braapf_grab_all(),"undefined"!=typeof braapf_selected_filters&&braapf_selected_filters.length>0&&a.each(braapf_selected_filters,function(b,c){c.values.length>0&&a(".bapf_sfilter[data-taxonomy="+c.taxonomy+"]").trigger("braapf_unselect_all",c)})},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect_all",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),berocket_add_filter("braapf_init",braapf_grab_all_init,1e3),berocket_add_filter("braapf_init",braapf_selected_filters_area_set_init,1100),berocket_add_filter("braapf_init_filtered_set",braapf_selected_filters_area_set_init,1100),braapf_reload_page_for_products_error=function(a,b){return b==the_ajax_script.products_holder_id&&braapf_update_page_on_error(),a},berocket_add_filter("ajax_load_from_url_beforeSend",c),berocket_add_filter("update_products",braapf_update_products),berocket_add_filter("error_notsame_block_qty",braapf_reload_page_for_products_error),bapf_universal_theme_compatibility=function(b){if(berocket_apply_filters("universal_theme_compatibility",!0)){a(window).trigger("resize");try{berocket_apply_filters("uncode_theme_compatibility","object"==typeof UNCODE&&"function"==typeof UNCODE.init)&&UNCODE.init()}catch(a){berocket_throw_error("uncode_theme_compatibility",a)}try{berocket_apply_filters("flatsome_theme_compatibility","object"==typeof Flatsome&&"function"==typeof Flatsome.attach&&jQuery(the_ajax_script.products_holder_id).length)&&Flatsome.attach(jQuery(the_ajax_script.products_holder_id))}catch(a){berocket_throw_error("flatsome_theme_compatibility",a)}try{berocket_apply_filters("woodmart_theme_compatibility","object"==typeof woodmartThemeModule&&"function"==typeof woodmartThemeModule.init)&&(woodmartThemeModule.wooInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.productsLoadMore())}catch(a){berocket_throw_error("woodmart_theme_compatibility",a)}try{berocket_apply_filters("divi_theme_compatibility","function"==typeof et_reinit_waypoint_modules)&&et_reinit_waypoint_modules()}catch(a){berocket_throw_error("divi_theme_compatibility",a)}try{berocket_apply_filters("rey_theme_compatibility","object"==typeof jQuery.reyTheme&&"function"==typeof jQuery.reyTheme.init)&&jQuery.reyTheme.init()}catch(a){berocket_throw_error("rey_theme_compatibility",a)}try{berocket_apply_filters("layzyloadimage_script_compatibility","function"==typeof layzyLoadImage)&&layzyLoadImage()}catch(a){berocket_throw_error("layzyloadimage_script_compatibility",a)}try{berocket_apply_filters("jetpacklazyimages_script_compatibility","function"==typeof jetpackLazyImagesModule)&&jetpackLazyImagesModule()}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{jQuery("img.jetpack-lazy-image").each(function(){jQuery(this).removeClass("jetpack-lazy-image").attr("src",jQuery(this).data("lazy-src")),jQuery(this).removeClass("jetpack-lazy-image").attr("srcset","")})}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{berocket_apply_filters("swift_script_compatibility","object"==typeof SWIFT&&"object"==typeof SWIFT.woocommerce&&"function"==typeof SWIFT.woocommerce.init)&&SWIFT.woocommerce.init()}catch(a){berocket_throw_error("swift_script_compatibility",a)}try{"undefined"!=typeof baapfGet_wprocketInstance&&baapfGet_wprocketInstance.update()}catch(a){berocket_throw_error("wprocket_script_compatibility",a)}try{jQuery(document).trigger("facetwp-loaded")}catch(a){berocket_throw_error("facetwp_script_compatibility",a)}try{berocket_apply_filters("etTheme_compatibility","object"==typeof etTheme&&"function"==typeof etTheme.global_image_lazy)&&etTheme.global_image_lazy()}catch(a){berocket_throw_error("etTheme_compatibility",a)}}return b},berocket_add_filter("ajax_load_from_url_always_after",bapf_universal_theme_compatibility,2500),a(document).ready(function(){berocket_apply_filters("remove_shortcode_fix_filters",a(".berocket_wc_shortcode_fix").length)&&(braapf_replace_each_filter(a(".berocket_wc_shortcode_fix").html()),a(".berocket_wc_shortcode_fix").html("")),braapf_init_load(),braapf_filtered_filters_set(),a(document).trigger("berocket_filters_document_ready")}),braapf_disable_ajax_loading=function(a){return!0},the_ajax_script.disable_ajax_loading&&berocket_add_filter("page_has_products_holder",braapf_disable_ajax_loading),braapf_close_tippy=function(){try{a(".tippy-box").length&&a(".tippy-box").each(function(){"undefined"!=typeof a(this).parent()[0]._tippy&&a(this).parent()[0]._tippy.hide()})}catch(a){}},berocket_add_filter("update_products",braapf_close_tippy)}(jQuery);var braapf_get_current_filters,braapf_filters_url_decode,braapf_scroll_shop_to_top,braapf_set_filters_to_link,braapf_convert_ckbox_to_radio,braapf_hierarhical_save,braapf_hierarhical_set,braapf_collapse_status_save,braapf_collapse_status_set,braapf_show_hide_values_save,braapf_show_hide_values_set,berocket_custom_sidebar_close,berocket_custom_sidebar_open;!function(a){function b(){jQuery(".berocket_product_table_compat .dataTables_length select").length&&jQuery(".berocket_product_table_compat .wc-product-table").dataTable()._fnSaveState();var a=jQuery(".berocket_product_table_compat .wc-product-table").attr("id");if("undefined"!=typeof window["config_"+a]&&window["config_"+a].serverSide){jQuery(".berocket_product_table_compat .wc-product-table").DataTable().destroy();var b=jQuery(".berocket_product_table_compat").html();jQuery(".berocket_product_table_compat").html(""),jQuery(".berocket_product_table_compat").html(b),jQuery(".berocket_product_table_compat .blockUI.blockOverlay").remove(),jQuery(".berocket_product_table_compat .wc-product-table").productTable()}}braapf_get_current_filters=function(b){if(b.queryargs.length){var c=[];a.each(b.queryargs,function(a,d){d.name==the_ajax_script.url_variable||decodeURI(d.name)==the_ajax_script.url_variable?b.filter=d.value:c.push(d)}),b.queryargs=c}return b},braapf_set_filters_to_link=function(a,b,c,d,e){return"string"==typeof b.filter&&b.filter.length&&(a+=e.length?"&":"?",a+=the_ajax_script.url_variable+"="+b.filter),a},braapf_convert_ckbox_to_radio=function(b,c,d,e){var f=(a(b),a(b).closest(".bapf_sfilter.bapf_ckbox"));f.is(".bapf_asradio")&&f.find("input[type=checkbox]:checked:not(:disabled)").each(function(){var b=a(this).val();b!=d&&braapf_checkbox_same(c,b,!1)})},berocket_add_filter("input_ckbox_changed",braapf_convert_ckbox_to_radio),a(document).on("click",".bapf_ochild, .bapf_cchild",function(b){b.preventDefault(),b.stopPropagation(),a(this).is(".bapf_ochild")?a(this).trigger("bapf_ochild"):a(this).trigger("bapf_cchild")}),a(document).on("bapf_ochild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_open_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().removeClass("bapf_ochild").removeClass("fa-plus").addClass("bapf_cchild").addClass("fa-minus"),a(this).find("ul").first().show())}),a(document).on("bapf_cchild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_close_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().addClass("bapf_ochild").addClass("fa-plus").removeClass("bapf_cchild").removeClass("fa-minus"),a(this).find("ul").first().hide())});var c=[];braapf_hierarhical_save=function(b){return c=[],a(".bapf_cchild").each(function(){c.push(a(this).parent().children("input[type=checkbox]").attr("id"))}),b},braapf_hierarhical_set=function(b){return a.each(c,function(b,c){a("#"+c).trigger("bapf_ochild")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_hierarhical_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_hierarhical_set,1e3),a(document).on("click",".bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl",function(b){b.preventDefault,a(this).closest(".bapf_ocolaps, .bapf_ccolaps").is(".bapf_ocolaps")?a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ocolaps"):a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ccolaps")}),a(document).on("bapf_ocolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).removeClass("bapf_ocolaps").addClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_open_apply",!0,a(this))&&(a(this).find(".bapf_body").first().show(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").removeClass("fa-chevron-down").addClass("fa-chevron-up"))}),a(document).on("bapf_ccolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).addClass("bapf_ocolaps").removeClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_close_apply",!0,a(this))&&(a(this).find(".bapf_body").first().hide(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").addClass("fa-chevron-down").removeClass("fa-chevron-up"))});var d={open:[],close:[]};braapf_collapse_status_save=function(b){return d={open:[],close:[]},a(".bapf_ocolaps, .bapf_ccolaps").each(function(){a(this).is(".bapf_ocolaps")?d.open.push(a(this).attr("id")):d.close.push(a(this).attr("id"))}),b},braapf_collapse_status_set=function(b){return a.each(d.open,function(b,c){a("#"+c).trigger("bapf_ccolaps")}),a.each(d.close,function(b,c){a("#"+c).trigger("bapf_ocolaps")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_collapse_status_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_collapse_status_set,1e3),a(document).on("click",".bapf_show_hide",function(){a(this).closest(".bapf_sfilter").toggleClass("bapf_fhide"),a(this).closest(".bapf_sfilter").is(".bapf_fhide")?a(this).text(a(this).data("show")):a(this).text(a(this).data("hide"))});var e={open:[],close:[]};braapf_show_hide_values_save=function(b){return e={open:[],close:[]},a(".bapf_sfilter").each(function(){a(this).is(".bapf_fhide")?e.close.push(a(this).attr("id")):e.open.push(a(this).attr("id"))}),b},braapf_show_hide_values_set=function(b){return a.each(e.open,function(b,c){a("#"+c).removeClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("hide"))}),a.each(e.close,function(b,c){a("#"+c).addClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("show"))}),b},berocket_add_filter("ajax_load_from_url_done",braapf_show_hide_values_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_show_hide_values_set,1e3),braapf_scroll_shop_to_top=function(b,c,d,e,f){var g=berocket_apply_filters("filter_mobile_width",767);if(berocket_apply_filters("scroll_shop_to_top","default"==f&&(1==the_ajax_script.scroll_shop_top||2==the_ajax_script.scroll_shop_top&&a(window).width()<g||3==the_ajax_script.scroll_shop_top&&a(window).width()>=g))){var h=0;a(the_ajax_script.products_holder_id).length?(h=a(the_ajax_script.products_holder_id).offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)):a(".bapf_no_products").length&&(h=a(".bapf_no_products").offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)),a("html, body").animate({scrollTop:h},"slow")}return b},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_scroll_shop_to_top),a(document).on("mousedown",".wc-product-table-reset a",function(){a(this).remove(),br_reset_all_filters()}),a(document).on("click",".berocket_element_above_products_is_hide_toggle",function(b){b.preventDefault(),a(this).toggleClass("active").next().slideToggle(200,"linear");var c="inactive";a(this).is(".active")&&(c="active"),a(document).trigger("berocket_element_above_products_"+c)}),berocket_custom_sidebar_close=function(){a(".berocket_ajax_filters_sidebar_toggle").removeClass("active"),a("#berocket-ajax-filters-sidebar").removeClass("active"),a("body").removeClass("berocket_ajax_filters_sidebar_active")},berocket_custom_sidebar_open=function(){a(".berocket_ajax_filters_sidebar_toggle").addClass("active"),a("#berocket-ajax-filters-sidebar").addClass("active"),
2
- a("body").addClass("berocket_ajax_filters_sidebar_active")},a(document).on("berocket_custom_sidebar_close",berocket_custom_sidebar_close),a(document).on("berocket_custom_sidebar_open",berocket_custom_sidebar_open),a(document).on("click",".berocket_ajax_filters_sidebar_toggle",function(b){b.preventDefault(),a(this).is(".active")&&a("#berocket-ajax-filters-sidebar").is(".active")?berocket_custom_sidebar_close():berocket_custom_sidebar_open()}),a(document).on("click","#berocket-ajax-filters-sidebar-shadow, #berocket-ajax-filters-sidebar-close",function(a){a.preventDefault(),berocket_custom_sidebar_close()}),a(document).on("berocket_ajax_filtering_start",function(){jQuery(".berocket_product_table_compat").length&&b()}),braapf_filters_url_decode=function(a){return the_ajax_script.seo_uri_decode&&(a=encodeURIComponent(a),the_ajax_script.nice_urls&&(a=a.replace(/%2F/g,"/"))),a},jQuery(document).on("elementor/popup/show",function(){braapf_init()})}(jQuery),berocket_add_filter("get_current_url_data",braapf_get_current_filters),berocket_add_filter("compat_filters_to_string",braapf_filters_url_decode,900),berocket_add_filter("url_from_urldata_linkget",braapf_set_filters_to_link);var braapf_child_parent_grab_single,braapf_child_parent_fix_selected,braapf_child_parent_load_with_update_button,braapf_add_loader_element,braapf_remove_loader_element,braapf_elementor_sticky_fix,baapfGet_wprocketInstance;!function(a){braapf_child_parent_grab_single=function(b,c,d){var e=c.data("child");if("undefined"!=typeof e&&e>0&&"object"==typeof b&&"undefined"!=typeof b.values&&Array.isArray(b.values)&&b.values.length>0){e++;var f=c.data("taxonomy"),g=a(".bapf_sfilter.bapf_child_"+e+"[data-taxonomy="+f+"]");if(g.length){var h=braapf_grab_single(g,[],!0);"object"==typeof h&&"undefined"!=typeof h.values&&Array.isArray(h.values)&&h.values.length>0&&(b=h)}}return b},braapf_child_parent_fix_selected=function(b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child"),f=d.data("taxonomy");if("undefined"!=typeof e&&e>0)for(i=e+1;a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").length;i++)a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").trigger("braapf_unselect",!1)}}return b},braapf_child_parent_load_with_update_button=function(a,b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child");d.data("taxonomy");"undefined"!=typeof e&&e>0&&(a=!0)}}return a},berocket_add_filter("grab_single_filter_default",braapf_child_parent_grab_single,9e6),berocket_add_filter("before_update_products_context",braapf_child_parent_fix_selected),berocket_add_filter("apply_filters_to_page_partial",braapf_child_parent_load_with_update_button);var b;braapf_add_loader_element=function(c,d,e,f,g){return"default"==g&&("undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),b=a(the_ajax_script.load_image),a("body").append(b)),c},braapf_remove_loader_element=function(a){return"undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),a},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_add_loader_element),berocket_add_filter("ajax_load_from_url_always_after",braapf_remove_loader_element),a(document).on("click",".bapf_sfilter.bapf_ckbox .bapf_body li label a",function(b){b.preventDefault(),a(this).parent().trigger("click")}),jQuery(".elementor-widget").length&&jQuery(window).on("scroll",function(){jQuery(".elementor-sticky__spacer .bapf_sfilter").remove()});try{window.addEventListener("LazyLoad::Initialized",function(a){baapfGet_wprocketInstance=a.detail.instance})}catch(a){berocket_throw_error("wprocketInstance_get",a)}}(jQuery);var braapf_init_ion_slidr,braapf_ion_slidr_same,braapf_jqrui_slidr_ion_value_wc_price,braapf_jqrui_slidr_ion_value_arr_attr,braapf_init_ion_slidr_for_parent,braapf_grab_single_ion,braapf_jqrui_slidr_ion_values_link_arr_attr;!function(a){braapf_init_ion_slidr=function(){braapf_init_ion_slidr_for_parent(a(document))},braapf_init_ion_slidr_for_parent=function(b){b.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_all .bapf_slidr_main"),c=function(a){if(!b.is(".bapf_ion_blocked")){b.addClass("bapf_ion_blocked");var c=b.closest(".bapf_sfilter").data("taxonomy");braapf_ion_slidr_same(c,a);var d={element:"#"+b.closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",d,b),berocket_do_action("update_products","filter",b),b.removeClass("bapf_ion_blocked")}},d=berocket_apply_filters("jqrui_data_slidr_ion",{type:"double",from:b.data("start"),to:b.data("end"),grid:!1,force_edges:!0,onFinish:c,onUpdate:c,prettify:function(a){return a=berocket_apply_filters("jqrui_slidr_ion_"+b.data("display"),a,b)}},b);b.ionRangeSlider(d),a(this).addClass("bapf_slidr_ready")})},braapf_ion_slidr_same=function(b,c){a(".bapf_slidr_ion.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_ion_blocked");var d=b.data("ionRangeSlider");d.update({from:c.from,to:c.to}),b.removeClass("bapf_ion_blocked")})},braapf_jqrui_slidr_ion_value_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a=berocket_format_number(parseFloat(a),c)},braapf_jqrui_slidr_ion_value_arr_attr=function(a,b){var c=b.data("attr");return a=c[a].n},braapf_grab_single_ion=function(a,b){if(b.is(".bapf_slidr_ion.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main").data("ionRangeSlider"),d=b.find(".bapf_slidr_main"),e=[c.options.from,c.options.to],f=[berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.from,d),berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.to,d)],g=d.data("prefix");"undefined"==typeof g&&(g="");var h=d.data("postfix");if("undefined"==typeof h&&(h=""),f[0]=g+f[0]+h,f[1]=g+f[1]+h,e[0]!=d.data("min")||e[1]!=d.data("max")){var i={value:e[0]+"_"+e[1],html:f[0]+" - "+f[1]};i=berocket_apply_filters("jqrui_slidr_ion_link_"+d.data("display"),i,e,f,d,a),a.values=[i]}}return a},braapf_jqrui_slidr_ion_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_ion",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("ionRangeSlider");d.addClass("bapf_ion_blocked"),e.update({from:e.options.min,to:e.options.max}),d.removeClass("bapf_ion_blocked")}),berocket_add_filter("braapf_init",braapf_init_ion_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_ion_slidr_for_parent),berocket_add_filter("grab_single_filter_default",braapf_grab_single_ion),berocket_add_filter("jqrui_slidr_ion_link_arr_attr",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_wc_price",braapf_jqrui_slidr_ion_value_wc_price),berocket_add_filter("jqrui_slidr_ion_arr_attr",braapf_jqrui_slidr_ion_value_arr_attr)}(jQuery);var braapf_grab_single_select;!function(a){a(document).on("change",".bapf_slct .bapf_body select",function(){var b={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",b,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_grab_single_select=function(b,c){if(c.is(".bapf_slct")&&0!=b){var d=a('.bapf_slct[data-taxonomy="'+b.taxonomy+'"] .bapf_body select:not(:disabled)'),e=[];d.find("option:selected:not(:disabled)").each(function(){var c=a(this).val();c&&e.indexOf(c)===-1&&(e.push(c),b.values.push({value:c,html:a(this).data("name")}))})}return b},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slct",function(b,c){a(this).find(".bapf_body select:not(:disabled) option:selected:not(:disabled)").each(function(){"undefined"!=typeof c&&"undefined"!=typeof c.value&&c.value!=a(this).val()||a(this).prop("selected",!1)})}),berocket_add_filter("grab_single_filter_default",braapf_grab_single_select)}(jQuery);var bapf_select2_init,bapf_select2_init_for_parent,bapf_select2_disable_for_parent;jQuery(document).ready(function(){bapf_select2_init=function(){bapf_select2_init_for_parent(jQuery(document))},bapf_select2_init_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){if(!jQuery(this).data("select2")&&!jQuery(this).is(".select2-hidden-accessible")){var a={width:"100%",theme:"default"};jQuery(this).prop("multiple")&&(a.placeholder=jQuery(this).data("placeholder")),jQuery(this).parents("#berocket-ajax-filters-sidebar").length&&(0==jQuery("#bapf-select2-high-zindex").length&&jQuery("body").append('<div id="bapf-select2-high-zindex"></div>'),a.dropdownParent=jQuery("#bapf-select2-high-zindex")),a=berocket_apply_filters("jqrui_data_select2",a,jQuery(this)),jQuery(this).select2(a)}})},bapf_select2_disable_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){jQuery(this).data("select2")&&jQuery(this).select2("destroy")})},jQuery(document).on("berocket_ajax_filtering_on_update",function(){bapf_select2_disable_for_parent(jQuery(document))}),bapf_select2_init(),berocket_add_filter("braapf_init",bapf_select2_init,2e3),berocket_add_filter("braapf_init_for_parent",bapf_select2_init_for_parent)});var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price,braapf_init_jqrui_slidr_for_parent,braapf_grab_single_jqrui,braapf_jqrui_slidr_values_arr_attr,braapf_jqrui_slidr_values_link_arr_attr;!function(a){function b(b,c){var d=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main"),e=d.slider("values");a(b).val(e[c]),a(b).data("val",e[c])}function c(b,c,d){var e=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main");if("focusout"==d){if(a(b).val()==a(b).data("val")){var f=e.slider("values");e.trigger("braapf_change_jqrui_slidr",[f])}}else{var g=parseInt(a(b).val());e.slider("values",c,g)}}a.each([{position:0,className:"bapf_from"},{position:1,className:"bapf_to"}],function(d,e){a(document).on("focusin",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(){b(this,e.position)}),a(document).on("change focusout",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(a){c(this,e.position,a.type)}),a(document).on("change",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" select",function(a){c(this,e.position,a.type)})}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").text(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").text(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").val(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").val(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=d.data("attr");if(d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length||d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length){var e=d.data("attr"),f=[],g=[],h=!1,i=!1;a.each(e,function(a,b){a==c[0]&&(i=!0),h||f.push({v:b.v,n:b.n,ov:a}),i&&g.push({v:b.v,n:b.n,ov:a}),a==c[1]&&(h=!0)})}d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_from select option").remove(),a.each(f,function(b,e){var f="";e.ov==c[0]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_from select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))})),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_to select option").remove(),a.each(g,function(b,e){var f="";e.ov==c[1]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))}))}),braapf_init_jqrui_slidr=function(){braapf_init_jqrui_slidr_for_parent(a(document))},braapf_init_jqrui_slidr_for_parent=function(b){b.find(".bapf_slidr_jqrui:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_main"),c=berocket_apply_filters("jqrui_data_slidr_jqrui",{range:!0,min:b.data("min"),max:b.data("max"),values:[b.data("start"),b.data("end")],step:b.data("step"),create:function(b,c){var d=a(this).slider("values");a(this).trigger("braapf_change_jqrui_slidr",[d])},slide:function(b,c){a(this).trigger("braapf_change_jqrui_slidr",[c.values])},change:function(b,c){var d=a(this).slider("values");if(a(this).trigger("braapf_change_jqrui_slidr",[d]),!a(this).is(".bapf_jqrui_blocked")){var d=a(this).slider("values"),e=a(this).parents(".bapf_sfilter").data("taxonomy");braapf_jqrui_slidr_same(e,d);var f={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",f,a(this)),berocket_do_action("update_products","filter",a(this))}}},b);b.slider(c),a(this).addClass("bapf_slidr_ready")})},braapf_jqrui_slidr_same=function(b,c){a(".bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_jqrui_blocked"),b.slider("values",c),b.removeClass("bapf_jqrui_blocked")})},braapf_jqrui_slidr_values_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a[0]=berocket_format_number(a[0],c),a[1]=berocket_format_number(a[1],c),a},braapf_grab_single_jqrui=function(a,b){if(b.is(".bapf_slidr_jqrui.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main"),d=c.slider("values"),e=c.slider("values"),f="";b.find(".bapf_tbprice").length&&(f=b.find(".bapf_tbprice").first().text());var g="";if(b.find(".bapf_taprice").length&&(g=b.find(".bapf_taprice").first().text()),d[0]!=c.data("min")||d[1]!=c.data("max")){e=berocket_apply_filters("jqrui_slidr_"+c.data("display"),e,c),e[0]=f+e[0]+g,e[1]=f+e[1]+g;var h={value:d[0]+"_"+d[1],html:e[0]+" - "+e[1]};h=berocket_apply_filters("jqrui_slidr_link_"+c.data("display"),h,d,e,c,a),a.values=[h]}}return a},braapf_jqrui_slidr_values_arr_attr=function(a,b){var c=b.data("attr");return Array.isArray(a)&&2==a.length?(a[0]=c[a[0]].n,a[1]=c[a[1]].n):(a=["",""],a[0]=c[0].n,a[1]=c[c.length-1].n),a},braapf_jqrui_slidr_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_jqrui",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("min"),f=d.data("max");d.addClass("bapf_jqrui_blocked"),d.slider("values",[e,f]),d.removeClass("bapf_jqrui_blocked")}),berocket_add_filter("jqrui_slidr_wc_price",braapf_jqrui_slidr_values_wc_price),berocket_add_filter("jqrui_slidr_arr_attr",braapf_jqrui_slidr_values_arr_attr),berocket_add_filter("jqrui_slidr_link_arr_attr",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("grab_single_filter_default",braapf_grab_single_jqrui),berocket_add_filter("braapf_init",braapf_init_jqrui_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_jqrui_slidr_for_parent)}(jQuery);
1
+ function berocket_make_args_array(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b}function berocket_apply_filters(a,b){if("undefined"!=typeof berocket_filters[a]){var c=berocket_make_args_array(arguments);c.splice(0,1),jQuery.each(berocket_filters[a],function(a,d){b=d.callback.apply(null,c),c[0]=b})}return b}function berocket_do_action(a){if("undefined"!=typeof berocket_filters[a]){var b=berocket_make_args_array(arguments);b.splice(0,1),jQuery.each(berocket_filters[a],function(a,c){c.callback.apply(null,b)})}}function berocket_throw_error(a){var b="berocket_throw_error";if(error_exist=!0,"undefined"!=typeof berocket_filters[b]){for(var c,d=[error_exist];c<arguments.length;c++)d.push(arguments[c]);jQuery.each(berocket_filters[b],function(a,b){if(error_exist=b.callback.apply(null,d),d[0]=error_exist,!error_exist)return!1})}return error_exist}function berocket_add_filter(a,b,c){"undefined"==typeof c&&(c=10),"undefined"==typeof berocket_filters[a]&&(berocket_filters[a]=[]);var d=!1;jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b&&(d=!0)}),d||(berocket_filters[a].push({callback:b,priority:c}),berocket_filters[a]=berocket_sort_by_priority(berocket_filters[a]))}function berocket_remove_filter(a,b,c){if("undefined"==typeof c&&(c=10),"undefined"!=typeof berocket_filters[a]){var d=[];jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b||d.push(e)}),berocket_filters[a]=berocket_sort_by_priority(d)}}function berocket_sort_by_priority(a){return Array.isArray(a)&&a.sort(function(a,b){return a.priority>b.priority?1:a.priority<b.priority?-1:0}),a}function berocket_format_number(a,b){"undefined"==typeof b&&(b=the_ajax_script.number_style);var c=a.toFixed(b[2]);c=c.toString();var d=c.split("."),e=d[0];return c.indexOf(".")!=-1&&(d=d[1]),e=e.replace(/\d(?=(?:\d{3})+(?:$))/g,function(a,c){return a+b[0]}),c.indexOf(".")!=-1&&(e=e+b[1]+d),e}function braapf_grab_all_init(){braapf_grab_all()}function braapf_selected_filters_area_set_init(){braapf_selected_filters_area_set()}function braapf_filtered_filters_set(){braapf_filtered_filters=braapf_selected_filters.slice(),berocket_do_action("braapf_init_filtered_set",braapf_filtered_filters)}var berocket_filters={};berocket_add_filter("compat_filters_result_single",function(a){return"object"==typeof a&&"string"==typeof a.taxonomy&&"pa_"==a.taxonomy.substr(0,3)&&(a.taxonomy=a.taxonomy.substr(3)),a}),jQuery(document).trigger("berocket_hooks_ready");var braapf_filter_blocked=!1,braapf_selected_filters=[],braapf_filtered_filters=[],braapf_filters_var,braapf_ajax_request,braapf_checkbox_same,braapf_update_products,braapf_grab_all,braapf_grab_single,braapf_compact_filters,braapf_compat_filters_to_string,braapf_build_url_from_urldata,braapf_apply_additional_filter_data,braapf_glue_by_operator,braapf_ajax_load_from_url,braapf_ajax_load_from_url_request,braapf_init_load,braapf_remove_pages_from_url_data,braapf_filter_products_by_url,braapf_get_current_url_data,braapf_reset_buttons_hide,bapf_universal_theme_compatibility,braapf_disable_ajax_loading,braapf_close_tippy;!function(a){function b(a){return berocket_remove_filter("ajax_load_from_url_beforeSend",b),a.setRequestHeader("X-Braapfdisable","1"),a}function c(a){return a.setRequestHeader("X-Braapf","1"),a}a(document).on("change",".bapf_sfilter.bapf_ckbox input[type=checkbox]",function(){var b=a(this).val(),c=a(this).parents(".bapf_sfilter").data("taxonomy"),d=a(this).prop("checked");braapf_checkbox_same(c,b,d),berocket_apply_filters("input_ckbox_changed",this,c,b,d);var e={element:"#"+a(this).attr("id"),parent:1,find:!1};berocket_apply_filters("filter_changed_element",e,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_checkbox_same=function(b,c,d){a('.bapf_sfilter[data-taxonomy="'+b+'"] input[value="'+c+'"]').prop("checked",d),a('.bapf_sfilter[data-taxonomy="'+b+'"]').length<a('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+b+'"]').length&&berocket_throw_error("multiple_filters_for_same_taxonomy",b)},a(document).on("braapf_unselect",".bapf_ckbox",function(b,c){if("undefined"==typeof c&&(c=!1),0==c)var d=a(this).find("input[type=checkbox]");else var d=a(this).find('input[value="'+c.value+'"]');if(d.length>0){var e=d.val(),f=a(this).data("taxonomy");d.prop("checked",!1),braapf_checkbox_same(f,e,!1)}}),a(document).on("braapf_unselect_all",".bapf_ckbox",function(b,c){a(this).trigger("braapf_unselect",!1)}),a(document).on("berocket_filters_document_ready",function(){a(".bapf_ckbox input[type=checkbox]:checked").closest("li").parents("li").trigger("bapf_ochild")}),a(document).on("click",".berocket_aapf_widget_update_button, .bapf_update",function(b){b.preventDefault(),berocket_do_action("update_products","update",a(this))}),a(document).on("click",".berocket_aapf_reset_button, .bapf_reset",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),braapf_reset_buttons_hide=function(){berocket_apply_filters("bapf_rst_nofltr_hide","undefined"==typeof braapf_filtered_filters||braapf_filtered_filters.length<=0)?a(".bapf_rst_nofltr").hide():a(".bapf_rst_nofltr").show();var b=!1;"undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0&&a.each(braapf_filtered_filters,function(a,c){if(c.values.length>0)return b=!0,!1}),berocket_apply_filters("bapf_rst_sel_show",b)?a(".bapf_rst_sel").show():a(".bapf_rst_sel").hide()},berocket_add_filter("braapf_init",braapf_reset_buttons_hide,1500),berocket_add_filter("braapf_init_filtered_set",braapf_reset_buttons_hide,1500);var d=the_ajax_script.pagination_class;d=d.replace(","," a,"),d=berocket_apply_filters("pagination_links_a_tags",d+" a",the_ajax_script.pagination_class),!the_ajax_script.disable_ajax_loading&&the_ajax_script.pagination_ajax&&a(document).on("click",d,function(c){c.preventDefault();var d=a(this).attr("href");d=berocket_apply_filters("pagination_href_from_clicked_a",decodeURI(d),a(this)),braapf_change_url_history_api(d,{replace:the_ajax_script.seo_friendly_urls}),berocket_add_filter("ajax_load_from_url_beforeSend",b),braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_pagination",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_init_load,braapf_update_data_from_current]},d))}),!the_ajax_script.disable_ajax_loading&&the_ajax_script.control_sorting&&a(document).on("submit",the_ajax_script.ordering_class,function(b){b.preventDefault();var c=braapf_get_current_url_data();if(c=braapf_remove_pages_from_url_data(c),Array.isArray(c.queryargs)){var d=[];a.each(c.queryargs,function(a,b){"orderby"!=b.name&&d.push(b)}),c.queryargs=d}else c.queryargs=[];var e=a(this).serializeArray();Array.isArray(e)&&a.each(e,function(a,b){"paged"==b.name?c.page=parseInt(b.value):"orderby"==b.name?the_ajax_script.default_sorting!=b.value&&c.queryargs.push(b):c.queryargs.push(b)});var f=braapf_build_url_from_urldata(c);braapf_filter_products_by_url(f)}),braapf_get_url_with_filters_selected=function(){braapf_grab_all();var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split),d=braapf_get_current_url_data();d.filter=c,d=braapf_remove_pages_from_url_data(d),d=braapf_apply_additional_filter_data(d);var e=braapf_build_url_from_urldata(d);return e},braapf_update_products=function(b,c){"undefined"==typeof b&&(b="filter"),"undefined"==typeof c&&(c=!1),b=berocket_apply_filters("before_update_products_context",b,c);var d=berocket_apply_filters("before_update_products_context_url_filtered",braapf_get_url_with_filters_selected(),b,c);berocket_apply_filters("apply_filters_to_page",0==a(".berocket_aapf_widget_update_button:visible, .bapf_update:visible").length||"filter"!=b,b,c,d)?(braapf_selected_filters_area_set(),braapf_filter_products_by_url(d)):berocket_apply_filters("apply_filters_to_page_partial",!1,b,c,d)&&braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_filters_partial",{done:[braapf_replace_each_filter,braapf_init_load]},d,"partial"),"partial")},braapf_filter_products_by_url=function(b){berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,b)?location.href=b:(braapf_change_url_history_api(b,{replace:the_ajax_script.seo_friendly_urls}),braapf_ajax_load_from_url(b,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},b,"default")))},braapf_update_data_from_current=function(){braapf_grab_all();braapf_compact_filters()},braapf_update_url_history_api_from_current=function(){the_ajax_script.seo_friendly_urls&&(url_filtered=braapf_get_url_with_filters_selected(),history.replaceState(history.state,"BeRocket Rules",url_filtered))},braapf_grab_all=function(b){"undefined"==typeof b&&(b=!1);var c=berocket_apply_filters("before_grab_all_filters",[],b);if(b===!1)var d=a(".bapf_sfilter");else var d=a(b).find(".bapf_sfilter");return d.each(function(){var a=braapf_grab_single(this,c);a!==!1&&c.push(a)}),c=berocket_apply_filters("grab_all_filters",c,b),b===!1&&(braapf_selected_filters=c),c},braapf_grab_single=function(b,c,d){"undefined"==typeof d&&(d=!1),b=a(b);var e=!1,f=!1,g=b.data("taxonomy");if("undefined"==typeof g||!g)return berocket_apply_filters("grab_single_filter_taxonomy_undefined",e,b,c);if(a.each(c,function(a,b){b.taxonomy==g&&(f=!0)}),!berocket_apply_filters("grab_single_filter_exist",f,b,c)){if(e=berocket_apply_filters("grab_single_filter",e,b,c),e!==!1)return e;var h=b.data("op"),i=b.data("name");"undefined"==typeof i&&(i="");var j=braapf_glue_by_operator(h),k=[],l=[];if(d)var m=b;else var m=a(".bapf_sfilter[data-taxonomy="+g+"]");m.find("input:checked:not(:disabled)").each(function(b,c){l.indexOf(a(this).val())==-1&&(k.push({value:a(this).val(),html:a(this).data("name")}),l.push(a(this).val()))}),e={name:i,taxonomy:g,values:k,glue:j,operator:h}}return berocket_apply_filters("grab_single_filter_default",e,b,c)},braapf_glue_by_operator=function(a){"string"!=typeof a&&(a="");var b="-";return"and"==a.toLowerCase()&&(b="+"),berocket_apply_filters("glue_by_operator",b,a)},braapf_compact_filters=function(b){"undefined"==typeof b&&(b=braapf_selected_filters);var c=[];return a.each(b,function(b,d){var e="";"undefined"!=typeof d.customValuesLine?e=d.customValuesLine:a.each(d.values,function(a,b){e.length&&(e+=d.glue),e+=b.value}),e.length&&c.push(berocket_apply_filters("compat_filters_result_single",{taxonomy:d.taxonomy,values:e},d))}),berocket_apply_filters("compat_filters_result",c,b)},braapf_compat_filters_to_string=function(b,c,d){var e="";return a.each(b,function(a,f){e.length&&(e+=d);var g=c;g=g.replace("%t%",f.taxonomy),g=g.replace("%v%",f.values),e+=berocket_apply_filters("compat_filters_to_string_single",g,f,b,c,d)}),berocket_apply_filters("compat_filters_to_string",e,b,c,d)},braapf_get_current_url_data=function(b){if("undefined"==typeof b)var c=location.href.split("#")[0].split("?")[0],d=location.search.substring(1);else{var c=b.split("#")[0].split("?")[0];if(b.split("#")[0].split("?").length>1)var d=b.split("#")[0].split("?")[1];else var d=""}var e=[],f=1,g=c.match(/\/page\/(\d+)/);return g&&"string"==typeof g[1]&&(f=parseInt(g[1]),c=c.replace(/\/page\/(\d+)/,"")),d=d.split("&"),a.each(d,function(a,b){b.length&&(d[a]=b.split("="),"paged"==d[a][0]?f=parseInt(d[a][1]):e.push({name:d[a][0],value:d[a][1]}))}),berocket_apply_filters("get_current_url_data",{baselink:c,queryargs:e,filter:"",page:f})},braapf_remove_pages_from_url_data=function(b){if(b.page=1,Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"product-page"!=b.name&&c.push(b)}),b.queryargs=c}return b},braapf_apply_additional_filter_data=function(b,c){return"undefined"==typeof c&&(c=braapf_selected_filters),a.each(c,function(a,c){b=berocket_apply_filters("apply_additional_filter_data",b,c)}),b},braapf_build_url_from_urldata=function(b,c){"undefined"==typeof c&&(c=braapf_build_url_parameters_default());var d=berocket_apply_filters("url_from_urldata_baselink",b.baselink,b,c),e="";return b.queryargs.length&&a.each(b.queryargs,function(a,b){e.length&&(e+="&"),b.name.length&&(e+=b.name+"="+b.value)}),b.page&&b.page>1&&(e.length&&(e+="&"),e+="paged="+b.page),e.length&&(e="?"+e),d=berocket_apply_filters("url_from_urldata_linkget",d+e,b,c,d,e)},braapf_build_url_parameters_default=function(){return berocket_apply_filters("build_url_parameters_default",{})},braapf_replace_current_with_new=function(b,c,d){"undefined"==typeof d&&(d={}),args={replace:!1},jQuery.extend(args,d);var e=a("<div><div>"+b+"</div></div>"),f=e.find(c),g=a(c);0!=g.length&&(f.length!=g.length&&0!=f.length&&berocket_throw_error("error_notsame_block_qty",c,f.length,g.length),0==f.length?(g.html("").addClass("braapfNotReplaced"),g.hide()):(g.each(function(b,c){"undefined"!=typeof f[b]?args.replace?a(c).replaceWith(a(f[b])):a(c).html(a(f[b]).html()).removeClass("braapfNotReplaced"):a(c).html("").addClass("braapfNotReplaced")}),g.show()))},braapf_replace_products=function(b){var c=the_ajax_script.products_holder_id;a("<div><div>"+b+"</div></div>");a(".bapf_no_products").remove(),braapf_replace_current_with_new(b,c),a(".braapfNotReplaced").filter(c).length&&a(".braapfNotReplaced").filter(c).before(a(the_ajax_script.no_products))},braapf_replace_pagination=function(b){var c=the_ajax_script.pagination_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().after(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_result_count=function(b){var c=the_ajax_script.result_count_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_orderby=function(b){var c=the_ajax_script.ordering_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_each_filter=function(b){var c=a("<div><div>"+b+"</div></div>");a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).html(c.find(".berocket_single_filter_widget_"+b).last().html()),c.find(".berocket_single_filter_widget_"+b).is(".bapf_mt_none")?a(".berocket_single_filter_widget_"+b).addClass("bapf_mt_none"):a(".berocket_single_filter_widget_"+b).removeClass("bapf_mt_none")})},braapf_change_url_history_api=function(a,b){if("undefined"!=typeof b&&b.replace){var c={BeRocket:"Rules"};history.replaceState(c,""),history.pushState(c,"",a),history.pathname=a}},berocket_apply_filters("load_products_ajax_on_popstate",!0)&&(window.onpopstate=function(b){if(null!=b.state&&"Rules"==b.state.BeRocket){var c=location.href;berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,c)?location.href=c:braapf_ajax_load_from_url(c,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_data_from_current]},c,"default"))}}),braapf_ajax_load_from_url=function(a,b,c,d){"undefined"==typeof d&&(d="default"),"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={done:[],fail:[],always:[]}),"undefined"!=typeof c.done&&Array.isArray(c.done)||(c.done=[]),"undefined"!=typeof c.fail&&Array.isArray(c.fail)||(c.fail=[]),"undefined"!=typeof c.always&&Array.isArray(c.always)||(c.always=[]),a=berocket_apply_filters("ajax_load_from_url_url",a,b,c,d),b=berocket_apply_filters("ajax_load_from_url_data",b,a,c,d),c=berocket_apply_filters("ajax_load_from_url_callback",c,a,b,d),braapf_ajax_load_from_url_request(a,b,c,d)},braapf_ajax_load_from_url_request=function(b,c,d,e){a(document).trigger("berocket_ajax_filtering_start"),"object"==typeof braapf_ajax_request&&"undefined"!=typeof braapf_ajax_request.abort&&braapf_ajax_request.abort(),braapf_ajax_request=a.ajax({method:"GET",url:b,data:c,beforeSend:function(a){a=berocket_apply_filters("ajax_load_from_url_beforeSend",a,b,c,d,e)}}).done(function(f,g,h){a(document).trigger("berocket_ajax_filtering_on_update"),f=berocket_apply_filters("ajax_load_from_url_done",f,b,c,d,e),a.each(d.done,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_done_after",f,b,c,d,e),a(document).trigger("berocket_ajax_products_loaded")}).fail(function(f,g,h){if("abort"==g)return!1;if(a(document).trigger("berocket_ajax_products_not_loaded"),f=berocket_apply_filters("ajax_load_from_url_fail",f,b,c,d,e),a.each(d.fail,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_fail_after",f,b,c,d,e),"default"==e){var i=jQuery.param(c);i&&(b=b.split("?").length>1?b+"&"+i:b+"?"+i),location.href=b}}).always(function(f,g,h){f=berocket_apply_filters("ajax_load_from_url_always",f,b,c,d,e),a.each(d.always,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_always_after",f,b,c,d,e),a(document).trigger("berocket_ajax_filtering_end")})},braapf_init_load=function(){var b=berocket_apply_filters("filter_mobile_width",767),c=berocket_apply_filters("filter_tablet_width",1024);a(window).width()<=b&&a(".bapf_sngl_hd_mobile").remove(),a(window).width()>b&&a(window).width()<=c&&a(".bapf_sngl_hd_tablet").remove(),a(window).width()>c&&a(".bapf_sngl_hd_desktop").remove(),a(".bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)").each(function(){a(this).css("max-height",a(this).data("mcs-h")).mCustomScrollbar({scrollInertia:300}).addClass("bapf_mcs_ready")}),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");berocket_apply_filters("remove_same_filters_to_prevent_errors",a(".berocket_single_filter_widget_"+b).length>1,a(this),b)&&a(".berocket_single_filter_widget_"+b).not(a(".berocket_single_filter_widget_"+b).first()).remove()}),a("body").on("click",".bapf_desci",function(a){a.stopPropagation()}),a("body").on("hover",".bapf_desci",function(a){a.stopPropagation()}),berocket_do_action("braapf_init",braapf_selected_filters),a(document).trigger("berocket_filters_first_load")},braapf_update_page_on_error=function(){berocket_apply_filters("update_page_on_error",!0)&&location.reload()},braapf_selected_filters_area_set=function(){if("undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0){var b="";a.each(braapf_filtered_filters,function(c,d){if(d.values.length>0){var e='<div class="bapf_sfa_taxonomy"><span>'+d.name+"</span>";e+="<ul>";var f="";a.each(d.values,function(a,b){f+=berocket_apply_filters("default_selected_filters_area_single",'<li><a href="#unselect_'+b.value+'" class="braapf_unselect" data-taxonomy="'+d.taxonomy+'" data-value="'+b.value+'"><i class="fa fa-times"></i>'+b.html+"</a></li>",b)}),e+=f,e+="</ul></div>",b+=berocket_apply_filters("default_selected_filters_area_single_taxonomy",e,d,f)}}),b?(a(".bapf_sfa_mt_hide").show().parent().removeClass("bapf_mt_none"),b=berocket_apply_filters("default_selected_filters_area_full_exist",'<div class="berocket_aapf_widget_selected_filter">'+b+'<ul class="bapf_sfa_unall"><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+"</a></li></ul>",b,braapf_filtered_filters)):(b=berocket_apply_filters("default_selected_filters_area_full_notexist",the_ajax_script.translate.nothing_selected,b,braapf_filtered_filters),a(".bapf_sfa_mt_hide").hide().parent().addClass("bapf_mt_none")),a(".berocket_aapf_widget_selected_area").html(b)}},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect",function(b){b.preventDefault(),a(".bapf_sfilter[data-taxonomy="+a(this).data("taxonomy")+"]").trigger("braapf_unselect",a(this).data()),berocket_do_action("update_products","reset_single",a(this))}),braapf_unselect_all=function(){braapf_grab_all(),"undefined"!=typeof braapf_selected_filters&&braapf_selected_filters.length>0&&a.each(braapf_selected_filters,function(b,c){c.values.length>0&&a(".bapf_sfilter[data-taxonomy="+c.taxonomy+"]").trigger("braapf_unselect_all",c)})},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect_all",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),berocket_add_filter("braapf_init",braapf_grab_all_init,1e3),berocket_add_filter("braapf_init",braapf_selected_filters_area_set_init,1100),berocket_add_filter("braapf_init_filtered_set",braapf_selected_filters_area_set_init,1100),braapf_reload_page_for_products_error=function(a,b){return b==the_ajax_script.products_holder_id&&braapf_update_page_on_error(),a},berocket_add_filter("ajax_load_from_url_beforeSend",c),berocket_add_filter("update_products",braapf_update_products),berocket_add_filter("error_notsame_block_qty",braapf_reload_page_for_products_error),bapf_universal_theme_compatibility=function(b){if(berocket_apply_filters("universal_theme_compatibility",!0)){a(window).trigger("resize");try{berocket_apply_filters("uncode_theme_compatibility","object"==typeof UNCODE&&"function"==typeof UNCODE.init)&&UNCODE.init()}catch(a){berocket_throw_error("uncode_theme_compatibility",a)}try{berocket_apply_filters("flatsome_theme_compatibility","object"==typeof Flatsome&&"function"==typeof Flatsome.attach&&jQuery(the_ajax_script.products_holder_id).length)&&Flatsome.attach(jQuery(the_ajax_script.products_holder_id))}catch(a){berocket_throw_error("flatsome_theme_compatibility",a)}try{berocket_apply_filters("woodmart_theme_compatibility","object"==typeof woodmartThemeModule&&"function"==typeof woodmartThemeModule.init)&&(woodmartThemeModule.wooInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.productsLoadMore())}catch(a){berocket_throw_error("woodmart_theme_compatibility",a)}try{berocket_apply_filters("divi_theme_compatibility","function"==typeof et_reinit_waypoint_modules)&&et_reinit_waypoint_modules()}catch(a){berocket_throw_error("divi_theme_compatibility",a)}try{berocket_apply_filters("rey_theme_compatibility","object"==typeof jQuery.reyTheme&&"function"==typeof jQuery.reyTheme.init)&&jQuery.reyTheme.init()}catch(a){berocket_throw_error("rey_theme_compatibility",a)}try{berocket_apply_filters("layzyloadimage_script_compatibility","function"==typeof layzyLoadImage)&&layzyLoadImage()}catch(a){berocket_throw_error("layzyloadimage_script_compatibility",a)}try{berocket_apply_filters("jetpacklazyimages_script_compatibility","function"==typeof jetpackLazyImagesModule)&&jetpackLazyImagesModule()}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{jQuery("img.jetpack-lazy-image").each(function(){jQuery(this).removeClass("jetpack-lazy-image").attr("src",jQuery(this).data("lazy-src")),jQuery(this).removeClass("jetpack-lazy-image").attr("srcset","")})}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{berocket_apply_filters("swift_script_compatibility","object"==typeof SWIFT&&"object"==typeof SWIFT.woocommerce&&"function"==typeof SWIFT.woocommerce.init)&&SWIFT.woocommerce.init()}catch(a){berocket_throw_error("swift_script_compatibility",a)}try{"undefined"!=typeof baapfGet_wprocketInstance&&baapfGet_wprocketInstance.update()}catch(a){berocket_throw_error("wprocket_script_compatibility",a)}try{jQuery(document).trigger("facetwp-loaded")}catch(a){berocket_throw_error("facetwp_script_compatibility",a)}try{berocket_apply_filters("etTheme_compatibility","object"==typeof etTheme&&"function"==typeof etTheme.global_image_lazy)&&etTheme.global_image_lazy()}catch(a){berocket_throw_error("etTheme_compatibility",a)}}return b},berocket_add_filter("ajax_load_from_url_always_after",bapf_universal_theme_compatibility,2500),a(document).ready(function(){berocket_apply_filters("remove_shortcode_fix_filters",a(".berocket_wc_shortcode_fix").length)&&(braapf_replace_each_filter(a(".berocket_wc_shortcode_fix").html()),a(".berocket_wc_shortcode_fix").html("")),braapf_init_load(),braapf_filtered_filters_set(),a(document).trigger("berocket_filters_document_ready")}),braapf_disable_ajax_loading=function(a){return!0},the_ajax_script.disable_ajax_loading&&berocket_add_filter("page_has_products_holder",braapf_disable_ajax_loading),braapf_close_tippy=function(){try{a(".tippy-box").length&&a(".tippy-box").each(function(){"undefined"!=typeof a(this).parent()[0]._tippy&&a(this).parent()[0]._tippy.hide()})}catch(a){}},berocket_add_filter("update_products",braapf_close_tippy)}(jQuery);var braapf_get_current_filters,braapf_filters_url_decode,braapf_scroll_shop_to_top,braapf_set_filters_to_link,braapf_convert_ckbox_to_radio,braapf_hierarhical_save,braapf_hierarhical_set,braapf_collapse_status_save,braapf_collapse_status_set,braapf_show_hide_values_save,braapf_show_hide_values_set,berocket_custom_sidebar_close,berocket_custom_sidebar_open;!function(a){function b(){jQuery(".berocket_product_table_compat .dataTables_length select").length&&jQuery(".berocket_product_table_compat .wc-product-table").dataTable()._fnSaveState();var a=jQuery(".berocket_product_table_compat .wc-product-table").attr("id");if("undefined"!=typeof window["config_"+a]&&window["config_"+a].serverSide){jQuery(".berocket_product_table_compat .wc-product-table").DataTable().destroy();var b=jQuery(".berocket_product_table_compat").html();jQuery(".berocket_product_table_compat").html(""),jQuery(".berocket_product_table_compat").html(b),jQuery(".berocket_product_table_compat .blockUI.blockOverlay").remove(),jQuery(".berocket_product_table_compat .wc-product-table").productTable()}}braapf_get_current_filters=function(b){if(b.queryargs.length){var c=[];a.each(b.queryargs,function(a,d){d.name==the_ajax_script.url_variable||decodeURI(d.name)==the_ajax_script.url_variable?b.filter=d.value:c.push(d)}),b.queryargs=c}return b},braapf_set_filters_to_link=function(a,b,c,d,e){return"string"==typeof b.filter&&b.filter.length&&(a+=e.length?"&":"?",a+=the_ajax_script.url_variable+"="+b.filter),a},braapf_convert_ckbox_to_radio=function(b,c,d,e){var f=(a(b),a(b).closest(".bapf_sfilter.bapf_ckbox"));f.is(".bapf_asradio")&&f.find("input[type=checkbox]:checked:not(:disabled)").each(function(){var b=a(this).val();b!=d&&braapf_checkbox_same(c,b,!1)})},berocket_add_filter("input_ckbox_changed",braapf_convert_ckbox_to_radio),a(document).on("click",".bapf_ochild, .bapf_cchild",function(b){b.preventDefault(),b.stopPropagation(),a(this).is(".bapf_ochild")?a(this).trigger("bapf_ochild"):a(this).trigger("bapf_cchild")}),a(document).on("bapf_ochild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_open_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().removeClass("bapf_ochild").removeClass("fa-plus").addClass("bapf_cchild").addClass("fa-minus"),a(this).find("ul").first().show())}),a(document).on("bapf_cchild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_close_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().addClass("bapf_ochild").addClass("fa-plus").removeClass("bapf_cchild").removeClass("fa-minus"),a(this).find("ul").first().hide())});var c=[];braapf_hierarhical_save=function(b){return c=[],a(".bapf_cchild").each(function(){c.push(a(this).parent().children("input[type=checkbox]").attr("id"))}),b},braapf_hierarhical_set=function(b){return a.each(c,function(b,c){a("#"+c).trigger("bapf_ochild")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_hierarhical_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_hierarhical_set,1e3),a(document).on("click",".bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl",function(b){b.preventDefault,a(this).closest(".bapf_ocolaps, .bapf_ccolaps").is(".bapf_ocolaps")?a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ocolaps"):a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ccolaps")}),a(document).on("bapf_ocolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).removeClass("bapf_ocolaps").addClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_open_apply",!0,a(this))&&(a(this).find(".bapf_body").first().show(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").removeClass("fa-chevron-down").addClass("fa-chevron-up"))}),a(document).on("bapf_ccolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).addClass("bapf_ocolaps").removeClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_close_apply",!0,a(this))&&(a(this).find(".bapf_body").first().hide(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").addClass("fa-chevron-down").removeClass("fa-chevron-up"))});var d={open:[],close:[]};braapf_collapse_status_save=function(b){return d={open:[],close:[]},a(".bapf_ocolaps, .bapf_ccolaps").each(function(){a(this).is(".bapf_ocolaps")?d.open.push(a(this).attr("id")):d.close.push(a(this).attr("id"))}),b},braapf_collapse_status_set=function(b){return a.each(d.open,function(b,c){a("#"+c).trigger("bapf_ccolaps")}),a.each(d.close,function(b,c){a("#"+c).trigger("bapf_ocolaps")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_collapse_status_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_collapse_status_set,1e3),a(document).on("click",".bapf_show_hide",function(){a(this).closest(".bapf_sfilter").toggleClass("bapf_fhide"),a(this).closest(".bapf_sfilter").is(".bapf_fhide")?a(this).text(a(this).data("show")):a(this).text(a(this).data("hide"))});var e={open:[],close:[]};braapf_show_hide_values_save=function(b){return e={open:[],close:[]},a(".bapf_sfilter").each(function(){a(this).is(".bapf_fhide")?e.close.push(a(this).attr("id")):e.open.push(a(this).attr("id"))}),b},braapf_show_hide_values_set=function(b){return a.each(e.open,function(b,c){a("#"+c).removeClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("hide"))}),a.each(e.close,function(b,c){a("#"+c).addClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("show"))}),b},berocket_add_filter("ajax_load_from_url_done",braapf_show_hide_values_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_show_hide_values_set,1e3),braapf_scroll_shop_to_top=function(b,c,d,e,f){var g=berocket_apply_filters("filter_mobile_width",767);if(berocket_apply_filters("scroll_shop_to_top","default"==f&&(1==the_ajax_script.scroll_shop_top||2==the_ajax_script.scroll_shop_top&&a(window).width()<g||3==the_ajax_script.scroll_shop_top&&a(window).width()>=g))){var h=0;a(the_ajax_script.products_holder_id).length?(h=a(the_ajax_script.products_holder_id).offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)):a(".bapf_no_products").length&&(h=a(".bapf_no_products").offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)),a("html, body").animate({scrollTop:h},"slow")}return b},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_scroll_shop_to_top),a(document).on("mousedown",".wc-product-table-reset a",function(){a(this).remove(),br_reset_all_filters()}),a(document).on("click",".berocket_element_above_products_is_hide_toggle",function(b){b.preventDefault(),a(this).toggleClass("active").next().slideToggle(200,"linear");var c="inactive";a(this).is(".active")&&(c="active"),a(document).trigger("berocket_element_above_products_"+c)}),berocket_custom_sidebar_close=function(){a(".berocket_ajax_filters_sidebar_toggle").removeClass("active"),a("#berocket-ajax-filters-sidebar").removeClass("active"),a("body").removeClass("berocket_ajax_filters_sidebar_active")},berocket_custom_sidebar_open=function(){a(".berocket_ajax_filters_sidebar_toggle").addClass("active"),
2
+ a("#berocket-ajax-filters-sidebar").addClass("active"),a("body").addClass("berocket_ajax_filters_sidebar_active")},a(document).on("berocket_custom_sidebar_close",berocket_custom_sidebar_close),a(document).on("berocket_custom_sidebar_open",berocket_custom_sidebar_open),a(document).on("click",".berocket_ajax_filters_sidebar_toggle",function(b){b.preventDefault(),a(this).is(".active")&&a("#berocket-ajax-filters-sidebar").is(".active")?berocket_custom_sidebar_close():berocket_custom_sidebar_open()}),a(document).on("click","#berocket-ajax-filters-sidebar-shadow, #berocket-ajax-filters-sidebar-close",function(a){a.preventDefault(),berocket_custom_sidebar_close()}),a(document).on("berocket_ajax_filtering_start",function(){jQuery(".berocket_product_table_compat").length&&b()}),braapf_filters_url_decode=function(a){return the_ajax_script.seo_uri_decode&&(a=encodeURIComponent(a),the_ajax_script.nice_urls&&(a=a.replace(/%2F/g,"/"))),a},jQuery(document).on("elementor/popup/show",function(){try{braapf_init_load()}catch(a){berocket_throw_error("wprocketInstance_get",a)}})}(jQuery),berocket_add_filter("get_current_url_data",braapf_get_current_filters),berocket_add_filter("compat_filters_to_string",braapf_filters_url_decode,900),berocket_add_filter("url_from_urldata_linkget",braapf_set_filters_to_link);var braapf_child_parent_grab_single,braapf_child_parent_fix_selected,braapf_child_parent_load_with_update_button,braapf_add_loader_element,braapf_remove_loader_element,braapf_elementor_sticky_fix,baapfGet_wprocketInstance;!function(a){braapf_child_parent_grab_single=function(b,c,d){var e=c.data("child");if("undefined"!=typeof e&&e>0&&"object"==typeof b&&"undefined"!=typeof b.values&&Array.isArray(b.values)&&b.values.length>0){e++;var f=c.data("taxonomy"),g=a(".bapf_sfilter.bapf_child_"+e+"[data-taxonomy="+f+"]");if(g.length){var h=braapf_grab_single(g,[],!0);"object"==typeof h&&"undefined"!=typeof h.values&&Array.isArray(h.values)&&h.values.length>0&&(b=h)}}return b},braapf_child_parent_fix_selected=function(b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child"),f=d.data("taxonomy");if("undefined"!=typeof e&&e>0)for(i=e+1;a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").length;i++)a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").trigger("braapf_unselect",!1)}}return b},braapf_child_parent_load_with_update_button=function(a,b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child");d.data("taxonomy");"undefined"!=typeof e&&e>0&&(a=!0)}}return a},berocket_add_filter("grab_single_filter_default",braapf_child_parent_grab_single,9e6),berocket_add_filter("before_update_products_context",braapf_child_parent_fix_selected),berocket_add_filter("apply_filters_to_page_partial",braapf_child_parent_load_with_update_button);var b;braapf_add_loader_element=function(c,d,e,f,g){return"default"==g&&("undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),b=a(the_ajax_script.load_image),a("body").append(b)),c},braapf_remove_loader_element=function(a){return"undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),a},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_add_loader_element),berocket_add_filter("ajax_load_from_url_always_after",braapf_remove_loader_element),a(document).on("click",".bapf_sfilter.bapf_ckbox .bapf_body li label a",function(b){b.preventDefault(),a(this).parent().trigger("click")}),jQuery(".elementor-widget").length&&jQuery(window).on("scroll",function(){jQuery(".elementor-sticky__spacer .bapf_sfilter").remove()});try{window.addEventListener("LazyLoad::Initialized",function(a){baapfGet_wprocketInstance=a.detail.instance})}catch(a){berocket_throw_error("wprocketInstance_get",a)}a(document).on("change","form.cart input.qty",function(){try{a(this.form).find("[data-quantity]").attr("data-quantity",this.value)}catch(a){berocket_throw_error("wc_quantity_change",a)}})}(jQuery);var braapf_init_ion_slidr,braapf_ion_slidr_same,braapf_jqrui_slidr_ion_value_wc_price,braapf_jqrui_slidr_ion_value_arr_attr,braapf_init_ion_slidr_for_parent,braapf_grab_single_ion,braapf_jqrui_slidr_ion_values_link_arr_attr;!function(a){braapf_init_ion_slidr=function(){braapf_init_ion_slidr_for_parent(a(document))},braapf_init_ion_slidr_for_parent=function(b){b.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_all .bapf_slidr_main"),c=function(a){if(!b.is(".bapf_ion_blocked")){b.addClass("bapf_ion_blocked");var c=b.closest(".bapf_sfilter").data("taxonomy");braapf_ion_slidr_same(c,a);var d={element:"#"+b.closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",d,b),berocket_do_action("update_products","filter",b),b.removeClass("bapf_ion_blocked")}},d=berocket_apply_filters("jqrui_data_slidr_ion",{type:"double",from:b.data("start"),to:b.data("end"),grid:!1,force_edges:!0,onFinish:c,onUpdate:c,prettify:function(a){return a=berocket_apply_filters("jqrui_slidr_ion_"+b.data("display"),a,b)}},b);b.ionRangeSlider(d),a(this).addClass("bapf_slidr_ready")})},braapf_ion_slidr_same=function(b,c){a(".bapf_slidr_ion.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_ion_blocked");var d=b.data("ionRangeSlider");d.update({from:c.from,to:c.to}),b.removeClass("bapf_ion_blocked")})},braapf_jqrui_slidr_ion_value_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a=berocket_format_number(parseFloat(a),c)},braapf_jqrui_slidr_ion_value_arr_attr=function(a,b){var c=b.data("attr");return a=c[a].n},braapf_grab_single_ion=function(a,b){if(b.is(".bapf_slidr_ion.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main").data("ionRangeSlider"),d=b.find(".bapf_slidr_main"),e=[c.options.from,c.options.to],f=[berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.from,d),berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.to,d)],g=d.data("prefix");"undefined"==typeof g&&(g="");var h=d.data("postfix");if("undefined"==typeof h&&(h=""),f[0]=g+f[0]+h,f[1]=g+f[1]+h,e[0]!=d.data("min")||e[1]!=d.data("max")){var i={value:e[0]+"_"+e[1],html:f[0]+" - "+f[1]};i=berocket_apply_filters("jqrui_slidr_ion_link_"+d.data("display"),i,e,f,d,a),a.values=[i]}}return a},braapf_jqrui_slidr_ion_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_ion",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("ionRangeSlider");d.addClass("bapf_ion_blocked"),e.update({from:e.options.min,to:e.options.max}),d.removeClass("bapf_ion_blocked")}),berocket_add_filter("braapf_init",braapf_init_ion_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_ion_slidr_for_parent),berocket_add_filter("grab_single_filter_default",braapf_grab_single_ion),berocket_add_filter("jqrui_slidr_ion_link_arr_attr",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_wc_price",braapf_jqrui_slidr_ion_value_wc_price),berocket_add_filter("jqrui_slidr_ion_arr_attr",braapf_jqrui_slidr_ion_value_arr_attr)}(jQuery);var braapf_grab_single_select;!function(a){a(document).on("change",".bapf_slct .bapf_body select",function(){var b={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",b,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_grab_single_select=function(b,c){if(c.is(".bapf_slct")&&0!=b){var d=a('.bapf_slct[data-taxonomy="'+b.taxonomy+'"] .bapf_body select:not(:disabled)'),e=[];d.find("option:selected:not(:disabled)").each(function(){var c=a(this).val();c&&e.indexOf(c)===-1&&(e.push(c),b.values.push({value:c,html:a(this).data("name")}))})}return b},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slct",function(b,c){a(this).find(".bapf_body select:not(:disabled) option:selected:not(:disabled)").each(function(){"undefined"!=typeof c&&"undefined"!=typeof c.value&&c.value!=a(this).val()||a(this).prop("selected",!1)})}),berocket_add_filter("grab_single_filter_default",braapf_grab_single_select)}(jQuery);var bapf_select2_init,bapf_select2_init_for_parent,bapf_select2_disable_for_parent;jQuery(document).ready(function(){bapf_select2_init=function(){bapf_select2_init_for_parent(jQuery(document))},bapf_select2_init_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){if(!jQuery(this).data("select2")&&!jQuery(this).is(".select2-hidden-accessible")){var a={width:"100%",theme:"default"};jQuery(this).prop("multiple")&&(a.placeholder=jQuery(this).data("placeholder")),jQuery(this).parents("#berocket-ajax-filters-sidebar").length&&(0==jQuery("#bapf-select2-high-zindex").length&&jQuery("body").append('<div id="bapf-select2-high-zindex"></div>'),a.dropdownParent=jQuery("#bapf-select2-high-zindex")),a=berocket_apply_filters("jqrui_data_select2",a,jQuery(this)),jQuery(this).select2(a)}})},bapf_select2_disable_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){jQuery(this).data("select2")&&jQuery(this).select2("destroy")})},jQuery(document).on("berocket_ajax_filtering_on_update",function(){bapf_select2_disable_for_parent(jQuery(document))}),bapf_select2_init(),berocket_add_filter("braapf_init",bapf_select2_init,2e3),berocket_add_filter("braapf_init_for_parent",bapf_select2_init_for_parent)});var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price,braapf_init_jqrui_slidr_for_parent,braapf_grab_single_jqrui,braapf_jqrui_slidr_values_arr_attr,braapf_jqrui_slidr_values_link_arr_attr;!function(a){function b(b,c){var d=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main"),e=d.slider("values");a(b).val(e[c]),a(b).data("val",e[c])}function c(b,c,d){var e=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main");if("focusout"==d){if(a(b).val()==a(b).data("val")){var f=e.slider("values");e.trigger("braapf_change_jqrui_slidr",[f])}}else{var g=parseInt(a(b).val());e.slider("values",c,g)}}a.each([{position:0,className:"bapf_from"},{position:1,className:"bapf_to"}],function(d,e){a(document).on("focusin",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(){b(this,e.position)}),a(document).on("change focusout",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(a){c(this,e.position,a.type)}),a(document).on("change",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" select",function(a){c(this,e.position,a.type)})}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").text(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").text(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").val(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").val(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=d.data("attr");if(d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length||d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length){var e=d.data("attr"),f=[],g=[],h=!1,i=!1;a.each(e,function(a,b){a==c[0]&&(i=!0),h||f.push({v:b.v,n:b.n,ov:a}),i&&g.push({v:b.v,n:b.n,ov:a}),a==c[1]&&(h=!0)})}d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_from select option").remove(),a.each(f,function(b,e){var f="";e.ov==c[0]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_from select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))})),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_to select option").remove(),a.each(g,function(b,e){var f="";e.ov==c[1]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))}))}),braapf_init_jqrui_slidr=function(){braapf_init_jqrui_slidr_for_parent(a(document))},braapf_init_jqrui_slidr_for_parent=function(b){b.find(".bapf_slidr_jqrui:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_main"),c=berocket_apply_filters("jqrui_data_slidr_jqrui",{range:!0,min:b.data("min"),max:b.data("max"),values:[b.data("start"),b.data("end")],step:b.data("step"),create:function(b,c){var d=a(this).slider("values");a(this).trigger("braapf_change_jqrui_slidr",[d])},slide:function(b,c){a(this).trigger("braapf_change_jqrui_slidr",[c.values])},change:function(b,c){var d=a(this).slider("values");if(a(this).trigger("braapf_change_jqrui_slidr",[d]),!a(this).is(".bapf_jqrui_blocked")){var d=a(this).slider("values"),e=a(this).parents(".bapf_sfilter").data("taxonomy");braapf_jqrui_slidr_same(e,d);var f={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",f,a(this)),berocket_do_action("update_products","filter",a(this))}}},b);b.slider(c),a(this).addClass("bapf_slidr_ready")})},braapf_jqrui_slidr_same=function(b,c){a(".bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_jqrui_blocked"),b.slider("values",c),b.removeClass("bapf_jqrui_blocked")})},braapf_jqrui_slidr_values_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a[0]=berocket_format_number(a[0],c),a[1]=berocket_format_number(a[1],c),a},braapf_grab_single_jqrui=function(a,b){if(b.is(".bapf_slidr_jqrui.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main"),d=c.slider("values"),e=c.slider("values"),f="";b.find(".bapf_tbprice").length&&(f=b.find(".bapf_tbprice").first().text());var g="";if(b.find(".bapf_taprice").length&&(g=b.find(".bapf_taprice").first().text()),d[0]!=c.data("min")||d[1]!=c.data("max")){e=berocket_apply_filters("jqrui_slidr_"+c.data("display"),e,c),e[0]=f+e[0]+g,e[1]=f+e[1]+g;var h={value:d[0]+"_"+d[1],html:e[0]+" - "+e[1]};h=berocket_apply_filters("jqrui_slidr_link_"+c.data("display"),h,d,e,c,a),a.values=[h]}}return a},braapf_jqrui_slidr_values_arr_attr=function(a,b){var c=b.data("attr");return Array.isArray(a)&&2==a.length?(a[0]=c[a[0]].n,a[1]=c[a[1]].n):(a=["",""],a[0]=c[0].n,a[1]=c[c.length-1].n),a},braapf_jqrui_slidr_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_jqrui",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("min"),f=d.data("max");d.addClass("bapf_jqrui_blocked"),d.slider("values",[e,f]),d.removeClass("bapf_jqrui_blocked")}),berocket_add_filter("jqrui_slidr_wc_price",braapf_jqrui_slidr_values_wc_price),berocket_add_filter("jqrui_slidr_arr_attr",braapf_jqrui_slidr_values_arr_attr),berocket_add_filter("jqrui_slidr_link_arr_attr",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("grab_single_filter_default",braapf_grab_single_jqrui),berocket_add_filter("braapf_init",braapf_init_jqrui_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_jqrui_slidr_for_parent)}(jQuery);
berocket/assets/css/admin.css CHANGED
@@ -392,6 +392,12 @@
392
  max-height: 60px;
393
  vertical-align: middle;
394
  }
 
 
 
 
 
 
395
 
396
  /* FONT AWESOME SELECTOR */
397
 
@@ -1505,6 +1511,9 @@
1505
  .br_cond.br_cond_category > div ul {
1506
  margin: 0;
1507
  }
 
 
 
1508
  .br_cond.br_cond_sale select,
1509
  .br_cond.br_cond_bestsellers input,
1510
  .br_cond.br_cond_price input,
392
  max-height: 60px;
393
  vertical-align: middle;
394
  }
395
+ .br_framework_settings .button.berocket_upload_image,
396
+ .br_framework_settings .button.berocket_remove_image,
397
+ .br_framework_settings .button.berocket_select_fa {
398
+ margin-top: 10px!important;
399
+ margin-bottom: 0!important;
400
+ }
401
 
402
  /* FONT AWESOME SELECTOR */
403
 
1511
  .br_cond.br_cond_category > div ul {
1512
  margin: 0;
1513
  }
1514
+ .br_cond.br_cond_category > div ul ul {
1515
+ margin-left: 10px;
1516
+ }
1517
  .br_cond.br_cond_sale select,
1518
  .br_cond.br_cond_bestsellers input,
1519
  .br_cond.br_cond_price input,
berocket/framework.php CHANGED
@@ -35,7 +35,7 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
35
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
36
  load_plugin_textdomain('BeRocket_domain', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
37
  class BeRocket_Framework {
38
- public static $framework_version = '2.6.0.4';
39
  public static $settings_name = '';
40
  public $addons;
41
  public $libraries;
35
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
36
  load_plugin_textdomain('BeRocket_domain', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
37
  class BeRocket_Framework {
38
+ public static $framework_version = '2.6.0.5';
39
  public static $settings_name = '';
40
  public $addons;
41
  public $libraries;
berocket/framework_version.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- $framework_version_current = '2.6.0.4';
3
  if( version_compare($framework_version_current, $framework_version, '>') ) {
4
  $framework_version = $framework_version_current;
5
  $framework_dir = __DIR__;
1
  <?php
2
+ $framework_version_current = '2.6.0.5';
3
  if( version_compare($framework_version_current, $framework_version, '>') ) {
4
  $framework_version = $framework_version_current;
5
  $framework_dir = __DIR__;
main.php CHANGED
@@ -3081,4 +3081,4 @@ jQuery(document).on('change', '.berocket_disable_ajax_loading', berocket_disable
3081
  }
3082
  }
3083
 
3084
- new BeRocket_AAPF;
3081
  }
3082
  }
3083
 
3084
+ new BeRocket_AAPF;
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://berocket.com/product/woocommerce-ajax-products-filter?utm_s
5
  Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
6
  Requires at least: 5.0
7
  Tested up to: 5.5
8
- Stable tag: 1.5.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -185,6 +185,11 @@ You can try this plugin's admin side [here](https://berocket.com/product/woocomm
185
 
186
  == Changelog ==
187
 
 
 
 
 
 
188
  = 1.5.2 =
189
  * Enhancement - Better compatibility with other plugins and themes
190
  * Enhancement - Possibility to translate some text in URL with WPML
5
  Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
6
  Requires at least: 5.0
7
  Tested up to: 5.5
8
+ Stable tag: 1.5.2.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
185
 
186
  == Changelog ==
187
 
188
+ = 1.5.2.1 =
189
+ * Fix - Issue with pagination
190
+ * Fix - Categories not displayed in conditions
191
+ * Fix - Error with Elementor Popup
192
+
193
  = 1.5.2 =
194
  * Enhancement - Better compatibility with other plugins and themes
195
  * Enhancement - Possibility to translate some text in URL with WPML
templates/filters/select.php CHANGED
@@ -39,7 +39,6 @@ $terms_content['element_any'] = array(
39
  'attributes' => array(
40
  'data-name' => '',
41
  'id' => $element_unique,
42
- 'type' => 'checkbox',
43
  'value' => ''
44
  ),
45
  'content' => array(
@@ -54,7 +53,6 @@ foreach( $terms as $i => $term ) {
54
  'attributes' => array(
55
  'data-name' => $term->name,
56
  'id' => $element_unique,
57
- 'type' => 'checkbox',
58
  'value' => $term->value
59
  ),
60
  'content' => array(
39
  'attributes' => array(
40
  'data-name' => '',
41
  'id' => $element_unique,
 
42
  'value' => ''
43
  ),
44
  'content' => array(
53
  'attributes' => array(
54
  'data-name' => $term->name,
55
  'id' => $element_unique,
 
56
  'value' => $term->value
57
  ),
58
  'content' => array(
woocommerce-filters.php CHANGED
@@ -3,14 +3,14 @@
3
  * Plugin Name: Advanced AJAX Product Filters for WooCommerce
4
  * Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
5
  * Description: Unlimited AJAX products filters to make your shop perfect
6
- * Version: 1.5.2
7
  * Author: BeRocket
8
  * Requires at least: 5.0
9
  * Author URI: https://berocket.com?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
10
  * Text Domain: BeRocket_AJAX_domain
11
  * Domain Path: /languages/
12
- * WC tested up to: 4.7
13
  */
14
- define( "BeRocket_AJAX_filters_version", '1.5.2' );
15
  define( "BeRocket_AJAX_filters_file", __FILE__ );
16
  include_once('main.php');
3
  * Plugin Name: Advanced AJAX Product Filters for WooCommerce
4
  * Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
5
  * Description: Unlimited AJAX products filters to make your shop perfect
6
+ * Version: 1.5.2.1
7
  * Author: BeRocket
8
  * Requires at least: 5.0
9
  * Author URI: https://berocket.com?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
10
  * Text Domain: BeRocket_AJAX_domain
11
  * Domain Path: /languages/
12
+ * WC tested up to: 4.8
13
  */
14
+ define( "BeRocket_AJAX_filters_version", '1.5.2.1' );
15
  define( "BeRocket_AJAX_filters_file", __FILE__ );
16
  include_once('main.php');