diff --git a/settings/templatetags/template_filters.py b/settings/templatetags/template_filters.py index db4bda7b..f01feb40 100644 --- a/settings/templatetags/template_filters.py +++ b/settings/templatetags/template_filters.py @@ -352,4 +352,12 @@ def join_lookup(value): @register.filter def strip(value): - return value.strip() \ No newline at end of file + return value.strip() + + +@register.filter +def str_to_int(value): + try: + return int(value) + except ValueError: + return value \ No newline at end of file diff --git a/static/client/js/main.js b/static/client/js/main.js index a3682942..365ce6f4 100644 --- a/static/client/js/main.js +++ b/static/client/js/main.js @@ -9,7 +9,8 @@ function mapInit() { var myLatlng = new google.maps.LatLng(lat, lng); var mapOptions = { zoom: 15, - center: myLatlng + center: myLatlng, + scrollwheel: false }; map = new google.maps.Map(canvas, mapOptions); diff --git a/static/client/js/vendor.js b/static/client/js/vendor.js index 28a1a90c..2abd2245 100644 --- a/static/client/js/vendor.js +++ b/static/client/js/vendor.js @@ -3688,7 +3688,8 @@ function mapInit() { var myLatlng = new google.maps.LatLng(lat, lng); var mapOptions = { zoom: 15, - center: myLatlng + center: myLatlng, + scrollwheel: false }; map = new google.maps.Map(canvas, mapOptions); diff --git a/static/client/js_min/vendor.min.js b/static/client/js_min/vendor.min.js index f72dca50..2903111b 100644 --- a/static/client/js_min/vendor.min.js +++ b/static/client/js_min/vendor.min.js @@ -1,4 +1,4 @@ -function mapInit(){var e=document.getElementById("map-canvas"),t=e.getAttribute("data-coords"),i=t.indexOf(","),n=parseFloat(t.substring(0,i)),a=parseFloat(t.substring(i+1,t.length)),o=new google.maps.LatLng(n,a),s={zoom:15,center:o};map=new google.maps.Map(e,s);new google.maps.Marker({position:o,map:map})}function addError(e,t){var i=$("#reg_form "+e),n=$("
").attr("class","pwf-msg").append($("
").attr("class","msg-error").append(t));i.parent().parent().append(n)}function placeInput(e){$("#id_country").val("159").select2({placeholder:"Ваша страна",width:e}),$("#id_city").select2({placeholder:"Ваш город",width:e,ajax:{url:"/city/get-city/",dataType:"json",quietMillis:200,data:function(e,t,i){var i=$("#id_country").val();return{term:e,page:t,country:i}},results:function(e){var t=[];return $.each(e,function(e,i){t.push({id:i.id,text:i.label})}),{results:t}}},initSelection:function(e,t){var i=$(e).val(),n=$(e).attr("data-init-text");t({id:i,text:n})}})}function set_filter_block_height(){var e=!1;$("#filter_form_wraper").find("ul").each(function(t,i){var n=$(this),a=n.parent("div");if(e=!1,n.find("li").each(function(t,i){$(i).index()>9&&($(i).css("display","none"),e=!0)}),e){var o=$("",{href:"#",text:"показать еще 10","class":"show_more_link"}),s=$("",{href:"#",text:"показать все","class":"show_all_link"}),r=$("
",{"class":"links_block"});r.append(o).append("
").append(s),a.append(r)}})}function build_sidebar(){var e=$("cl-item ").length,t=$("aside .mps-sect"),i=$("aside .s-news-list"),n=$("aside .sbnr"),a=$("aside .vk-widget"),o=$("aside .subscribe-sm"),s=$("aside hr");5>=e?(t.addClass("none"),i.addClass("none"),n.addClass("none"),a.addClass("none"),o.addClass("none"),s.addClass("none")):(t.removeClass("none"),i.removeClass("none"),n.removeClass("none"),a.removeClass("none"),o.removeClass("none"),s.removeClass("none"))}function build_filters_period(){var e=$("#filter_period_trigger"),t=$("#filter_form_wraper"),i=t.find("#id_month");e.insertAfter("#id_date_to").wrap($("
",{"class":"period_block"})),(t.find("input#id_date_from").val()||t.find("input#id_date_to").val())&&i.hide(),$("#filterPeriod").on("click",".modal-approve",function(e){if(e.preventDefault(),$('#filterPeriod input[name="from"]').val().length||$('#filterPeriod input[name="to"]').val().length){var i=$('#filterPeriod input[name="from"]').val(),n=$('#filterPeriod input[name="to"]').val();t.find("#id_date_from input").val(i),t.find("#id_date_to input").val(n),$.fancybox.close(),submit_search_form()}})}function submit_search_form(){var e=$(".filter_form"),t=e.serialize(),i=e.data("formurl"),n=e.data("resultsurl"),a=$("#wait-ajax");a.show(),$(".filters_overlay").show(),$("html, body").animate({scrollTop:$(".page-body").offset().top-50},500),$.getJSON(n,t,function(e){e.success&&($(".page-body").html(e.results),build_sidebar(),a.hide())}),$.getJSON(i,t,function(e){e.success&&($("#filter_form_wraper").html(e.form),set_filter_block_height(),build_filters_period())})}!function(){for(var e,t=function(){},i=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],n=i.length,a=window.console=window.console||{};n--;)e=i[n],a[e]||(a[e]=t)}(),!function(e){"undefined"==typeof e.fn.each2&&e.extend(e.fn,{each2:function(t){for(var i=e([0]),n=-1,a=this.length;++ni;i+=1)if(s(e,t[i]))return i;return-1}function o(){var t=e(N);t.appendTo("body");var i={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),i}function s(e,i){return e===i?!0:e===t||i===t?!1:null===e||null===i?!1:e.constructor===String?e+""==i+"":i.constructor===String?i+""==e+"":!1}function r(t,i){var n,a,o;if(null===t||t.length<1)return[];for(n=t.split(i),a=0,o=n.length;o>a;a+=1)n[a]=e.trim(n[a]);return n}function l(e){return e.outerWidth(!1)-e.width()}function c(i){var n="keyup-change-value";i.on("keydown",function(){e.data(i,n)===t&&e.data(i,n,i.val())}),i.on("keyup",function(){var a=e.data(i,n);a!==t&&i.val()!==a&&(e.removeData(i,n),i.trigger("keyup-change"))})}function d(i){i.on("mousemove",function(i){var n=H;(n===t||n.x!==i.pageX||n.y!==i.pageY)&&e(i.target).trigger("mousemove-filtered",i)})}function h(e,i,n){n=n||t;var a;return function(){var t=arguments;window.clearTimeout(a),a=window.setTimeout(function(){i.apply(n,t)},e)}}function u(e,t){var i=h(e,function(e){t.trigger("scroll-debounced",e)});t.on("scroll",function(e){a(e.target,t.get())>=0&&i(e)})}function p(e){e[0]!==document.activeElement&&window.setTimeout(function(){var t,i=e[0],n=e.val().length;e.focus();var a=i.offsetWidth>0||i.offsetHeight>0;a&&i===document.activeElement&&(i.setSelectionRange?i.setSelectionRange(n,n):i.createTextRange&&(t=i.createTextRange(),t.collapse(!1),t.select()))},0)}function f(t){t=e(t)[0];var i=0,n=0;if("selectionStart"in t)i=t.selectionStart,n=t.selectionEnd-i;else if("selection"in document){t.focus();var a=document.selection.createRange();n=document.selection.createRange().text.length,a.moveStart("character",-t.value.length),i=a.text.length-n}return{offset:i,length:n}}function g(e){e.preventDefault(),e.stopPropagation()}function m(e){e.preventDefault(),e.stopImmediatePropagation()}function v(t){if(!A){var i=t[0].currentStyle||window.getComputedStyle(t[0],null);A=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:i.fontSize,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,textTransform:i.textTransform,whiteSpace:"nowrap"}),A.attr("class","select2-sizer"),e("body").append(A)}return A.text(t.val()),A.width()}function w(t,i,n){var a,o,s=[];a=e.trim(t.attr("class")),a&&(a=""+a,e(a.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&s.push(this)})),a=e.trim(i.attr("class")),a&&(a=""+a,e(a.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(o=n(this),o&&s.push(o))})),t.attr("class",s.join(" "))}function b(e,t,i,a){var o=n(e.toUpperCase()).indexOf(n(t.toUpperCase())),s=t.length;return 0>o?void i.push(a(e)):(i.push(a(e.substring(0,o))),i.push(""),i.push(a(e.substring(o,o+s))),i.push(""),void i.push(a(e.substring(o+s,e.length))))}function x(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})}function y(i){var n,a=null,o=i.quietMillis||100,s=i.url,r=this;return function(l){window.clearTimeout(n),n=window.setTimeout(function(){var n=i.data,o=s,c=i.transport||e.fn.select2.ajaxDefaults.transport,d={type:i.type||"GET",cache:i.cache||!1,jsonpCallback:i.jsonpCallback||t,dataType:i.dataType||"json"},h=e.extend({},e.fn.select2.ajaxDefaults.params,d);n=n?n.call(r,l.term,l.page,l.context):null,o="function"==typeof o?o.call(r,l.term,l.page,l.context):o,a&&"function"==typeof a.abort&&a.abort(),i.params&&(e.isFunction(i.params)?e.extend(h,i.params.call(r)):e.extend(h,i.params)),e.extend(h,{url:o,dataType:i.dataType,data:n,success:function(e){var t=i.results(e,l.page,l);l.callback(t)},error:function(e,t,i){var n={hasError:!0,jqXHR:e,textStatus:t,errorThrown:i};l.callback(n)}}),a=c.call(r,h)},o)}}function C(t){var i,n,a=t,o=function(e){return""+e.text};e.isArray(a)&&(n=a,a={results:n}),e.isFunction(a)===!1&&(n=a,a=function(){return n});var s=a();return s.text&&(o=s.text,e.isFunction(o)||(i=s.text,o=function(e){return e[i]})),function(t){var i,n=t.term,s={results:[]};return""===n?void t.callback(a()):(i=function(a,s){var r,l;if(a=a[0],a.children){r={};for(l in a)a.hasOwnProperty(l)&&(r[l]=a[l]);r.children=[],e(a.children).each2(function(e,t){i(t,r.children)}),(r.children.length||t.matcher(n,o(r),a))&&s.push(r)}else t.matcher(n,o(a),a)&&s.push(a)},e(a().results).each2(function(e,t){i(t,s.results)}),void t.callback(s))}}function S(i){var n=e.isFunction(i);return function(a){var o=a.term,s={results:[]},r=n?i(a):i;e.isArray(r)&&(e(r).each(function(){var e=this.text!==t,i=e?this.text:this;(""===o||a.matcher(o,i))&&s.results.push(e?this:{id:this,text:this})}),a.callback(s))}}function _(t,i){if(e.isFunction(t))return!0;if(!t)return!1;if("string"==typeof t)return!0;throw new Error(i+" must be a string, function, or falsy value")}function T(t,i){if(e.isFunction(t)){var n=Array.prototype.slice.call(arguments,2);return t.apply(i,n)}return t}function k(t){var i=0;return e.each(t,function(e,t){t.children?i+=k(t.children):i++}),i}function E(e,i,n,a){var o,r,l,c,d,h=e,u=!1;if(!a.createSearchChoice||!a.tokenSeparators||a.tokenSeparators.length<1)return t;for(;;){for(r=-1,l=0,c=a.tokenSeparators.length;c>l&&(d=a.tokenSeparators[l],r=e.indexOf(d),!(r>=0));l++);if(0>r)break;if(o=e.substring(0,r),e=e.substring(r+d.length),o.length>0&&(o=a.createSearchChoice.call(this,o,i),o!==t&&null!==o&&a.id(o)!==t&&null!==a.id(o))){for(u=!1,l=0,c=i.length;c>l;l++)if(s(a.id(o),a.id(i[l]))){u=!0;break}u||n(o)}}return h!==e?e:void 0}function M(){var t=this;e.each(arguments,function(e,i){t[i].remove(),t[i]=null})}function P(t,i){var n=function(){};return n.prototype=new t,n.prototype.constructor=n,n.prototype.parent=t.prototype,n.prototype=e.extend(n.prototype,i),n}if(window.Select2===t){var I,L,O,B,D,A,R,W,H={x:0,y:0},I={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){switch(e=e.which?e.which:e){case I.LEFT:case I.RIGHT:case I.UP:case I.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case I.SHIFT:case I.CTRL:case I.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&123>=e}},N="
",F={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};R=e(document),D=function(){var e=1;return function(){return e++}}(),L=P(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(i){var n,a,s=".select2-results";this.opts=i=this.prepareOpts(i),this.id=i.id,i.element.data("select2")!==t&&null!==i.element.data("select2")&&i.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=e("",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(i.element.attr("id")||"autogen"+D()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",i.element.attr("title")),this.body=e("body"),w(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",i.element.attr("style")),this.container.css(T(i.containerCss,this.opts.element)),this.container.addClass(T(i.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",g),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),w(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(T(i.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",g),this.results=n=this.container.find(s),this.search=a=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",g),d(this.results),this.dropdown.on("mousemove-filtered",s,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",s,this.bind(function(e){this._touchEvent=!0,this.highlightUnderEvent(e)})),this.dropdown.on("touchmove",s,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",s,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),u(80,this.results),this.dropdown.on("scroll-debounced",s,this.bind(this.loadMoreIfNeeded)),e(this.container).on("change",".select2-input",function(e){e.stopPropagation()}),e(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation()}),e.fn.mousewheel&&n.mousewheel(function(e,t,i,a){var o=n.scrollTop();a>0&&0>=o-a?(n.scrollTop(0),g(e)):0>a&&n.get(0).scrollHeight-n.scrollTop()+a<=n.height()&&(n.scrollTop(n.get(0).scrollHeight-n.height()),g(e))}),c(a),a.on("keyup-change input paste",this.bind(this.updateResults)),a.on("focus",function(){a.addClass("select2-focused")}),a.on("blur",function(){a.removeClass("select2-focused")}),this.dropdown.on("mouseup",s,this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation()}),this.nextSearchTerm=t,e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==i.maximumInputLength&&this.search.attr("maxlength",i.maximumInputLength);var r=i.element.prop("disabled");r===t&&(r=!1),this.enable(!r);var l=i.element.prop("readonly");l===t&&(l=!1),this.readonly(l),W=W||o(),this.autofocus=i.element.prop("autofocus"),i.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",i.searchInputPlaceholder)},destroy:function(){var e=this.opts.element,i=e.data("select2"),n=this;this.close(),e.length&&e[0].detachEvent&&e.each(function(){this.detachEvent("onpropertychange",n._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,i!==t&&(i.container.remove(),i.liveRegion.remove(),i.dropdown.remove(),e.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?e.attr({tabindex:this.elementTabIndex}):e.removeAttr("tabindex"),e.show()),M.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(e){return e.is("option")?{id:e.prop("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:e.prop("disabled"),locked:s(e.attr("locked"),"locked")||s(e.data("locked"),!0)}:e.is("optgroup")?{text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")}:void 0},prepareOpts:function(i){var n,a,o,l,c=this;if(n=i.element,"select"===n.get(0).tagName.toLowerCase()&&(this.select=a=i.element),a&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in i)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a element.")}),i=e.extend({},{populateResults:function(n,a,o){var s,r=this.opts.id,l=this.liveRegion;(s=function(n,a,d){var h,u,p,f,g,m,v,w,b,x;n=i.sortResults(n,a,o);var y=[];for(h=0,u=n.length;u>h;h+=1)p=n[h],g=p.disabled===!0,f=!g&&r(p)!==t,m=p.children&&p.children.length>0,v=e("
  • "),v.addClass("select2-results-dept-"+d),v.addClass("select2-result"),v.addClass(f?"select2-result-selectable":"select2-result-unselectable"),g&&v.addClass("select2-disabled"),m&&v.addClass("select2-result-with-children"),v.addClass(c.opts.formatResultCssClass(p)),v.attr("role","presentation"),w=e(document.createElement("div")),w.addClass("select2-result-label"),w.attr("id","select2-result-label-"+D()),w.attr("role","option"),x=i.formatResult(p,w,o,c.opts.escapeMarkup),x!==t&&(w.html(x),v.append(w)),m&&(b=e("
      "),b.addClass("select2-result-sub"),s(p.children,b,d+1),v.append(b)),v.data("select2-data",p),y.push(v[0]);a.append(y),l.text(i.formatMatches(n.length))})(a,n,0)}},e.fn.select2.defaults,i),"function"!=typeof i.id&&(o=i.id,i.id=function(e){return e[o]}),e.isArray(i.element.data("select2Tags"))){if("tags"in i)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+i.element.attr("id");i.tags=i.element.data("select2Tags")}if(a?(i.query=this.bind(function(e){var i,a,o,s={results:[],more:!1},r=e.term;o=function(t,i){var n;t.is("option")?e.matcher(r,t.text(),t)&&i.push(c.optionToData(t)):t.is("optgroup")&&(n=c.optionToData(t),t.children().each2(function(e,t){o(t,n.children)}),n.children.length>0&&i.push(n))},i=n.children(),this.getPlaceholder()!==t&&i.length>0&&(a=this.getPlaceholderOption(),a&&(i=i.not(a))),i.each2(function(e,t){o(t,s.results)}),e.callback(s)}),i.id=function(e){return e.id}):"query"in i||("ajax"in i?(l=i.element.data("ajax-url"),l&&l.length>0&&(i.ajax.url=l),i.query=y.call(i.element,i.ajax)):"data"in i?i.query=C(i.data):"tags"in i&&(i.query=S(i.tags),i.createSearchChoice===t&&(i.createSearchChoice=function(t){return{id:e.trim(t),text:e.trim(t)}}),i.initSelection===t&&(i.initSelection=function(t,n){var a=[];e(r(t.val(),i.separator)).each(function(){var t={id:this,text:this},n=i.tags;e.isFunction(n)&&(n=n()),e(n).each(function(){return s(this.id,t.id)?(t=this,!1):void 0}),a.push(t)}),n(a)}))),"function"!=typeof i.query)throw"query function not defined for Select2 "+i.element.attr("id");if("top"===i.createSearchChoicePosition)i.createSearchChoicePosition=function(e,t){e.unshift(t)};else if("bottom"===i.createSearchChoicePosition)i.createSearchChoicePosition=function(e,t){e.push(t)};else if("function"!=typeof i.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return i},monitorSource:function(){var i,n=this.opts.element,a=this;n.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),this._sync=this.bind(function(){var e=n.prop("disabled");e===t&&(e=!1),this.enable(!e);var i=n.prop("readonly");i===t&&(i=!1),this.readonly(i),w(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(T(this.opts.containerCssClass,this.opts.element)),w(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(T(this.opts.dropdownCssClass,this.opts.element))}),n.length&&n[0].attachEvent&&n.each(function(){this.attachEvent("onpropertychange",a._sync)}),i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,i!==t&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new i(function(t){e.each(t,a._sync)}),this.propertyObserver.observe(n.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(t){var i=e.Event("select2-selecting",{val:this.id(t),object:t,choice:t});return this.opts.element.trigger(i),!i.isDefaultPrevented()},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var e=this._enabled&&!this._readonly,t=!e;return e===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",t),this.close(),this.enabledInterface=e,!0)},enable:function(e){e===t&&(e=!0),this._enabled!==e&&(this._enabled=e,this.opts.element.prop("disabled",!e),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(e){e===t&&(e=!1),this._readonly!==e&&(this._readonly=e,this.opts.element.prop("readonly",e),this.enableInterface())},opened:function(){return this.container?this.container.hasClass("select2-dropdown-open"):!1},positionDropdown:function(){var t,i,n,a,o,s=this.dropdown,r=this.container.offset(),l=this.container.outerHeight(!1),c=this.container.outerWidth(!1),d=s.outerHeight(!1),h=e(window),u=h.width(),p=h.height(),f=h.scrollLeft()+u,g=h.scrollTop()+p,m=r.top+l,v=r.left,w=g>=m+d,b=r.top-d>=h.scrollTop(),x=s.outerWidth(!1),y=f>=v+x,C=s.hasClass("select2-drop-above");C?(i=!0,!b&&w&&(n=!0,i=!1)):(i=!1,!w&&b&&(n=!0,i=!0)),n&&(s.hide(),r=this.container.offset(),l=this.container.outerHeight(!1),c=this.container.outerWidth(!1),d=s.outerHeight(!1),f=h.scrollLeft()+u,g=h.scrollTop()+p,m=r.top+l,v=r.left,x=s.outerWidth(!1),y=f>=v+x,s.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(o=e(".select2-results",s)[0],s.addClass("select2-drop-auto-width"),s.css("width",""),x=s.outerWidth(!1)+(o.scrollHeight===o.clientHeight?0:W.width),x>c?c=x:x=c,d=s.outerHeight(!1),y=f>=v+x):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(t=this.body.offset(),m-=t.top,v-=t.left),y||(v=r.left+this.container.outerWidth(!1)-x),a={left:v,width:c},i?(a.top=r.top-d,a.bottom="auto",this.container.addClass("select2-drop-above"),s.addClass("select2-drop-above")):(a.top=m,a.bottom="auto",this.container.removeClass("select2-drop-above"),s.removeClass("select2-drop-above")),a=e.extend(a,T(this.opts.dropdownCss,this.opts.element)),s.css(a)},shouldOpen:function(){var t;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(t=e.Event("select2-opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),R.on("mousemove.select2Event",function(e){H.x=e.pageX,H.y=e.pageY}),!0):!1},opening:function(){var t,n=this.containerEventName,a="scroll."+n,o="resize."+n,s="orientationchange."+n;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),t=e("#select2-drop-mask"),0==t.length&&(t=e(document.createElement("div")),t.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),t.hide(),t.appendTo(this.body),t.on("mousedown touchstart click",function(n){i(t);var a,o=e("#select2-drop");o.length>0&&(a=o.data("select2"),a.opts.selectOnBlur&&a.selectHighlighted({noFocus:!0}),a.close(),n.preventDefault(),n.stopPropagation())})),this.dropdown.prev()[0]!==t[0]&&this.dropdown.before(t),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),t.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var r=this;this.container.parents().add(window).each(function(){e(this).on(o+" "+a+" "+s,function(){r.opened()&&r.positionDropdown()})})},close:function(){if(this.opened()){var t=this.containerEventName,i="scroll."+t,n="resize."+t,a="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).off(i).off(n).off(a)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),R.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(e.Event("select2-close"))}},externalSearch:function(e){this.open(),this.search.val(e),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return T(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var t,i,n,a,o,s,r,l,c=this.results;if(i=this.highlight(),!(0>i)){if(0==i)return void c.scrollTop(0);t=this.findHighlightableChoices().find(".select2-result-label"),n=e(t[i]),l=(n.offset()||{}).top||0,a=l+n.outerHeight(!0),i===t.length-1&&(r=c.find("li.select2-more-results"),r.length>0&&(a=r.offset().top+r.outerHeight(!0))),o=c.offset().top+c.outerHeight(!0),a>o&&c.scrollTop(c.scrollTop()+(a-o)),s=l-c.offset().top,0>s&&"none"!=n.css("display")&&c.scrollTop(c.scrollTop()+s)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(t){for(var i=this.findHighlightableChoices(),n=this.highlight();n>-1&&n=o.length&&(t=o.length-1),0>t&&(t=0),this.removeHighlight(),i=e(o[t]),i.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",i.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(i.text()),n=i.data("select2-data"),void(n&&this.opts.element.trigger({type:"select2-highlight",val:this.id(n),choice:n})))},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){ var i=e(t.target).closest(".select2-result-selectable");if(i.length>0&&!i.is(".select2-highlighted")){var n=this.findHighlightableChoices();this.highlight(n.index(i))}else 0==i.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var e,t=this.results,i=t.find("li.select2-more-results"),n=this.resultsPage+1,a=this,o=this.search.val(),s=this.context;0!==i.length&&(e=i.offset().top-t.offset().top-t.height(),e<=this.opts.loadMorePadding&&(i.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:n,context:s,matcher:this.opts.matcher,callback:this.bind(function(e){a.opened()&&(a.opts.populateResults.call(this,t,e.results,{term:o,page:n,context:s}),a.postprocessResults(e,!1,!1),e.more===!0?(i.detach().appendTo(t).text(T(a.opts.formatLoadMore,a.opts.element,n+1)),window.setTimeout(function(){a.loadMoreIfNeeded()},10)):i.remove(),a.positionDropdown(),a.resultsPage=n,a.context=e.context,this.opts.element.trigger({type:"select2-loaded",items:e}))})})))},tokenize:function(){},updateResults:function(i){function n(){c.removeClass("select2-active"),u.positionDropdown(),d.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?u.liveRegion.text(d.text()):u.liveRegion.text(u.opts.formatMatches(d.find(".select2-result-selectable").length))}function a(e){d.html(e),n()}var o,r,l,c=this.search,d=this.results,h=this.opts,u=this,p=c.val(),f=e.data(this.container,"select2-last-term");if((i===!0||!f||!s(p,f))&&(e.data(this.container,"select2-last-term",p),i===!0||this.showSearchInput!==!1&&this.opened())){l=++this.queryCount;var g=this.getMaximumSelectionSize();if(g>=1&&(o=this.data(),e.isArray(o)&&o.length>=g&&_(h.formatSelectionTooBig,"formatSelectionTooBig")))return void a("
    • "+T(h.formatSelectionTooBig,h.element,g)+"
    • ");if(c.val().length"+T(h.formatInputTooShort,h.element,c.val(),h.minimumInputLength)+"":""),void(i&&this.showSearch&&this.showSearch(!0));if(h.maximumInputLength&&c.val().length>h.maximumInputLength)return void a(_(h.formatInputTooLong,"formatInputTooLong")?"
    • "+T(h.formatInputTooLong,h.element,c.val(),h.maximumInputLength)+"
    • ":"");h.formatSearching&&0===this.findHighlightableChoices().length&&a("
    • "+T(h.formatSearching,h.element)+"
    • "),c.addClass("select2-active"),this.removeHighlight(),r=this.tokenize(),r!=t&&null!=r&&c.val(r),this.resultsPage=1,h.query({element:h.element,term:c.val(),page:this.resultsPage,context:null,matcher:h.matcher,callback:this.bind(function(o){var r;if(l==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(o.hasError!==t&&_(h.formatAjaxError,"formatAjaxError"))return void a("
    • "+T(h.formatAjaxError,h.element,o.jqXHR,o.textStatus,o.errorThrown)+"
    • ");if(this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&""!==c.val()&&(r=this.opts.createSearchChoice.call(u,c.val(),o.results),r!==t&&null!==r&&u.id(r)!==t&&null!==u.id(r)&&0===e(o.results).filter(function(){return s(u.id(this),u.id(r))}).length&&this.opts.createSearchChoicePosition(o.results,r)),0===o.results.length&&_(h.formatNoMatches,"formatNoMatches"))return void a("
    • "+T(h.formatNoMatches,h.element,c.val())+"
    • ");d.empty(),u.opts.populateResults.call(this,d,o.results,{term:c.val(),page:this.resultsPage,context:null}),o.more===!0&&_(h.formatLoadMore,"formatLoadMore")&&(d.append("
    • "+h.escapeMarkup(T(h.formatLoadMore,h.element,this.resultsPage))+"
    • "),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,i),n(),this.opts.element.trigger({type:"select2-loaded",items:o})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){p(this.search)},selectHighlighted:function(e){if(this._touchMoved)return void this.clearTouchMoved();var t=this.highlight(),i=this.results.find(".select2-highlighted"),n=i.closest(".select2-result").data("select2-data");n?(this.highlight(t),this.onSelect(n,e)):e&&e.noFocus&&this.close()},getPlaceholder:function(){var e;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((e=this.getPlaceholderOption())!==t?e.text():t)},getPlaceholderOption:function(){if(this.select){var i=this.select.children("option").first();if(this.opts.placeholderOption!==t)return"first"===this.opts.placeholderOption&&i||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===e.trim(i.text())&&""===i.val())return i}},initContainerWidth:function(){function i(){var i,n,a,o,s,r;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"100%":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(i=this.opts.element.attr("style"),i!==t)for(n=i.split(";"),o=0,s=n.length;s>o;o+=1)if(r=n[o].replace(/\s/g,""),a=r.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==a&&a.length>=1)return a[1];return"resolve"===this.opts.width?(i=this.opts.element.css("width"),i.indexOf("%")>0?i:0===this.opts.element.outerWidth(!1)?"100%":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var n=i.call(this);null!==n&&this.container.css("width",n)}}),O=P(L,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["","  "," ","","","","
      "," ","
        ","
      ","
      "].join(""));return t},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var i,n,a;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),i=this.search.get(0),i.createTextRange?(n=i.createTextRange(),n.collapse(!1),n.select()):i.setSelectionRange&&(a=this.search.val().length,i.setSelectionRange(a,a))),""===this.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){e("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),M.call(this,"selection","focusser")},initContainer:function(){var t,n,a=this.container,o=this.dropdown,s=D();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=t=a.find(".select2-choice"),this.focusser=a.find(".select2-focusser"),t.find(".select2-chosen").attr("id","select2-chosen-"+s),this.focusser.attr("aria-labelledby","select2-chosen-"+s),this.results.attr("id","select2-results-"+s),this.search.attr("aria-owns","select2-results-"+s),this.focusser.attr("id","s2id_autogen"+s),n=e("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(n.text()).attr("for",this.focusser.attr("id"));var r=this.opts.element.attr("title");this.opts.element.attr("title",r||n.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(e("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&229!=e.keyCode){if(e.which===I.PAGE_UP||e.which===I.PAGE_DOWN)return void g(e);switch(e.which){case I.UP:case I.DOWN:return this.moveHighlight(e.which===I.UP?-1:1),void g(e);case I.ENTER:return this.selectHighlighted(),void g(e);case I.TAB:return void this.selectHighlighted({noFocus:!0});case I.ESC:return this.cancel(e),void g(e)}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&e.which!==I.TAB&&!I.isControl(e)&&!I.isFunctionKey(e)&&e.which!==I.ESC){if(this.opts.openOnEnter===!1&&e.which===I.ENTER)return void g(e);if(e.which==I.DOWN||e.which==I.UP||e.which==I.ENTER&&this.opts.openOnEnter){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;return this.open(),void g(e)}return e.which==I.DELETE||e.which==I.BACKSPACE?(this.opts.allowClear&&this.clear(),void g(e)):void 0}})),c(this.focusser),this.focusser.on("keyup-change input",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){if(e.stopPropagation(),this.opened())return;this.open()}})),t.on("mousedown touchstart","abbr",this.bind(function(e){this.isInterfaceEnabled()&&(this.clear(),m(e),this.close(),this.selection.focus())})),t.on("mousedown touchstart",this.bind(function(n){i(t),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),g(n)})),o.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),t.on("focus",this.bind(function(e){g(e)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(e.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(t){var i=this.selection.data("select2-data");if(i){var n=e.Event("select2-clearing");if(this.opts.element.trigger(n),n.isDefaultPrevented())return;var a=this.getPlaceholderOption();this.opts.element.val(a?a.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),t!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var e=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==t&&null!==i&&(e.updateSelection(i),e.close(),e.setPlaceholder(),e.nextSearchTerm=e.opts.nextSearchTerm(i,e.search.val()))})}},isPlaceholderOptionSelected:function(){var e;return this.getPlaceholder()===t?!1:(e=this.getPlaceholderOption())!==t&&e.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===t||null===this.opts.element.val()},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(e,t){var n=e.find("option").filter(function(){return this.selected&&!this.disabled});t(i.optionToData(n))}:"data"in t&&(t.initSelection=t.initSelection||function(i,n){var a=i.val(),o=null;t.query({matcher:function(e,i,n){var r=s(a,t.id(n));return r&&(o=n),r},callback:e.isFunction(n)?function(){n(o)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===t?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&e!==t){if(this.select&&this.getPlaceholderOption()===t)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(e,t,i){var n=0,a=this;if(this.findHighlightableChoices().each2(function(e,t){return s(a.id(t.data("select2-data")),a.opts.element.val())?(n=e,!1):void 0}),i!==!1&&(t===!0&&n>=0?this.highlight(n):this.highlight(0)),t===!0){var o=this.opts.minimumResultsForSearch;o>=0&&this.showSearch(k(e.results)>=o)}},showSearch:function(t){this.showSearchInput!==t&&(this.showSearchInput=t,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!t),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!t),e(this.dropdown,this.container).toggleClass("select2-with-searchbox",t))},onSelect:function(e,t){if(this.triggerSelect(e)){var i=this.opts.element.val(),n=this.data();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"select2-selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.close(),t&&t.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),s(i,this.id(e))||this.triggerChange({added:e,removed:n})}},updateSelection:function(e){var i,n,a=this.selection.find(".select2-chosen");this.selection.data("select2-data",e),a.empty(),null!==e&&(i=this.opts.formatSelection(e,a,this.opts.escapeMarkup)),i!==t&&a.append(i),n=this.opts.formatSelectionCssClass(e,a),n!==t&&a.addClass(n),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.container.addClass("select2-allowclear")},val:function(){var e,i=!1,n=null,a=this,o=this.data();if(0===arguments.length)return this.opts.element.val();if(e=arguments[0],arguments.length>1&&(i=arguments[1]),this.select)this.select.val(e).find("option").filter(function(){return this.selected}).each2(function(e,t){return n=a.optionToData(t),!1}),this.updateSelection(n),this.setPlaceholder(),i&&this.triggerChange({added:n,removed:o});else{if(!e&&0!==e)return void this.clear(i);if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){a.opts.element.val(e?a.id(e):""),a.updateSelection(e),a.setPlaceholder(),i&&a.triggerChange({added:e,removed:o})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var i,n=!1;return 0===arguments.length?(i=this.selection.data("select2-data"),i==t&&(i=null),i):(arguments.length>1&&(n=arguments[1]),void(e?(i=this.data(),this.opts.element.val(e?this.id(e):""),this.updateSelection(e),n&&this.triggerChange({added:e,removed:i})):this.clear(n)))}}),B=P(L,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["
        ","
      • "," "," ","
      • ","
      ","
      ","
        ","
      ","
      "].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(e,t){var n=[];e.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(e,t){n.push(i.optionToData(t))}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(i,n){var a=r(i.val(),t.separator),o=[];t.query({matcher:function(i,n,r){var l=e.grep(a,function(e){return s(e,t.id(r))}).length;return l&&o.push(r),l},callback:e.isFunction(n)?function(){for(var e=[],i=0;i0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.open(),this.focusSearch(),t.preventDefault()))})),this.container.on("focus",i,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var e=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==t&&null!==i&&(e.updateSelection(i),e.close(),e.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder(),i=this.getMaxSearchWidth();e!==t&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.search.width(i>0?i:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var i=[],n=[],o=this;e(t).each(function(){a(o.id(this),i)<0&&(i.push(o.id(this)),n.push(this))}),t=n,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){o.addSelectedChoice(this)}),o.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer.call(this,e,this.data(),this.bind(this.onSelect),this.opts),null!=e&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,i){this.triggerSelect(e)&&""!==e.text&&(this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(e,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),i&&i.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(i){var n,a,o=!i.locked,s=e("
    • "),r=e("
    • "),l=o?s:r,c=this.id(i),d=this.getVal();n=this.opts.formatSelection(i,l.find("div"),this.opts.escapeMarkup),n!=t&&l.find("div").replaceWith("
      "+n+"
      "),a=this.opts.formatSelectionCssClass(i,l.find("div")),a!=t&&l.addClass(a),o&&l.find(".select2-search-choice-close").on("mousedown",g).on("click dblclick",this.bind(function(t){this.isInterfaceEnabled()&&(this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),g(t),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),l.data("select2-data",i),l.insertBefore(this.searchContainer),d.push(c),this.setVal(d)},unselect:function(t){var i,n,o=this.getVal();if(t=t.closest(".select2-search-choice"),0===t.length)throw"Invalid argument: "+t+". Must be .select2-search-choice";if(i=t.data("select2-data")){var s=e.Event("select2-removing");if(s.val=this.id(i),s.choice=i,this.opts.element.trigger(s),s.isDefaultPrevented())return!1;for(;(n=a(this.id(i),o))>=0;)o.splice(n,1),this.setVal(o),this.select&&this.postprocessResults();return t.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}),!0}},postprocessResults:function(e,t,i){var n=this.getVal(),o=this.results.find(".select2-result"),s=this.results.find(".select2-result-with-children"),r=this;o.each2(function(e,t){var i=r.id(t.data("select2-data"));a(i,n)>=0&&(t.addClass("select2-selected"),t.find(".select2-result-selectable").addClass("select2-selected"))}),s.each2(function(e,t){t.is(".select2-result-selectable")||0!==t.find(".select2-result-selectable:not(.select2-selected)").length||t.addClass("select2-selected")}),-1==this.highlight()&&i!==!1&&r.highlight(0),!this.opts.createSearchChoice&&!o.filter(".select2-result:not(.select2-selected)").length>0&&(!e||e&&!e.more&&0===this.results.find(".select2-no-results").length)&&_(r.opts.formatNoMatches,"formatNoMatches")&&this.results.append("
    • "+T(r.opts.formatNoMatches,r.opts.element,r.search.val())+"
    • ")},getMaxSearchWidth:function(){return this.selection.width()-l(this.search)},resizeSearch:function(){var e,t,i,n,a,o=l(this.search);e=v(this.search)+10,t=this.search.offset().left,i=this.selection.width(),n=this.selection.offset().left,a=i-(t-n)-o,e>a&&(a=i-o),40>a&&(a=i-o),0>=a&&(a=e),this.search.width(Math.floor(a))},getVal:function(){var e;return this.select?(e=this.select.val(),null===e?[]:e):(e=this.opts.element.val(),r(e,this.opts.separator))},setVal:function(t){var i;this.select?this.select.val(t):(i=[],e(t).each(function(){a(this,i)<0&&i.push(this)}),this.opts.element.val(0===i.length?"":i.join(this.opts.separator)))},buildChangeDetails:function(e,t){for(var t=t.slice(0),e=e.slice(0),i=0;i0&&i--,e.splice(n,1),n--);return{added:t,removed:e}},val:function(i,n){var a,o=this;if(0===arguments.length)return this.getVal();if(a=this.data(),a.length||(a=[]),!i&&0!==i)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(n&&this.triggerChange({added:this.data(),removed:a}));if(this.setVal(i),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),n&&this.triggerChange(this.buildChangeDetails(a,this.data()));else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var i=e.map(t,o.id);o.setVal(i),o.updateSelection(t),o.clearSearch(),n&&o.triggerChange(o.buildChangeDetails(a,o.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],i=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(i.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t,i){var n,a,o=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get():(a=this.data(),t||(t=[]),n=e.map(t,function(e){return o.opts.id(e)}),this.setVal(n),this.updateSelection(t),this.clearSearch(),void(i&&this.triggerChange(this.buildChangeDetails(a,this.data()))))}}),e.fn.select2=function(){var i,n,o,s,r,l=Array.prototype.slice.call(arguments,0),c=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],d=["opened","isFocused","container","dropdown"],h=["val","data"],u={search:"externalSearch"};return this.each(function(){if(0===l.length||"object"==typeof l[0])i=0===l.length?{}:e.extend({},l[0]),i.element=e(this),"select"===i.element.get(0).tagName.toLowerCase()?r=i.element.prop("multiple"):(r=i.multiple||!1,"tags"in i&&(i.multiple=r=!0)),n=r?new window.Select2["class"].multi:new window.Select2["class"].single,n.init(i);else{if("string"!=typeof l[0])throw"Invalid arguments to select2 plugin: "+l;if(a(l[0],c)<0)throw"Unknown method: "+l[0];if(s=t,n=e(this).data("select2"),n===t)return;if(o=l[0],"container"===o?s=n.container:"dropdown"===o?s=n.dropdown:(u[o]&&(o=u[o]),s=n[o].apply(n,l.slice(1))),a(l[0],d)>=0||a(l[0],h)>=0&&1==l.length)return!1}}),s===t?this:s},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,i,n){var a=[];return b(e.text,i.term,a,n),a.join("")},formatSelection:function(e,i,n){return e?n(e.text):t},sortResults:function(e){return e},formatResultCssClass:function(e){return e.css},formatSelectionCssClass:function(){return t},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==t?null:e.id},matcher:function(e,t){return n(""+t).toUpperCase().indexOf(n(""+e).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:E,escapeMarkup:x,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return t},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(e){var t="ontouchstart"in window||navigator.msMaxTouchPoints>0;return t&&e.opts.minimumResultsForSearch<0?!1:!0}},e.fn.select2.locales=[],e.fn.select2.locales.en={formatMatches:function(e){return 1===e?"One result is available, press enter to select it.":e+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(){return"Loading failed"},formatInputTooShort:function(e,t){var i=t-e.length;return"Please enter "+i+" or more character"+(1==i?"":"s")},formatInputTooLong:function(e,t){var i=e.length-t;return"Please delete "+i+" character"+(1==i?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(1==e?"":"s")},formatLoadMore:function(){return"Loading more results…"},formatSearching:function(){return"Searching…"}},e.extend(e.fn.select2.defaults,e.fn.select2.locales.en),e.fn.select2.ajaxDefaults={transport:e.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:y,local:C,tags:S},util:{debounce:h,markMatch:b, escapeMarkup:x,stripDiacritics:n},"class":{"abstract":L,single:O,multi:B}}}}(jQuery),function(e){"use strict";function t(e){return" "+e+" символ"+(5>e%10&&e%10>0&&(5>e%100||e%100>20)?e%10>1?"a":"":"ов")}e.fn.select2.locales.ru={formatNoMatches:function(){return"Совпадений не найдено"},formatInputTooShort:function(e,i){return"Пожалуйста, введите еще хотя бы"+t(i-e.length)},formatInputTooLong:function(e,i){return"Пожалуйста, введите на"+t(e.length-i)+" меньше"},formatSelectionTooBig:function(e){return"Вы можете выбрать не более "+e+" элемент"+(e%10==1&&e%100!=11?"а":"ов")},formatLoadMore:function(e){return"Загрузка данных…"},formatSearching:function(){return"Поиск…"}},e.extend(e.fn.select2.defaults,e.fn.select2.locales.ru)}(jQuery),jQuery(function(e){e.datepicker.regional.ru={closeText:"Закрыть",prevText:"<Пред",nextText:"След>",currentText:"Сегодня",monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],dayNamesShort:["вск","пнд","втр","срд","чтв","птн","сбт"],dayNamesMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],weekHeader:"Нед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.ru)}),function(e){function t(t){var i=t||window.event,n=[].slice.call(arguments,1),a=0,o=0,s=0;return t=e.event.fix(i),t.type="mousewheel",i.wheelDelta&&(a=i.wheelDelta/120),i.detail&&(a=-i.detail/3),s=a,void 0!==i.axis&&i.axis===i.HORIZONTAL_AXIS&&(s=0,o=-1*a),void 0!==i.wheelDeltaY&&(s=i.wheelDeltaY/120),void 0!==i.wheelDeltaX&&(o=-1*i.wheelDeltaX/120),n.unshift(t,a,o,s),(e.event.dispatch||e.event.handle).apply(this,n)}var i=["DOMMouseScroll","mousewheel"];if(e.event.fixHooks)for(var n=i.length;n;)e.event.fixHooks[i[--n]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=i.length;e;)this.addEventListener(i[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=i.length;e;)this.removeEventListener(i[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery);var Swiper=function(e,t){function i(e,t){return document.querySelectorAll?(t||document).querySelectorAll(e):jQuery(e,t)}function n(){var e=k-P;return t.freeMode&&(e=k-P),t.slidesPerView>S.slides.length&&(e=0),0>e&&(e=0),e}function a(){function e(e){var i=new Image;i.onload=function(){S.imagesLoaded++,S.imagesLoaded==S.imagesToLoad.length&&(S.reInit(),t.onImagesReady&&S.fireCallback(t.onImagesReady,S))},i.src=e}var n=S.h.addEventListener;if(S.browser.ie10?(n(S.wrapper,S.touchEvents.touchStart,f),n(document,S.touchEvents.touchMove,g),n(document,S.touchEvents.touchEnd,m)):(S.support.touch&&(n(S.wrapper,"touchstart",f),n(S.wrapper,"touchmove",g),n(S.wrapper,"touchend",m)),t.simulateTouch&&(n(S.wrapper,"mousedown",f),n(document,"mousemove",g),n(document,"mouseup",m))),t.autoResize&&n(window,"resize",S.resizeFix),o(),S._wheelEvent=!1,t.mousewheelControl){void 0!==document.onmousewheel&&(S._wheelEvent="mousewheel");try{WheelEvent("wheel"),S._wheelEvent="wheel"}catch(a){}S._wheelEvent||(S._wheelEvent="DOMMouseScroll"),S._wheelEvent&&n(S.container,S._wheelEvent,l)}if(t.keyboardControl&&n(document,"keydown",r),t.updateOnImagesReady)for(S.imagesToLoad=i("img",S.container),n=0;n=a&&c[0]<=a+s&&c[1]>=o&&c[1]<=o+r&&(i=!0)}if(!i)return}O?((37==t||39==t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1),39==t&&S.swipeNext(),37==t&&S.swipePrev()):((38==t||40==t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1),40==t&&S.swipeNext(),38==t&&S.swipePrev())}function l(e){var i=S._wheelEvent,a=0;if(e.detail)a=-e.detail;else if("mousewheel"==i)if(O){if(!(Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)))return;a=e.wheelDeltaX}else{if(!(Math.abs(e.wheelDeltaY)>Math.abs(e.wheelDeltaX)))return;a=e.wheelDeltaY}else if("DOMMouseScroll"==i)a=-e.detail;else if("wheel"==i)if(O){if(!(Math.abs(e.deltaX)>Math.abs(e.deltaY)))return;a=-e.deltaX}else{if(!(Math.abs(e.deltaY)>Math.abs(e.deltaX)))return;a=-e.deltaY}if(t.freeMode){if(i=S.getWrapperTranslate()+a,i>0&&(i=0),i<-n()&&(i=-n()),S.setWrapperTransition(0),S.setWrapperTranslate(i),S.updateActiveSlide(i),0==i||i==-n())return}else 60<(new Date).getTime()-A&&(0>a?S.swipeNext():S.swipePrev()),A=(new Date).getTime();return t.autoplay&&S.stopAutoplay(!0),e.preventDefault?e.preventDefault():e.returnValue=!1,!1}function c(e){S.allowSlideClick&&(h(e),S.fireCallback(t.onSlideClick,S,e))}function d(e){h(e),S.fireCallback(t.onSlideTouch,S,e)}function h(e){if(e.currentTarget)S.clickedSlide=e.currentTarget;else{e=e.srcElement;do if(-1Math.abs(i-S.touches.startX))),"undefined"!=typeof M||O||(M=!!(M||Math.abs(a-S.touches.startY)e?P/2:S.positions.current*e),S.positions.current<-n()&&(i=(S.touches.current-S.touches.start)*t.touchRatio+(n()+S.positions.start),e=(P+i)/P,i=S.positions.current-i*(1-e)/2,a=-n()-P/2,S.positions.current=a>i||0>=e?a:i)),t.resistance&&"100%"==t.resistance&&(0t.moveStartThreshold||R?(R=!0,S.setWrapperTranslate(S.positions.current)):S.positions.current=S.positions.start:S.setWrapperTranslate(S.positions.current),(t.freeMode||t.watchActiveIndex)&&S.updateActiveSlide(S.positions.current),t.grabCursor&&(S.container.style.cursor="move",S.container.style.cursor="grabbing",S.container.style.cursor="-moz-grabbin",S.container.style.cursor="-webkit-grabbing"),W||(W=S.touches.current),H||(H=(new Date).getTime()),S.velocity=(S.touches.current-W)/((new Date).getTime()-H)/2,2>Math.abs(S.touches.current-W)&&(S.velocity=0),W=S.touches.current,H=(new Date).getTime(),S.callPlugins("onTouchMoveEnd"),t.onTouchMove&&S.fireCallback(t.onTouchMove,S),!1}}function m(e){if(M&&S.swipeReset(),!t.onlyExternal&&S.isTouched){S.isTouched=!1,t.grabCursor&&(S.container.style.cursor="move",S.container.style.cursor="grab",S.container.style.cursor="-moz-grab",S.container.style.cursor="-webkit-grab"),S.positions.current||0===S.positions.current||(S.positions.current=S.positions.start),t.followFinger&&S.setWrapperTranslate(S.positions.current),S.times.end=(new Date).getTime(),S.touches.diff=S.touches.current-S.touches.start,S.touches.abs=Math.abs(S.touches.diff),S.positions.diff=S.positions.current-S.positions.start,S.positions.abs=Math.abs(S.positions.diff);var i=S.positions.diff,a=S.positions.abs;e=S.times.end-S.times.start,5>a&&300>e&&0==S.allowLinks&&(t.freeMode||0==a||S.swipeReset(),t.preventLinks&&(S.allowLinks=!0),t.onSlideClick&&(S.allowSlideClick=!0)),setTimeout(function(){t.preventLinks&&(S.allowLinks=!0),t.onSlideClick&&(S.allowSlideClick=!0)},100);var o=n();if(!S.isMoved&&t.freeMode)S.isMoved=!1,t.onTouchEnd&&S.fireCallback(t.onTouchEnd,S);else if(!S.isMoved||0i&&(t.momentumBounce&&S.support.transitions?(-l>i+o&&(i=-o-l),s=-o,F=r=!0):i=-o),i>0&&(t.momentumBounce&&S.support.transitions?(i>l&&(i=l),s=0,F=r=!0):i=0),0!=S.velocity&&(a=Math.abs((i-S.positions.current)/S.velocity)),S.setWrapperTranslate(i),S.setWrapperTransition(a),t.momentumBounce&&r&&S.wrapperTransitionEnd(function(){F&&(t.onMomentumBounce&&S.fireCallback(t.onMomentumBounce,S),S.callPlugins("onMomentumBounce"),S.setWrapperTranslate(s),S.setWrapperTransition(300))}),S.updateActiveSlide(i)}(!t.freeModeFluid||e>=300)&&S.updateActiveSlide(S.positions.current),t.onTouchEnd&&S.fireCallback(t.onTouchEnd,S)}else{if(E=0>i?"toNext":"toPrev","toNext"==E&&300>=e&&(30>a||!t.shortSwipes?S.swipeReset():S.swipeNext(!0)),"toPrev"==E&&300>=e&&(30>a||!t.shortSwipes?S.swipeReset():S.swipePrev(!0)),o=0,"auto"==t.slidesPerView){for(var i=Math.abs(S.getWrapperTranslate()),c=r=0;ci){o=l;break}o>P&&(o=P)}else o=T*t.slidesPerView;"toNext"==E&&e>300&&(a>=.5*o?S.swipeNext(!0):S.swipeReset()),"toPrev"==E&&e>300&&(a>=.5*o?S.swipePrev(!0):S.swipeReset()),t.onTouchEnd&&t.onTouchEnd(S)}S.callPlugins("onTouchEnd")}}function v(e,i,n){function a(){s+=r,(c="toNext"==l?s>e:e>s)?(S.setWrapperTranslate(Math.round(s)),S._DOMAnimating=!0,window.setTimeout(function(){a()},1e3/60)):(t.onSlideChangeEnd&&S.fireCallback(t.onSlideChangeEnd,S),S.setWrapperTranslate(e),S._DOMAnimating=!1)}var o="to"==i&&0<=n.speed?n.speed:t.speed;if(S.support.transitions||!t.DOMAnimation)S.setWrapperTranslate(e),S.setWrapperTransition(o);else{var s=S.getWrapperTranslate(),r=Math.ceil((e-s)/o*(1e3/60)),l=s>e?"toNext":"toPrev",c="toNext"==l?s>e:e>s;if(S._DOMAnimating)return;a()}S.updateActiveSlide(e),t.onSlideNext&&"next"==i&&S.fireCallback(t.onSlideNext,S,e),t.onSlidePrev&&"prev"==i&&S.fireCallback(t.onSlidePrev,S,e),t.onSlideReset&&"reset"==i&&S.fireCallback(t.onSlideReset,S,e),("next"==i||"prev"==i||"to"==i&&1==n.runCallbacks)&&w(i)}function w(e){if(S.callPlugins("onSlideChangeStart"),t.onSlideChangeStart)if(t.queueStartCallbacks&&S.support.transitions){if(S._queueStartCallbacks)return;S._queueStartCallbacks=!0,S.fireCallback(t.onSlideChangeStart,S,e),S.wrapperTransitionEnd(function(){S._queueStartCallbacks=!1})}else S.fireCallback(t.onSlideChangeStart,S,e);t.onSlideChangeEnd&&(S.support.transitions?t.queueEndCallbacks?S._queueEndCallbacks||(S._queueEndCallbacks=!0,S.wrapperTransitionEnd(function(i){S.fireCallback(t.onSlideChangeEnd,i,e)})):S.wrapperTransitionEnd(function(i){S.fireCallback(t.onSlideChangeEnd,i,e)}):t.DOMAnimation||setTimeout(function(){S.fireCallback(t.onSlideChangeStart,S,e)},10))}function b(){for(var e=S.paginationButtons,t=0;ti;i++)if(this[i]===e)return i;return-1}),(document.querySelectorAll||window.jQuery)&&"undefined"!=typeof e&&(e.nodeType||0!==i(e).length)){var S=this;S.touches={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,diff:0,abs:0},S.positions={start:0,abs:0,diff:0,current:0},S.times={start:0,end:0},S.id=(new Date).getTime(),S.container=e.nodeType?e:i(e)[0],S.isTouched=!1,S.isMoved=!1,S.activeIndex=0,S.centerIndex=0,S.activeLoaderIndex=0,S.activeLoopIndex=0,S.previousIndex=null,S.velocity=0,S.snapGrid=[],S.slidesGrid=[],S.imagesToLoad=[],S.imagesLoaded=0,S.wrapperLeft=0,S.wrapperRight=0,S.wrapperTop=0,S.wrapperBottom=0;var _,T,k,E,M,P,C={mode:"horizontal",touchRatio:1,speed:300,freeMode:!1,freeModeFluid:!1,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,slidesPerView:1,slidesPerGroup:1,simulateTouch:!0,followFinger:!0,shortSwipes:!0,moveStartThreshold:!1,onlyExternal:!1,createPagination:!0,pagination:!1,paginationElement:"span",paginationClickable:!1,paginationAsRange:!0,resistance:!0,scrollContainer:!1,preventLinks:!0,noSwiping:!1,noSwipingClass:"swiper-no-swiping",initialSlide:0,keyboardControl:!1,mousewheelControl:!1,useCSS3Transforms:!0,autoplay:!1,autoplayDisableOnInteraction:!0,loop:!1,loopAdditionalSlides:0,calculateHeight:!1,cssWidthAndHeight:!1,updateOnImagesReady:!0,releaseFormElements:!0,watchActiveIndex:!1,visibilityFullFit:!1,offsetPxBefore:0,offsetPxAfter:0,offsetSlidesBefore:0,offsetSlidesAfter:0,centeredSlides:!1,queueStartCallbacks:!1,queueEndCallbacks:!1,autoResize:!0,resizeReInit:!1,DOMAnimation:!0,loader:{slides:[],slidesHTMLType:"inner",surroundGroups:1,logic:"reload",loadAllSlides:!1},slideElement:"div",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",wrapperClass:"swiper-wrapper",paginationElementClass:"swiper-pagination-switch",paginationActiveClass:"swiper-active-switch",paginationVisibleClass:"swiper-visible-switch"};t=t||{};for(var I in C)if(I in t&&"object"==typeof t[I])for(var L in C[I])L in t[I]||(t[I][L]=C[I][L]);else I in t||(t[I]=C[I]);S.params=t,t.scrollContainer&&(t.freeMode=!0,t.freeModeFluid=!0),t.loop&&(t.resistance="100%");var O="horizontal"===t.mode;for(S.touchEvents={touchStart:S.support.touch||!t.simulateTouch?"touchstart":S.browser.ie10?"MSPointerDown":"mousedown",touchMove:S.support.touch||!t.simulateTouch?"touchmove":S.browser.ie10?"MSPointerMove":"mousemove",touchEnd:S.support.touch||!t.simulateTouch?"touchend":S.browser.ie10?"MSPointerUp":"mouseup"},I=S.container.childNodes.length-1;I>=0;I--)if(S.container.childNodes[I].className)for(L=S.container.childNodes[I].className.split(" "),C=0;C=0;i--)e===S.slides[i]&&(t=i);return t},e.isActive=function(){return e.index()===S.activeIndex?!0:!1},e.swiperSlideDataStorage||(e.swiperSlideDataStorage={}),e.getData=function(t){return e.swiperSlideDataStorage[t]},e.setData=function(t,i){return e.swiperSlideDataStorage[t]=i,e},e.data=function(t,i){return i?(e.setAttribute("data-"+t,i),e):e.getAttribute("data-"+t)},e.getWidth=function(t){return S.h.getWidth(e,t)},e.getHeight=function(t){return S.h.getHeight(e,t)},e.getOffset=function(){return S.h.getOffset(e)},e},S.calcSlides=function(e){var i=S.slides?S.slides.length:!1;S.slides=[],S.displaySlides=[];for(var n=0;n=0;n--)S._extendSwiperSlide(S.slides[n]);!1===i||i===S.slides.length&&!e||(s(),o(),S.updateActiveSlide(),S.params.pagination&&S.createPagination(),S.callPlugins("numberOfSlidesChanged"))},S.createSlide=function(e,i,n){return i=i||S.params.slideClass,n=n||t.slideElement,n=document.createElement(n),n.innerHTML=e||"",n.className=i,S._extendSwiperSlide(n)},S.appendSlide=function(e,t,i){return e?e.nodeType?S._extendSwiperSlide(e).append():S.createSlide(e,t,i).append():void 0},S.prependSlide=function(e,t,i){return e?e.nodeType?S._extendSwiperSlide(e).prepend():S.createSlide(e,t,i).prepend():void 0},S.insertSlideAfter=function(e,t,i,n){return"undefined"==typeof e?!1:t.nodeType?S._extendSwiperSlide(t).insertAfter(e):S.createSlide(t,i,n).insertAfter(e)},S.removeSlide=function(e){if(S.slides[e]){if(t.loop){if(!S.slides[e+S.loopedSlides])return!1;S.slides[e+S.loopedSlides].remove(),S.removeLoopedSlides(),S.calcSlides(),S.createLoop()}else S.slides[e].remove();return!0}return!1},S.removeLastSlide=function(){return 0=0;e--)S.slides[e].remove()},S.getSlide=function(e){return S.slides[e]},S.getLastSlide=function(){return S.slides[S.slides.length-1]},S.getFirstSlide=function(){return S.slides[0]},S.activeSlide=function(){return S.slides[S.activeIndex]};var B,D=[];for(B in S.plugins)t[B]&&(I=S.plugins[B](S,t[B]))&&D.push(I);S.callPlugins=function(e,t){t||(t={});for(var i=0;iP){for(f=0;f<=Math.floor(u/(P+S.wrapperLeft));f++)0===f?S.snapGrid.push(r+S.wrapperLeft):S.snapGrid.push(r+S.wrapperLeft+P*f);S.slidesGrid.push(r+S.wrapperLeft)}else S.snapGrid.push(l),S.slidesGrid.push(l);l+=u/2+p/2}else{if(u>P)for(f=0;f<=Math.floor(u/P);f++)S.snapGrid.push(r+P*f);else S.snapGrid.push(r);S.slidesGrid.push(r)}r+=u,o+=a,s+=h}t.calculateHeight&&(S.height=c),O?(k=o+S.wrapperRight+S.wrapperLeft,n.style.width=o+"px",n.style.height=S.height+"px"):(k=s+S.wrapperTop+S.wrapperBottom,n.style.width=S.width+"px",n.style.height=s+"px")}else if(t.scrollContainer)n.style.width="",n.style.height="",c=S.slides[0].getWidth(!0),o=S.slides[0].getHeight(!0),k=O?c:o,n.style.width=c+"px",n.style.height=o+"px",T=O?c:o;else{if(t.calculateHeight){for(o=c=0,O||(S.container.style.height=""),n.style.height="",d=0;d=S.snapGrid[a]&&-eS.snapGrid[n]&&-e0&&(i=0),i==e?!1:(v(i,"prev"),!0)},S.swipeReset=function(){S.callPlugins("onSwipeReset");var e=S.getWrapperTranslate(),i=T*t.slidesPerGroup;if(n(),"auto"==t.slidesPerView){for(var a=i=0;a=S.snapGrid[a]&&-e=S.snapGrid[S.snapGrid.length-1]&&(i=-S.snapGrid[S.snapGrid.length-1]),e<=-n()&&(i=-n())}else i=0>e?Math.round(e/i)*i:0;return t.scrollContainer&&(i=0>e?e:0),i<-n()&&(i=-n()),t.scrollContainer&&P>T&&(i=0),i==e?!1:(v(i,"reset"),!0)},S.swipeTo=function(e,i,a){e=parseInt(e,10),S.callPlugins("onSwipeTo",{index:e,speed:i}),t.loop&&(e+=S.loopedSlides);var o=S.getWrapperTranslate();if(!(e>S.slides.length-1||0>e)){var s;return s="auto"==t.slidesPerView?-S.slidesGrid[e]:-e*T,s<-n()&&(s=-n()),s==o?!1:(v(s,"to",{index:e,speed:i,runCallbacks:!1===a?!1:!0}),!0)}},S._queueStartCallbacks=!1,S._queueEndCallbacks=!1,S.updateActiveSlide=function(e){if(S.initialized&&0!=S.slides.length){if(S.previousIndex=S.activeIndex,"undefined"==typeof e&&(e=S.getWrapperTranslate()),e>0&&(e=0),"auto"==t.slidesPerView){if(S.activeIndex=S.slidesGrid.indexOf(-e),0>S.activeIndex){for(var i=0;iS.slidesGrid[i]&&-e=n?i:i+1}}else S.activeIndex=Math[t.visibilityFullFit?"ceil":"round"](-e/T);if(S.activeIndex==S.slides.length&&(S.activeIndex=S.slides.length-1),0>S.activeIndex&&(S.activeIndex=0),S.slides[S.activeIndex]){for(S.calcVisibleSlides(e),n=RegExp("\\s*"+t.slideActiveClass),a=RegExp("\\s*"+t.slideVisibleClass),i=0;i=S.slides.length-2*i&&(S.activeLoopIndex=S.slides.length-2*i-S.activeLoopIndex),0>S.activeLoopIndex&&(S.activeLoopIndex=S.slides.length-2*i+S.activeLoopIndex)):S.activeLoopIndex=S.activeIndex,t.pagination&&S.updatePagination(e)}}},S.createPagination=function(e){if(t.paginationClickable&&S.paginationButtons&&b(),S.paginationContainer=t.pagination.nodeType?t.pagination:i(t.pagination)[0],t.createPagination){var n="",a=S.slides.length;t.loop&&(a-=2*S.loopedSlides);for(var o=0;a>o;o++)n+="<"+t.paginationElement+' class="'+t.paginationElementClass+'">";S.paginationContainer.innerHTML=n}if(S.paginationButtons=i("."+t.paginationElementClass,S.paginationContainer),e||S.updatePagination(),S.callPlugins("onCreatePagination"),t.paginationClickable)for(e=S.paginationButtons,n=0;nS.slides.length)&&i("."+t.paginationActiveClass,S.paginationContainer)){var n=S.paginationButtons;if(0!=n.length){for(var a=0;as&&(s=S.slides.length-2*S.loopedSlides+s),t.loop&&s>=S.slides.length-2*S.loopedSlides&&(s=S.slides.length-2*S.loopedSlides-s,s=Math.abs(s)),e.push(s)}for(a=0;a=-e&&-e+P>=o&&(r=!0),-e>=n&&o>=-e+P&&(r=!0)):(o>-e&&-e+P>=o&&(r=!0),n>=-e&&-e+P>n&&(r=!0),-e>n&&o>-e+P&&(r=!0)),r&&i.push(S.slides[s]); }0==i.length&&(i=[S.slides[S.activeIndex]]),S.visibleSlides=i};var z=void 0;S.startAutoplay=function(){return"undefined"!=typeof z?!1:void(t.autoplay&&(S.callPlugins("onAutoplayStart"),y()))},S.stopAutoplay=function(e){z&&clearTimeout(z),z=void 0,e&&!t.autoplayDisableOnInteraction&&S.wrapperTransitionEnd(function(){y()}),S.callPlugins("onAutoplayStop")},S.loopCreated=!1,S.removeLoopedSlides=function(){if(S.loopCreated)for(var e=0;eS.slides.length&&(S.loopedSlides=S.slides.length);var e,i="",n="",a="",o=S.slides.length,s=Math.floor(S.loopedSlides/o),r=S.loopedSlides%o;for(e=0;s*o>e;e++){var l=e;e>=o&&(l=e-o*Math.floor(e/o)),a+=S.slides[l].outerHTML}for(e=0;r>e;e++)n+=S.slides[e].outerHTML;for(e=o-r;o>e;e++)i+=S.slides[e].outerHTML;for(_.innerHTML=i+a+_.innerHTML+a+n,S.loopCreated=!0,S.calcSlides(),e=0;e=S.slides.length-S.loopedSlides)&&S.slides[e].setData("looped",!0);S.callPlugins("onCreateLoop")}},S.fixLoop=function(){var e;S.activeIndexS.slides.length-2*t.slidesPerView&&(e=-S.slides.length+S.activeIndex+S.loopedSlides,S.swipeTo(e,0,!1))},S.loadSlides=function(){var e="";S.activeLoaderIndex=0;for(var i=t.loader.slides,n=t.loader.loadAllSlides?i.length:t.slidesPerView*(1+t.loader.surroundGroups),a=0;n>a;a++)e="outer"==t.loader.slidesHTMLType?e+i[a]:e+("<"+t.slideElement+' class="'+t.slideClass+'" data-swiperindex="'+a+'">'+i[a]+"");S.wrapper.innerHTML=e,S.calcSlides(!0),t.loader.loadAllSlides||S.wrapperTransitionEnd(S.reloadSlides,!0)},S.reloadSlides=function(){var e=t.loader.slides,i=parseInt(S.activeSlide().data("swiperindex"),10);if(!(0>i||i>e.length-1)){S.activeLoaderIndex=i;var n=Math.max(0,i-t.slidesPerView*t.loader.surroundGroups),a=Math.min(i+t.slidesPerView*(1+t.loader.surroundGroups)-1,e.length-1);if(i>0&&(S.setWrapperTranslate(-T*(i-n)),S.setWrapperTransition(0)),"reload"===t.loader.logic){for(var o=S.wrapper.innerHTML="",i=n;a>=i;i++)o+="outer"==t.loader.slidesHTMLType?e[i]:"<"+t.slideElement+' class="'+t.slideClass+'" data-swiperindex="'+i+'">'+e[i]+"";S.wrapper.innerHTML=o}else{for(var o=1e3,s=0,i=0;ir||r>a?S.wrapper.removeChild(S.slides[i]):(o=Math.min(r,o),s=Math.max(r,s))}for(i=n;a>=i;i++)o>i&&(n=document.createElement(t.slideElement),n.className=t.slideClass,n.setAttribute("data-swiperindex",i),n.innerHTML=e[i],S.wrapper.insertBefore(n,S.wrapper.firstChild)),i>s&&(n=document.createElement(t.slideElement),n.className=t.slideClass,n.setAttribute("data-swiperindex",i),n.innerHTML=e[i],S.wrapper.appendChild(n))}S.reInit(!0)}},S.calcSlides(),0e}(),ie10:window.navigator.msPointerEnabled}},(window.jQuery||window.Zepto)&&function(e){e.fn.swiper=function(t){return t=new Swiper(e(this)[0],t),e(this).data("swiper",t),t}}(window.jQuery||window.Zepto),"undefined"!=typeof module&&(module.exports=Swiper),!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var s=t||window.event,r=l.call(arguments,1),c=0,h=0,u=0,p=0,f=0,g=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(u=-1*s.detail),"wheelDelta"in s&&(u=s.wheelDelta),"wheelDeltaY"in s&&(u=s.wheelDeltaY),"wheelDeltaX"in s&&(h=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(h=-1*u,u=0),c=0===u?h:u,"deltaY"in s&&(u=-1*s.deltaY,c=u),"deltaX"in s&&(h=s.deltaX,0===u&&(c=-1*h)),0!==u||0!==h){if(1===s.deltaMode){var m=e.data(this,"mousewheel-line-height");c*=m,u*=m,h*=m}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,u*=v,h*=v}if(p=Math.max(Math.abs(u),Math.abs(h)),(!o||o>p)&&(o=p,n(s,p)&&(o/=40)),n(s,p)&&(c/=40,h/=40,u/=40),c=Math[c>=1?"floor":"ceil"](c/o),h=Math[h>=1?"floor":"ceil"](h/o),u=Math[u>=1?"floor":"ceil"](u/o),d.settings.normalizeOffset&&this.getBoundingClientRect){var w=this.getBoundingClientRect();f=t.clientX-w.left,g=t.clientY-w.top}return t.deltaX=h,t.deltaY=u,t.deltaFactor=o,t.offsetX=f,t.offsetY=g,t.deltaMode=0,r.unshift(t,c,h,u),a&&clearTimeout(a),a=setTimeout(i,200),(e.event.dispatch||e.event.handle).apply(this,r)}}function i(){o=null}function n(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var a,o,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var d=e.event.special.mousewheel={version:"3.1.11",setup:function(){if(this.addEventListener)for(var i=r.length;i;)this.addEventListener(r[--i],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",d.getLineHeight(this)),e.data(this,"mousewheel-page-height",d.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=r.length;i;)this.removeEventListener(r[--i],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var i=e(t)["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),function(e,t,i){!function(e){e(jQuery)}(function(i){var n="mCustomScrollbar",a="mCS",o=".mCustomScrollbar",s={setWidth:!1,setHeight:!1,setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,autoHideScrollbar:!1,autoExpandScrollbar:!1,alwaysShowScrollbar:0,snapAmount:null,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1,disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{enable:!1,scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoExpandHorizontalScroll:!1,autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:!0,updateOnSelectorChange:!1},theme:"light",callbacks:{onScrollStart:!1,onScroll:!1,onTotalScroll:!1,onTotalScrollBack:!1,whileScrolling:!1,onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0,onOverflowY:!1,onOverflowX:!1,onOverflowYNone:!1,onOverflowXNone:!1},live:!1,liveSelector:null},r=0,l={},c=function(e){l[e]&&(clearTimeout(l[e]),p._delete.call(null,l[e]))},d=e.attachEvent&&!e.addEventListener?1:0,h=!1,u={init:function(e){var e=i.extend(!0,{},s,e),t=p._selector.call(this);if(e.live){var n=e.liveSelector||this.selector||o,d=i(n);if("off"===e.live)return void c(n);l[n]=setTimeout(function(){d.mCustomScrollbar(e),"once"===e.live&&d.length&&c(n)},500)}else c(n);return e.setWidth=e.set_width?e.set_width:e.setWidth,e.setHeight=e.set_height?e.set_height:e.setHeight,e.axis=e.horizontalScroll?"x":p._findAxis.call(null,e.axis),e.scrollInertia=e.scrollInertia>0&&e.scrollInertia<17?17:e.scrollInertia,"object"!=typeof e.mouseWheel&&1==e.mouseWheel&&(e.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),e.mouseWheel.scrollAmount=e.mouseWheelPixels?e.mouseWheelPixels:e.mouseWheel.scrollAmount,e.mouseWheel.normalizeDelta=e.advanced.normalizeMouseWheelDelta?e.advanced.normalizeMouseWheelDelta:e.mouseWheel.normalizeDelta,e.scrollButtons.scrollType=p._findScrollButtonsType.call(null,e.scrollButtons.scrollType),p._theme.call(null,e),i(t).each(function(){var t=i(this);if(!t.data(a)){t.data(a,{idx:++r,opt:e,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:t.css("direction"),cbOffsets:null,trigger:null});var n=t.data(a).opt,o=t.data("mcs-axis"),s=t.data("mcs-scrollbar-position"),l=t.data("mcs-theme");o&&(n.axis=o),s&&(n.scrollbarPosition=s),l&&(n.theme=l,p._theme.call(null,n)),p._pluginMarkup.call(this),u.update.call(null,t)}})},update:function(e){var t=e||p._selector.call(this);return i(t).each(function(){var e=i(this);if(e.data(a)){var t=e.data(a),n=t.opt,o=i("#mCSB_"+t.idx+"_container"),s=[i("#mCSB_"+t.idx+"_dragger_vertical"),i("#mCSB_"+t.idx+"_dragger_horizontal")];if(!o.length)return;t.tweenRunning&&p._stop.call(null,e),e.hasClass("mCS_disabled")&&e.removeClass("mCS_disabled"),e.hasClass("mCS_destroyed")&&e.removeClass("mCS_destroyed"),p._maxHeight.call(this),p._expandContentHorizontally.call(this),"y"===n.axis||n.advanced.autoExpandHorizontalScroll||o.css("width",p._contentWidth(o.children())),t.overflowed=p._overflowed.call(this),p._scrollbarVisibility.call(this),n.autoDraggerLength&&p._setDraggerLength.call(this),p._scrollRatio.call(this),p._bindEvents.call(this);var r=[Math.abs(o[0].offsetTop),Math.abs(o[0].offsetLeft)];"x"!==n.axis&&(t.overflowed[0]?s[0].height()>s[0].parent().height()?p._resetContentPosition.call(this):(p._scrollTo.call(this,e,r[0].toString(),{dir:"y",dur:0,overwrite:"none"}),t.contentReset.y=null):(p._resetContentPosition.call(this),"y"===n.axis?p._unbindEvents.call(this):"yx"===n.axis&&t.overflowed[1]&&p._scrollTo.call(this,e,r[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==n.axis&&(t.overflowed[1]?s[1].width()>s[1].parent().width()?p._resetContentPosition.call(this):(p._scrollTo.call(this,e,r[1].toString(),{dir:"x",dur:0,overwrite:"none"}),t.contentReset.x=null):(p._resetContentPosition.call(this),"x"===n.axis?p._unbindEvents.call(this):"yx"===n.axis&&t.overflowed[0]&&p._scrollTo.call(this,e,r[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),p._autoUpdate.call(this)}})},scrollTo:function(e,t){if("undefined"!=typeof e&&null!=e){var n=p._selector.call(this);return i(n).each(function(){var n=i(this);if(n.data(a)){var o=n.data(a),s=o.opt,r={trigger:"external",scrollInertia:s.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},l=i.extend(!0,{},r,t),c=p._arr.call(this,e),d=l.scrollInertia>0&&l.scrollInertia<17?17:l.scrollInertia;c[0]=p._to.call(this,c[0],"y"),c[1]=p._to.call(this,c[1],"x"),l.moveDragger&&(c[0]*=o.scrollRatio.y,c[1]*=o.scrollRatio.x),l.dur=d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==s.axis&&o.overflowed[0]&&(l.dir="y",l.overwrite="all",p._scrollTo.call(this,n,c[0].toString(),l)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==s.axis&&o.overflowed[1]&&(l.dir="x",l.overwrite="none",p._scrollTo.call(this,n,c[1].toString(),l))},l.timeout)}})}},stop:function(){var e=p._selector.call(this);return i(e).each(function(){var e=i(this);e.data(a)&&p._stop.call(null,e)})},disable:function(e){var t=p._selector.call(this);return i(t).each(function(){var t=i(this);if(t.data(a)){var n=t.data(a);n.opt;p._autoUpdate.call(this,"remove"),p._unbindEvents.call(this),e&&p._resetContentPosition.call(this),p._scrollbarVisibility.call(this,!0),t.addClass("mCS_disabled")}})},destroy:function(){var e=p._selector.call(this);return i(e).each(function(){var t=i(this);if(t.data(a)){var o=t.data(a),s=o.opt,r=i("#mCSB_"+o.idx),l=i("#mCSB_"+o.idx+"_container"),d=i(".mCSB_"+o.idx+"_scrollbar");s.live&&c(e),p._autoUpdate.call(this,"remove"),p._unbindEvents.call(this),p._resetContentPosition.call(this),t.removeData(a),p._delete.call(null,this.mcs),d.remove(),r.replaceWith(l.contents()),t.removeClass(n+" _"+a+"_"+o.idx+" mCS-autoHide mCS-dir-rtl mCS_no_scrollbar mCS_disabled").addClass("mCS_destroyed")}})}},p={_selector:function(){return"object"!=typeof i(this)||i(this).length<1?o:this},_theme:function(e){var t=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],n=["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"],a=["minimal","minimal-dark"],o=["minimal","minimal-dark"],s=["minimal","minimal-dark"];e.autoDraggerLength=i.inArray(e.theme,t)>-1?!1:e.autoDraggerLength,e.autoExpandScrollbar=i.inArray(e.theme,n)>-1?!1:e.autoExpandScrollbar,e.scrollButtons.enable=i.inArray(e.theme,a)>-1?!1:e.scrollButtons.enable,e.autoHideScrollbar=i.inArray(e.theme,o)>-1?!0:e.autoHideScrollbar,e.scrollbarPosition=i.inArray(e.theme,s)>-1?"outside":e.scrollbarPosition},_findAxis:function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},_findScrollButtonsType:function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},_pluginMarkup:function(){var e=i(this),t=e.data(a),o=t.opt,s=o.autoExpandScrollbar?" mCSB_scrollTools_onDrag_expand":"",r=["
      ","
      "],l="yx"===o.axis?"mCSB_vertical_horizontal":"x"===o.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===o.axis?r[0]+r[1]:"x"===o.axis?r[1]:r[0],d="yx"===o.axis?"
      ":"",h=o.autoHideScrollbar?" mCS-autoHide":"",u="x"!==o.axis&&"rtl"===t.langDir?" mCS-dir-rtl":"";o.setWidth&&e.css("width",o.setWidth),o.setHeight&&e.css("height",o.setHeight),o.setLeft="y"!==o.axis&&"rtl"===t.langDir?"989999px":o.setLeft,e.addClass(n+" _"+a+"_"+t.idx+h+u).wrapInner("
      ");var f=i("#mCSB_"+t.idx),g=i("#mCSB_"+t.idx+"_container");"y"===o.axis||o.advanced.autoExpandHorizontalScroll||g.css("width",p._contentWidth(g.children())),"outside"===o.scrollbarPosition?("static"===e.css("position")&&e.css("position","relative"),e.css("overflow","visible"),f.addClass("mCSB_outside").after(c)):(f.addClass("mCSB_inside").append(c),g.wrap(d)),p._scrollButtons.call(this);var m=[i("#mCSB_"+t.idx+"_dragger_vertical"),i("#mCSB_"+t.idx+"_dragger_horizontal")];m[0].css("min-height",m[0].height()),m[1].css("min-width",m[1].width())},_contentWidth:function(e){return Math.max.apply(Math,e.map(function(){return i(this).outerWidth(!0)}).get())},_expandContentHorizontally:function(){var e=i(this),t=e.data(a),n=t.opt,o=i("#mCSB_"+t.idx+"_container");n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis&&o.css({position:"absolute",width:"auto"}).wrap("
      ").css({width:Math.ceil(o[0].getBoundingClientRect().right+.4)-Math.floor(o[0].getBoundingClientRect().left),position:"relative"}).unwrap()},_scrollButtons:function(){var e=i(this),t=e.data(a),n=t.opt,o=i(".mCSB_"+t.idx+"_scrollbar:first"),s=["","","",""],r=["x"===n.axis?s[2]:s[0],"x"===n.axis?s[3]:s[1],s[2],s[3]];n.scrollButtons.enable&&o.prepend(r[0]).append(r[1]).next(".mCSB_scrollTools").prepend(r[2]).append(r[3])},_maxHeight:function(){var e=i(this),t=e.data(a),n=(t.opt,i("#mCSB_"+t.idx)),o=e.css("max-height"),s=-1!==o.indexOf("%"),r=e.css("box-sizing");if("none"!==o){var l=s?e.parent().height()*parseInt(o)/100:parseInt(o);"border-box"===r&&(l-=e.innerHeight()-e.height()+(e.outerHeight()-e.innerHeight())),n.css("max-height",Math.round(l))}},_setDraggerLength:function(){var e=i(this),t=e.data(a),n=i("#mCSB_"+t.idx),o=i("#mCSB_"+t.idx+"_container"),s=[i("#mCSB_"+t.idx+"_dragger_vertical"),i("#mCSB_"+t.idx+"_dragger_horizontal")],r=[n.height()/o.outerHeight(!1),n.width()/o.outerWidth(!1)],l=[parseInt(s[0].css("min-height")),Math.round(r[0]*s[0].parent().height()),parseInt(s[1].css("min-width")),Math.round(r[1]*s[1].parent().width())],c=d&&l[1]n.height(),r>n.width()]},_resetContentPosition:function(){var e=i(this),t=e.data(a),n=t.opt,o=i("#mCSB_"+t.idx),s=i("#mCSB_"+t.idx+"_container"),r=[i("#mCSB_"+t.idx+"_dragger_vertical"),i("#mCSB_"+t.idx+"_dragger_horizontal")];if(p._stop(e),("x"!==n.axis&&!t.overflowed[0]||"y"===n.axis&&t.overflowed[0])&&(r[0].add(s).css("top",0),p._scrollTo(e,"_resetY")),"y"!==n.axis&&!t.overflowed[1]||"x"===n.axis&&t.overflowed[1]){var l=dx=0;"rtl"===t.langDir&&(l=o.width()-s.outerWidth(!1),dx=Math.abs(l/t.scrollRatio.x)),s.css("left",l),r[1].css("left",dx),p._scrollTo(e,"_resetX")}},_bindEvents:function(){function e(){s=setTimeout(function(){i.event.special.mousewheel?(clearTimeout(s),p._mousewheel.call(t[0])):e()},1e3)}var t=i(this),n=t.data(a),o=n.opt;if(!n.bindEvents){if(p._draggable.call(this),o.contentTouchScroll&&p._contentDraggable.call(this),o.mouseWheel.enable){var s;e()}p._draggerRail.call(this),p._wrapperScroll.call(this),o.advanced.autoScrollOnFocus&&p._focus.call(this),o.scrollButtons.enable&&p._buttons.call(this),o.keyboard.enable&&p._keyboard.call(this),n.bindEvents=!0}},_unbindEvents:function(){var e=i(this),n=e.data(a),o=a+"_"+n.idx,s=".mCSB_"+n.idx+"_scrollbar",r=i("#mCSB_"+n.idx+",#mCSB_"+n.idx+"_container,#mCSB_"+n.idx+"_container_wrapper,"+s+" .mCSB_draggerContainer,#mCSB_"+n.idx+"_dragger_vertical,#mCSB_"+n.idx+"_dragger_horizontal,"+s+">a"),l=i("#mCSB_"+n.idx+"_container");n.bindEvents&&(i(t).unbind("."+o),r.each(function(){i(this).unbind("."+o)}),clearTimeout(e[0]._focusTimeout),p._delete.call(null,e[0]._focusTimeout),clearTimeout(n.sequential.step),p._delete.call(null,n.sequential.step),clearTimeout(l[0].onCompleteTimeout),p._delete.call(null,l[0].onCompleteTimeout),n.bindEvents=!1)},_scrollbarVisibility:function(e){var t=i(this),n=t.data(a),o=n.opt,s=i("#mCSB_"+n.idx+"_container_wrapper"),r=s.length?s:i("#mCSB_"+n.idx+"_container"),l=[i("#mCSB_"+n.idx+"_scrollbar_vertical"),i("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[l[0].find(".mCSB_dragger"),l[1].find(".mCSB_dragger")];"x"!==o.axis&&(n.overflowed[0]&&!e?(l[0].add(c[0]).add(l[0].children("a")).css("display","block"),r.removeClass("mCS_no_scrollbar_y mCS_y_hidden")):(o.alwaysShowScrollbar?(2!==o.alwaysShowScrollbar&&c[0].add(l[0].children("a")).css("display","none"),r.removeClass("mCS_y_hidden")):(l[0].css("display","none"),r.addClass("mCS_y_hidden")),r.addClass("mCS_no_scrollbar_y"))),"y"!==o.axis&&(n.overflowed[1]&&!e?(l[1].add(c[1]).add(l[1].children("a")).css("display","block"),r.removeClass("mCS_no_scrollbar_x mCS_x_hidden")):(o.alwaysShowScrollbar?(2!==o.alwaysShowScrollbar&&c[1].add(l[1].children("a")).css("display","none"),r.removeClass("mCS_x_hidden")):(l[1].css("display","none"),r.addClass("mCS_x_hidden")),r.addClass("mCS_no_scrollbar_x"))),n.overflowed[0]||n.overflowed[1]?t.removeClass("mCS_no_scrollbar"):t.addClass("mCS_no_scrollbar")},_coordinates:function(e){var t=e.type;switch(t){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return[e.originalEvent.pageY,e.originalEvent.pageX];case"touchstart":case"touchmove":case"touchend":var i=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];return[i.pageY,i.pageX];default:return[e.pageY,e.pageX]}},_draggable:function(){function e(e){var t=m.find("iframe");if(t.length){var i=e?"auto":"none";t.css("pointer-events",i)}}function n(e,t,i,n){if(m[0].idleTimer=u.scrollInertia<233?250:0,o.attr("id")===g[1])var a="x",s=(o[0].offsetLeft-t+n)*c.scrollRatio.x;else var a="y",s=(o[0].offsetTop-e+i)*c.scrollRatio.y;p._scrollTo(l,s.toString(),{dir:a,drag:!0})}var o,s,r,l=i(this),c=l.data(a),u=c.opt,f=a+"_"+c.idx,g=["mCSB_"+c.idx+"_dragger_vertical","mCSB_"+c.idx+"_dragger_horizontal"],m=i("#mCSB_"+c.idx+"_container"),v=i("#"+g[0]+",#"+g[1]);v.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(n){if(n.stopImmediatePropagation(),n.preventDefault(),p._mouseBtnLeft(n)){h=!0,d&&(t.onselectstart=function(){return!1}),e(!1),p._stop(l),o=i(this);var a=o.offset(),c=p._coordinates(n)[0]-a.top,f=p._coordinates(n)[1]-a.left,g=o.height()+a.top,m=o.width()+a.left;g>c&&c>0&&m>f&&f>0&&(s=c,r=f),p._onDragClasses(o,"active",u.autoExpandScrollbar)}}).bind("touchmove."+f,function(e){e.stopImmediatePropagation(),e.preventDefault();var t=o.offset(),i=p._coordinates(e)[0]-t.top,a=p._coordinates(e)[1]-t.left;n(s,r,i,a)}),i(t).bind("mousemove."+f+" pointermove."+f+" MSPointerMove."+f,function(e){if(o){var t=o.offset(),i=p._coordinates(e)[0]-t.top,a=p._coordinates(e)[1]-t.left;if(s===i)return;n(s,r,i,a)}}).add(v).bind("mouseup."+f+" touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(i){o&&(p._onDragClasses(o,"active",u.autoExpandScrollbar),o=null),h=!1,d&&(t.onselectstart=null),e(!0)})},_contentDraggable:function(){function e(e,t){var i=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?i[0]:i[3]:e>60?t>3?i[3]:i[2]:e>30?t>8?i[1]:t>6?i[0]:t>4?t:i[2]:t>8?t:i[3]}function t(e,t,i,n,a,o){e&&p._scrollTo(v,e.toString(),{dur:t,scrollEasing:i,dir:n,overwrite:a,drag:o})}var n,o,s,r,l,c,d,u,f,g,m,v=i(this),w=v.data(a),b=w.opt,x=a+"_"+w.idx,y=i("#mCSB_"+w.idx),C=i("#mCSB_"+w.idx+"_container"),S=[i("#mCSB_"+w.idx+"_dragger_vertical"),i("#mCSB_"+w.idx+"_dragger_horizontal")],_=[],T=[],k=0,E="yx"===b.axis?"none":"all";C.bind("touchstart."+x+" pointerdown."+x+" MSPointerDown."+x,function(e){if(p._pointerTouch(e)&&!h){var t=C.offset();n=p._coordinates(e)[0]-t.top,o=p._coordinates(e)[1]-t.left}}).bind("touchmove."+x+" pointermove."+x+" MSPointerMove."+x,function(e){if(p._pointerTouch(e)&&!h){e.stopImmediatePropagation(),c=p._getTime();var i=y.offset(),a=p._coordinates(e)[0]-i.top,s=p._coordinates(e)[1]-i.left,r="mcsLinearOut";if(_.push(a),T.push(s),w.overflowed[0])var l=S[0].parent().height()-S[0].height(),d=n-a>0&&a-n>-(l*w.scrollRatio.y);if(w.overflowed[1])var u=S[1].parent().width()-S[1].width(),f=o-s>0&&s-o>-(u*w.scrollRatio.x);(d||f)&&e.preventDefault(),g="yx"===b.axis?[n-a,o-s]:"x"===b.axis?[null,o-s]:[n-a,null],C[0].idleTimer=250,w.overflowed[0]&&t(g[0],k,r,"y","all",!0),w.overflowed[1]&&t(g[1],k,r,"x",E,!0)}}),y.bind("touchstart."+x+" pointerdown."+x+" MSPointerDown."+x,function(e){if(p._pointerTouch(e)&&!h){e.stopImmediatePropagation(),p._stop(v),l=p._getTime();var t=y.offset();s=p._coordinates(e)[0]-t.top,r=p._coordinates(e)[1]-t.left,_=[],T=[]}}).bind("touchend."+x+" pointerup."+x+" MSPointerUp."+x,function(i){if(p._pointerTouch(i)&&!h){i.stopImmediatePropagation(),d=p._getTime();var n=y.offset(),a=p._coordinates(i)[0]-n.top,o=p._coordinates(i)[1]-n.left;if(!(d-c>30)){f=1e3/(d-l);var v="mcsEaseOut",x=2.5>f,S=x?[_[_.length-2],T[T.length-2]]:[0,0];u=x?[a-S[0],o-S[1]]:[a-s,o-r];var k=[Math.abs(u[0]),Math.abs(u[1])];f=x?[Math.abs(u[0]/4),Math.abs(u[1]/4)]:[f,f];var M=[Math.abs(C[0].offsetTop)-u[0]*e(k[0]/f[0],f[0]),Math.abs(C[0].offsetLeft)-u[1]*e(k[1]/f[1],f[1])];g="yx"===b.axis?[M[0],M[1]]:"x"===b.axis?[null,M[1]]:[M[0],null],m=[4*k[0]+b.scrollInertia,4*k[1]+b.scrollInertia];var P=parseInt(b.contentTouchScroll)||0;g[0]=k[0]>P?g[0]:0,g[1]=k[1]>P?g[1]:0,w.overflowed[0]&&t(g[0],m[0],v,"y",E,!1),w.overflowed[1]&&t(g[1],m[1],v,"x",E,!1)}}})},_mousewheel:function(){function e(e){var t=null;try{var i=e.contentDocument||e.contentWindow.document;t=i.body.innerHTML}catch(n){}return null!==t}var t=i(this),n=t.data(a);if(n){var o=n.opt,s=a+"_"+n.idx,r=i("#mCSB_"+n.idx),l=[i("#mCSB_"+n.idx+"_dragger_vertical"),i("#mCSB_"+n.idx+"_dragger_horizontal")],c=i("#mCSB_"+n.idx+"_container").find("iframe"),h=r; diff --git a/templates/client/includes/place/place_info.html b/templates/client/includes/place/place_info.html deleted file mode 100644 index dc129a3d..00000000 --- a/templates/client/includes/place/place_info.html +++ /dev/null @@ -1,86 +0,0 @@ -{% load i18n %} -{% load template_filters %} - -
      - - {% if place.place == 'place_exposition' %} - {% if place.total_area %} -
      -
      {% trans 'Общая выставочная площадь' %}
      -
      {{ place.total_area|int_format }} м²
      -
      - {% endif %} - {% else %} - {% comment %} - {% if place.total_capacity %} -
      -
      {% trans 'Общая вместимость' %}
      -
      {{ place.total_capacity|int_format }}
      -
      - {% endif %} - {% endcomment %} - {% endif %} - -
      - {% if place.closed_area %} -
      - {{ place.closed_area|int_format }} {% trans 'м²' %} - {% trans 'закрытая выставочная площадь' %} -
      - {% endif %} - {% if place.open_area %} -
      - {{ place.open_area|int_format }} {% trans 'м²' %} - {% trans 'открытая выставочная площадь' %} -
      - {% endif %} -
      -
      -
      -
        - {% for hall in place.halls.all %} - {% if not forloop.counter|divisibleby:"2" %} -
      • {{ hall.name }} {% if hall.number %} №{{ hall.number }} {% endif %} — {{ hall.capacity }} м2
      • - {% endif %} - {% endfor %} -
      -
      -
      -
        - {% for hall in place.halls.all %} - {% if forloop.counter|divisibleby:"2" %} -
      • {{ hall.name }} {% if hall.number %} №{{ hall.number }} {% endif %} — {{ hall.capacity }} м2
      • - {% endif %} - {% endfor %} -
      -
      -
      - - {% if place.total_year_action %} -
      -
      - {% trans 'Ежегодно проводится' %} -
      -
      - {% if place.total_year_action.isdigit %} - {% ifequal LANGUAGE_CODE 'ru' %} - {% load pymorphy_tags %} - {{ place.total_year_action }} - {{ "событие"|plural:place.total_year_action }} - {% else %} - {{ place.total_year_action }} - {% trans 'событий' %} - {% endifequal %} - - {% else %} - {{ place.total_year_action }} - {% endif %} -
      -
      - {% endif %} - {% if place.foundation_year %} -
      -
      {% trans 'Основано в' %} {{ place.foundation_year }} {% trans 'году' %}
      -
      - {% endif %} -
      \ No newline at end of file diff --git a/templates/client/includes/place/place_object.html b/templates/client/includes/place/place_object.html deleted file mode 100644 index 0ace3dce..00000000 --- a/templates/client/includes/place/place_object.html +++ /dev/null @@ -1,241 +0,0 @@ -{% load static %} -{% load i18n %} -{% load template_filters %} -{% block page_body %} -
      - - {% include 'client/includes/place/place_services.html' with place=place %} -
      - {% if place.photogallery %} - {% with photos=place.photogallery.photos.all|slice:"5" %} -
      -

      {% trans 'Фотогалерея' %}

      - -
      - {% endwith %} - {% endif %} - - {% include 'client/includes/place/place_info.html' with place=place %} - - {% if place.get_scheme %} -
      -
      -

      {% trans 'Схема павильонов' %}

      - {% for scheme in place.get_scheme %} - {% ifequal scheme.file_path.url|slice:"-3:" 'pdf' %} - {% trans 'Схема в pdf' %} - {% else %} -
      - {% endifequal %} -
      - {% endfor %} -
      - {% endif %} -
      -

      {% trans 'Контактная информация' %}

      -
      -
      -
      {{ place.adress }}
      - -
      -
      -
        - {% if place.phone %} -
      • {{ place.phone|phone }} ({% trans 'телефон' %})
      • - {% endif %} - {% if place.fax %} -
      • {{ place.fax|phone }} ({% trans 'факс' %})
      • - {% endif %} -
      -
      -
      -
      - - {% if place.events %} -
      -

      {% trans 'Список событий' %}

      - -
      - {% endif %} -
      - {% include 'client/includes/booking_block.html' with city=place.city place=place %} -
      -
      -
      - {% include 'client/includes/banners/detail_inner.html' %} -
      - {% if place.get_nearest_places %} -
      -

      {% trans 'Ближайшие выставочные центры' %}

      - -
      - {% endif %} - {% include 'client/includes/banners/detail_inner_3.html' %} -
      -{% endblock %} - -{% block scripts %} -{% if request.GET.debug == '1' %} - -{% else %} - -{% endif %} - -{% endblock %} diff --git a/templates/client/place/place_detail.html b/templates/client/place/place_detail.html index 923bf6de..77fa4715 100644 --- a/templates/client/place/place_detail.html +++ b/templates/client/place/place_detail.html @@ -1,4 +1,4 @@ -{% extends 'base_catalog.html' %} +{% extends 'client/base_catalog.html' %} {% load i18n static %} {% load template_filters %} @@ -17,270 +17,354 @@ {% block content_list %} +
      +
      + - {% block page_body %} -
      -
      - - -
      -
      -

      {{ object.name|safe }}

      +
      +
      +

      {{ object.name|safe }}

      -
      - {{ object.description.strip|safe|linebreaks|truncatewords:20 }} -
      +
      + {{ object.description.strip|safe|linebreaks|truncatechars:1500 }} +
      + {% if object.description.strip|linebreaks|length|str_to_int > 1500 %} {% trans 'Далее...' %} + {% endif %} - {% if object.address %} -
      -
      -
      - {{ object.adress }} -
      - -
      -
      - - -
      + {% if object.address %} +
      +
      +
      + {{ object.adress }}
      + +
      + - {% else %} -
      - {% endif %} -
      +
      + {% else %} +
      + {% endif %}
      +
      - {% include 'client/includes/place/place_services.html' with place=object %} - -
      - {% if object.photogallery %} - {% with photos=object.photogallery.photos.all|slice:"5" %} -
      -

      {% trans 'Фотогалерея' %}

      -