Version Description
- Fixed - AJAX was not working since last plugin version.
Download this release
Release Info
Developer | vinod dalvi |
Plugin | Ivory Search – WordPress Search Plugin |
Version | 4.6.4 |
Comparing to | |
See all releases |
Code changes from version 4.6.3 to 4.6.4
- add-search-to-menu.php +2 -2
- public/js/ivory-ajax-search.min.js +1 -1
- public/js/ivory-search.min.js +1 -1
- readme.txt +7 -3
add-search-to-menu.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Ivory Search
|
4 |
* Plugin URI: https://ivorysearch.com
|
5 |
* Description: The WordPress Search plugin that includes Search Form Customizer, WooCommerce Search, Image Search, Search Shortcode, AJAX Search & Live Search support!
|
6 |
-
* Version: 4.6.
|
7 |
* Author: Ivory Search
|
8 |
* Author URI: https://ivorysearch.com/
|
9 |
* License: GPL2+
|
@@ -108,7 +108,7 @@ final class Ivory_Search {
|
|
108 |
private function define_constants() {
|
109 |
|
110 |
if ( ! defined( 'IS_VERSION' ) ) {
|
111 |
-
define( 'IS_VERSION', '4.6.
|
112 |
}
|
113 |
if ( ! defined( 'IS_PLUGIN_FILE' ) ) {
|
114 |
define( 'IS_PLUGIN_FILE', __FILE__ );
|
3 |
* Plugin Name: Ivory Search
|
4 |
* Plugin URI: https://ivorysearch.com
|
5 |
* Description: The WordPress Search plugin that includes Search Form Customizer, WooCommerce Search, Image Search, Search Shortcode, AJAX Search & Live Search support!
|
6 |
+
* Version: 4.6.4
|
7 |
* Author: Ivory Search
|
8 |
* Author URI: https://ivorysearch.com/
|
9 |
* License: GPL2+
|
108 |
private function define_constants() {
|
109 |
|
110 |
if ( ! defined( 'IS_VERSION' ) ) {
|
111 |
+
define( 'IS_VERSION', '4.6.4' );
|
112 |
}
|
113 |
if ( ! defined( 'IS_PLUGIN_FILE' ) ) {
|
114 |
define( 'IS_PLUGIN_FILE', __FILE__ );
|
public/js/ivory-ajax-search.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function ivory_search_analytics(s,e,i){try{var t="function"==typeof __gaTracker?__gaTracker:"function"==typeof ga&&ga,a="function"==typeof gtag&>ag;if(!1!==a)return void a("event","Ivory Search - "+s,{event_label:e,event_category:i});!1!==t&&t("send",{hitType:"event",eventCategory:i,eventAction:"Ivory Search - "+s,eventLabel:e})}catch(s){}}!function(s){"use strict";s(window).on("load",function(){(s(".is-menu a, .is-menu a svg").on("click",function(e){if(e.stopPropagation(),e.preventDefault(),"static"===s(this).closest("ul").css("position")&&s(this).closest("ul").css("position","relative"),s(this).closest(".is-menu-wrapper").length&&(s(this).closest(".is-menu").hasClass("sliding")||s(this).closest(".is-menu").hasClass("full-width-menu"))&&s(this).closest(".is-menu-wrapper").addClass("is-expanded"),s(this).closest(".is-menu").hasClass("sliding")||s(this).closest(".is-menu").hasClass("full-width-menu")){s(this).closest(".is-menu").find("button.is-search-submit").hide();var i=s(this).closest("li.is-menu").outerHeight();i/=2,s(this).closest(".is-menu").find("form").css({top:i-18+"px"}),s(this).closest(".is-menu").find(".search-close").css({top:i-10+"px"})}if(s(this).closest(".is-menu").hasClass("is-dropdown"))s(this).closest(".is-menu").find("form").fadeIn();else if(s(this).closest(".is-menu").hasClass("sliding"))s(this).closest(".is-menu").find("form").animate({width:"310"},function(){s(this).closest(".is-menu").addClass("open"),s(this).closest(".is-menu").find("button.is-search-submit").show()});else if(s(this).closest(".is-menu").hasClass("full-width-menu")){var t=s(this).closest("ul").outerWidth();if(s(this).closest(".is-menu-wrapper").hasClass("is-expanded"))t=s(window).width(),s(this).closest(".is-menu").find("form").css("right","-5px"),s(this).closest(".is-menu").find(".search-close").hide();else{var a=s(this).offset();if(!s(this).closest(".is-menu").hasClass("is-first")&&a.left<t){t=a.left;var n=s(this).closest("li").outerWidth();n>t&&(t=n)}}s(this).closest(".is-menu").find("form").animate({width:t+"px"},function(){s(this).closest(".is-menu").addClass("active-search"),s(this).closest(".is-menu").addClass("open"),s(this).closest(".is-menu").find("button.is-search-submit").show()})}else s(this).closest(".is-menu").hasClass("popup")&&(s("#is-popup-wrapper").fadeIn(),s('#is-popup-wrapper form input[type="text"], #is-popup-wrapper form input[type="search"]').focus());(s(this).closest(".is-menu").hasClass("sliding")||s(this).closest(".is-menu").hasClass("full-width-menu"))&&s(this).closest(".is-menu").find('form input[type="search"], form input[type="text"]').focus(),s(this).closest(".is-menu").find('form input[type="search"], form input[type="text"]').focus()}),s("#is-popup-wrapper").on("click",function(e){s(e.target).closest("form").length||s("#is-popup-wrapper, .is-ajax-search-result, .is-ajax-search-details").fadeOut()}),"undefined"!=typeof IvorySearchVars&&void 0!==IvorySearchVars.is_analytics_enabled)&&ivory_search_analytics(void 0!==IvorySearchVars.is_id?IvorySearchVars.is_id:"Default",void 0!==IvorySearchVars.is_label?IvorySearchVars.is_label:"",void 0!==IvorySearchVars.is_cat?IvorySearchVars.is_cat:"");window.matchMedia("(max-width: 1024px)").matches&&s(".is-menu a").attr("href",""),s(window).resize(function(){window.matchMedia("(max-width: 1024px)").matches&&s(".is-menu a").attr("href","")})}),s(document).keyup(function(e){27===e.keyCode&&s("#is-popup-wrapper, .is-ajax-search-result, .is-ajax-search-details").hide()}),s('.is-menu form input[type="search"], .is-menu form input[type="text"]').on("click",function(s){return s.stopPropagation(),!1}),s("form.is-search-form, form.search-form").on("mouseover",function(e){s(this).next(".is-link-container").length&&s(this).append(s(this).next(".is-link-container").remove())}),s(window).click(function(e){0===e.button&&0===s(e.target).closest(".is-search-input").length&&0===s(e.target).closest(".is-search-submit").length&&0===s(e.target).closest(".is-ajax-search-result").length&&0===s(e.target).closest(".is-ajax-search-details").length&&(s(".is-menu").hasClass("open")?(s(".is-menu button.is-search-submit").hide(),s(".is-menu form").animate({width:"0"},400,function(){s(".is-menu").removeClass("active-search"),s(".is-menu").removeClass("open"),s(".is-menu-wrapper").removeClass("is-expanded")}),s(".is-ajax-search-result, .is-ajax-search-details").hide()):s(".is-menu").hasClass("is-dropdown")&&(s(".is-menu form").fadeOut(),s(".is-ajax-search-result, .is-ajax-search-details").hide()))})}(jQuery);
|
1 |
+
!function(e){"use strict";e(document).ready(function(){var t,a=null,i="",o=-1,s=e(document.activeElement).closest("form");function n(a,s){s||(s=1);var n=e(a),r=n.val()||"",l=n.parents(".is-ajax-search"),c=l.attr("data-min-no-for-search")||"",d=l.attr("data-result-box-max-height")||"400",h=e(l).attr("data-form-id");if(e(".is-form-id-"+h+" .is-search-input").val(r),""===i||i!==r.trim()||o!==h)i=r.trim(),o=h;else if(1===s)return void e("#is-ajax-search-result-"+h).show();if(1===s&&l.addClass("processing"),r.length>=c){if(1===s){if(e("#is-ajax-search-result-"+h+", #is-ajax-search-details-"+h).hide(),l.hasClass("is-form-style-1")){var u=l.find(".is-search-submit").outerWidth()+5;l.find(".is-loader-image").css("right",u+"px")}l.find(".is-loader-image").show()}var f={action:"is_ajax_load_posts",page:s,security:IvoryAjaxVars.ajax_nonce},m=l.serialize()+"&"+e.param(f);0===l.find('input[name="id"]').length&&(m+="&id="+h),t&&4!==t.readystate&&t.abort(),t=e.ajax({url:IvoryAjaxVars.ajaxurl,data:m,type:"POST",success:function(t){if("undefined"!=typeof IvorySearchVars&&void 0!==IvorySearchVars.is_analytics_enabled){var a=e(t).find(".is-ajax-search-no-result").length?"Nothing Found":"Results Found";ivory_search_analytics(h,r,a)}if(l.find(".is-loader-image").hide(),l.removeClass("processing"),1===s){var i=l.offset(),o=l.innerHeight(),n=l.outerWidth();n=n<500?500:n,0===e("#is-ajax-search-result-"+h).length&&e("body").append('<div id="is-ajax-search-result-'+h+'" class="is-ajax-search-result"></div>'),e("#is-ajax-search-result-"+h).css({width:n-10+"px"});var c=e("#is-ajax-search-result-"+h).outerWidth(),u=e(window).width(),f=0;if(i.left+c>u&&(f=i.left+c-u),e("#is-ajax-search-result-"+h).css({top:i.top+o+"px",left:i.left-f+"px",width:n-10+"px"}),e("#is-ajax-search-result-"+h).show().html(t),0!==e("#is-ajax-search-details-"+h).length&&e("body > #is-ajax-search-details-"+h).remove(),0!==e("#is-ajax-search-result-"+h+" .is-ajax-search-details").length){e("body").append('<div id="is-ajax-search-details-'+h+'" class="is-ajax-search-details">'+e("#is-ajax-search-result-"+h+" .is-ajax-search-details").html()+"</div>"),e("#is-ajax-search-result-"+h+" .is-ajax-search-details").remove();var m=e("#is-ajax-search-details-"+h).outerWidth(),p=i.left+c;if(i.left+c+m>u+30){var g=i.left-(f+m);g>-30&&(p=g)}e("#is-ajax-search-details-"+h).css({top:i.top+o+"px",left:p+"px"})}}else e("#is-ajax-search-result-"+h+" .is-show-more-results").remove(),e("#is-ajax-search-result-"+h+" .is-ajax-search-posts").append(t),0!==e("#is-ajax-search-result-"+h+" .is-ajax-search-posts .is-show-more-results").length&&(e("#is-ajax-search-result-"+h).append(e("#is-ajax-search-result-"+h+" .is-ajax-search-posts .is-show-more-results")[0].outerHTML),e("#is-ajax-search-result-"+h+" .is-ajax-search-posts .is-show-more-results").remove()),e("#is-ajax-search-details-"+h+" .is-ajax-search-posts-details").append(e("#is-ajax-search-result-"+h+" .is-ajax-search-items .is-ajax-search-posts-details").html()),e("#is-ajax-search-result-"+h+" .is-ajax-search-items .is-ajax-search-details").remove();var x=r.trim().split(" ");if(0!=x.length&&e.isFunction(e.fn.is_highlight)){var v,w,_,S=[".is-ajax-search-result"],b=jQuery.support.opacity?"mark":"span";for(_ in S)if(0!=(v=e(S[_])).length){for(w in x)v.is_highlight(x[w],b,"is-highlight term-"+w),v.find("*").is_highlight(x[w],b,"is-highlight term-"+w);break}}e("#is-ajax-search-result-"+h+" .is-ajax-search-items, #is-ajax-search-details-"+h+" .is-ajax-search-items").css("max-height",d+"px"),e.mCustomScrollbar.defaults.scrollButtons.enable=!0,e("#is-ajax-search-result-"+h+" .is-ajax-search-items, #is-ajax-search-details-"+h+" .is-ajax-search-items").mCustomScrollbar({theme:"dark-thick"}),e(".is-ajax-search-result .is-ajax-search-post a").on("click",function(t){e("#is-popup-wrapper, .is-ajax-search-result, .is-ajax-search-details").fadeOut("slow")})},error:function(e,t,a){console.log(e.statusText),"abort"!==e.statusText&&console.log("AJAX request aborted")}})}else e("#is-ajax-search-result-"+h).hide(),l.removeClass("processing")}e("body").on("mouseover",".is-ajax-search-tags > div, .is-ajax-search-categories > div, .is-ajax-search-post.is-product",function(t){var a=e(window).outerWidth();if(parseInt(a)>=910){var i=e(this).attr("data-id")||"",o=e(t.target).closest(".is-ajax-search-result").attr("id").split(/[-]+/).pop(),s=e("#is-ajax-search-result-"+o).offset(),n=e(".is-form-id-"+o).attr("data-result-box-max-height")||"400";e("#is-ajax-search-details-"+o).css({top:s.top+"px"}),e("#is-ajax-search-details-"+o+" .is-ajax-search-items").css("height",n+"px"),e("#is-ajax-search-details-"+o+" .mCSB_container > div").css("min-height",n+"px"),e(this).parents("div").hasClass("is-ajax-search-tags")&&e("#is-ajax-search-details-"+o+" .is-ajax-search-tags-details").length&&e("#is-ajax-search-details-"+o+' .is-ajax-search-tags-details > div[data-id="'+i+'"]').length?(e("#is-ajax-search-details-"+o+" .is-ajax-search-tags-details, #is-ajax-search-details-"+o).show(),e("#is-ajax-search-details-"+o+" .is-ajax-search-categories-details, #is-ajax-search-details-"+o+" .is-ajax-search-posts-details").hide(),e("#is-ajax-search-details-"+o+" .is-ajax-search-tags-details").find(" > div ").hide(),e("#is-ajax-search-details-"+o+" .is-ajax-search-tags-details").find(' > div[data-id="'+i+'"] ').show()):e(this).parents("div").hasClass("is-ajax-search-categories")&&e("#is-ajax-search-details-"+o+" .is-ajax-search-categories-details").length&&e("#is-ajax-search-details-"+o+' .is-ajax-search-categories-details > div[data-id="'+i+'"]').length?(e("#is-ajax-search-details-"+o+" .is-ajax-search-categories-details, #is-ajax-search-details-"+o).show(),e("#is-ajax-search-details-"+o+" .is-ajax-search-tags-details, #is-ajax-search-details-"+o+" .is-ajax-search-posts-details").hide(),e("#is-ajax-search-details-"+o+" .is-ajax-search-categories-details").find("> div ").hide(),e("#is-ajax-search-details-"+o+" .is-ajax-search-categories-details").find('> div[data-id="'+i+'"] ').show()):e(this).parents("div").hasClass("is-ajax-search-posts")&&(e("#is-ajax-search-details-"+o+" .is-ajax-search-tags-details, #is-ajax-search-details-"+o+" .is-ajax-search-categories-details").hide(),e("#is-ajax-search-details-"+o+" .is-ajax-search-posts-details").find("> div ").hide(),e("#is-ajax-search-details-"+o+" .is-ajax-search-posts-details, #is-ajax-search-details-"+o).show(),e("#is-ajax-search-details-"+o+" .is-ajax-search-posts-details").find('> div[data-id="'+i+'"] ').show())}}),e(".is-ajax-search .is-search-input").on("focusin, click",function(t){if(s=e(this).closest("form"),""!==e(this).val()&&0===e(t.target).closest("form.processing").length){var a=e(t.target).closest(".is-ajax-search").attr("data-form-id"),i=e(t.target).closest(".is-ajax-search").outerWidth();i=i<500?500:i,e("#is-ajax-search-result-"+a).css({width:i-10+"px"});var o=e(t.target).closest(".is-ajax-search").offset(),n=e(t.target).closest(".is-ajax-search").innerHeight(),r=e("#is-ajax-search-result-"+a).outerWidth(),l=e(window).width(),c=0;if(o.left+r>l&&(c=o.left+r-l),e("#is-ajax-search-result-"+a).css({top:o.top+n+"px",left:o.left-c+"px"}),e(".is-ajax-search-result, .is-ajax-search-details").hide(),e("#is-ajax-search-result-"+a).show(),0!==e("#is-ajax-search-details-"+a).length){var d=e("#is-ajax-search-details-"+a).outerWidth(),h=o.left+r;if(o.left+r+d>l+30){var u=o.left-(c+d);u>-30&&(h=u)}e("#is-ajax-search-details-"+a).css({top:o.top+n+"px",left:h+"px"})}}}),e("body").on("mousedown",function(t){0===t.button&&"s"!==e(t.target).attr("name")&&0===e(t.target).closest(".is-ajax-search-result").length&&0===e(t.target).closest(".is-ajax-search-details").length&&(e(".is-ajax-search-result, .is-ajax-search-details").hide(),s=!1)}),e(".is-disable-submit .is-search-submit").on("click",function(t){return e(this).parent().find(".is-search-input").trigger("keyup"),t.stopPropagation(),t.preventDefault(),!1}),e("form.is-disable-submit").on("submit",function(t){return e(this).find(".is-search-input").trigger("keyup"),t.stopPropagation(),t.preventDefault(),!1}),e(document).on("click",".is-show-more-results",function(t){var a=e(t.target).closest(".is-ajax-search-result").attr("id").split(/[-]+/).pop();e(this).hasClass("redirect-tosr")?e(".is-form-id-"+a).submit():(e(this).find(".is-show-more-results-text").hide(),e(this).find(".is-load-more-image").show(),n(e(".is-form-id-"+a+" .is-search-input"),e(this).attr("data-page")||""))}),e(window).on("resize scroll",function(){if(e(s).hasClass("is-ajax-search")&&""!==e(s).find(".is-search-input").val()){var t=e(s).attr("data-form-id");if(0!==e("#is-ajax-search-result-"+t).length){var a=e(s).offset(),i=e(s).innerHeight(),o=e("#is-ajax-search-result-"+t).outerWidth(),n=e(window).width(),r=0;if(a.left+o>n&&(r=a.left+o-n),e("#is-ajax-search-result-"+t).css({top:a.top+i+"px",left:a.left-r+"px"}),e("#is-ajax-search-result-"+t).show(),0!==e("#is-ajax-search-details-"+t).length){var l=e("#is-ajax-search-details-"+t).outerWidth(),c=a.left+o;if(a.left+o+l>n+30){var d=a.left-(r+l);d>-30&&(c=d)}e("#is-ajax-search-details-"+t).css({top:a.top+i+"px",left:c+"px"})}}}}),e(".is-ajax-search .is-search-input").on("paste",function(){e(this).trigger("keyup")}),e(".is-ajax-search").each(function(t,i){e(i).find(".is-search-input").on("keyup",function(t){if(s=e(this).closest("form"),32!==t.which){var i=this;window.clearTimeout(a),a=window.setTimeout(function(){a=null,n(i)},500)}})})})}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var n=t||window.event,r=l.call(arguments,1),c=0,h=0,u=0,f=0,m=0,p=0;if((t=e.event.fix(n)).type="mousewheel","detail"in n&&(u=-1*n.detail),"wheelDelta"in n&&(u=n.wheelDelta),"wheelDeltaY"in n&&(u=n.wheelDeltaY),"wheelDeltaX"in n&&(h=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(h=-1*u,u=0),c=0===u?h:u,"deltaY"in n&&(c=u=-1*n.deltaY),"deltaX"in n&&(h=n.deltaX,0===u&&(c=-1*h)),0!==u||0!==h){if(1===n.deltaMode){var g=e.data(this,"mousewheel-line-height");c*=g,u*=g,h*=g}else if(2===n.deltaMode){var x=e.data(this,"mousewheel-page-height");c*=x,u*=x,h*=x}if(f=Math.max(Math.abs(u),Math.abs(h)),(!s||s>f)&&(s=f,i(n,f)&&(s/=40)),i(n,f)&&(c/=40,h/=40,u/=40),c=Math[c>=1?"floor":"ceil"](c/s),h=Math[h>=1?"floor":"ceil"](h/s),u=Math[u>=1?"floor":"ceil"](u/s),d.settings.normalizeOffset&&this.getBoundingClientRect){var v=this.getBoundingClientRect();m=t.clientX-v.left,p=t.clientY-v.top}return t.deltaX=h,t.deltaY=u,t.deltaFactor=s,t.offsetX=m,t.offsetY=p,t.deltaMode=0,r.unshift(t,c,h,u),o&&clearTimeout(o),o=setTimeout(a,200),(e.event.dispatch||e.event.handle).apply(this,r)}}function a(){s=null}function i(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var o,s,n=["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=n.length;c;)e.event.fixHooks[n[--c]]=e.event.mouseHooks;var d=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=r.length;a;)this.addEventListener(r[--a],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 a=r.length;a;)this.removeEventListener(r[--a],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var a=e(t),i=a["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(a.css("fontSize"),10)||16},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){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var n=t||window.event,r=l.call(arguments,1),c=0,h=0,u=0,f=0,m=0,p=0;if((t=e.event.fix(n)).type="mousewheel","detail"in n&&(u=-1*n.detail),"wheelDelta"in n&&(u=n.wheelDelta),"wheelDeltaY"in n&&(u=n.wheelDeltaY),"wheelDeltaX"in n&&(h=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(h=-1*u,u=0),c=0===u?h:u,"deltaY"in n&&(c=u=-1*n.deltaY),"deltaX"in n&&(h=n.deltaX,0===u&&(c=-1*h)),0!==u||0!==h){if(1===n.deltaMode){var g=e.data(this,"mousewheel-line-height");c*=g,u*=g,h*=g}else if(2===n.deltaMode){var x=e.data(this,"mousewheel-page-height");c*=x,u*=x,h*=x}if(f=Math.max(Math.abs(u),Math.abs(h)),(!s||s>f)&&(s=f,i(n,f)&&(s/=40)),i(n,f)&&(c/=40,h/=40,u/=40),c=Math[c>=1?"floor":"ceil"](c/s),h=Math[h>=1?"floor":"ceil"](h/s),u=Math[u>=1?"floor":"ceil"](u/s),d.settings.normalizeOffset&&this.getBoundingClientRect){var v=this.getBoundingClientRect();m=t.clientX-v.left,p=t.clientY-v.top}return t.deltaX=h,t.deltaY=u,t.deltaFactor=s,t.offsetX=m,t.offsetY=p,t.deltaMode=0,r.unshift(t,c,h,u),o&&clearTimeout(o),o=setTimeout(a,200),(e.event.dispatch||e.event.handle).apply(this,r)}}function a(){s=null}function i(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var o,s,n=["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=n.length;c;)e.event.fixHooks[n[--c]]=e.event.mouseHooks;var d=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=r.length;a;)this.addEventListener(r[--a],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 a=r.length;a;)this.removeEventListener(r[--a],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var a=e(t),i=a["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(a.css("fontSize"),10)||16},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){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){var t,a,i;t="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,i="https:"==document.location.protocol?"https:":"http:",t||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+i+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E"))),function(){var t,a="mCustomScrollbar",i="mCS",o=".mCustomScrollbar",s={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},n=0,r={},l=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],h={init:function(t){var t=e.extend(!0,{},s,t),a=u.call(this);if(t.live){var l=t.liveSelector||this.selector||o,c=e(l);if("off"===t.live)return void m(l);r[l]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(l)},500)}else m(l);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),f(t),e(a).each(function(){var a=e(this);if(!a.data(i)){a.data(i,{idx:++n,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:a.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var o=a.data(i),s=o.opt,r=a.data("mcs-axis"),l=a.data("mcs-scrollbar-position"),c=a.data("mcs-theme");r&&(s.axis=r),l&&(s.scrollbarPosition=l),c&&(s.theme=c,f(s)),x.call(this),o&&s.callbacks.onCreate&&"function"==typeof s.callbacks.onCreate&&s.callbacks.onCreate.call(this),e("#mCSB_"+o.idx+"_container img:not(."+d[2]+")").addClass(d[2]),h.update.call(null,a)}})},update:function(t,a){var o=t||u.call(this);return e(o).each(function(){var t=e(this);if(t.data(i)){var o=t.data(i),s=o.opt,n=e("#mCSB_"+o.idx+"_container"),r=e("#mCSB_"+o.idx),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(!n.length)return;o.tweenRunning&&V(t),a&&o&&s.callbacks.onBeforeUpdate&&"function"==typeof s.callbacks.onBeforeUpdate&&s.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),r.css("max-height","none"),r.height()!==t.height()&&r.css("max-height",t.height()),w.call(this),"y"===s.axis||s.advanced.autoExpandHorizontalScroll||n.css("width",v(n)),o.overflowed=C.call(this),M.call(this),s.autoDraggerLength&&S.call(this),b.call(this),B.call(this);var c=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)];"x"!==s.axis&&(o.overflowed[0]?l[0].height()>l[0].parent().height()?j.call(this):(Q(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),o.contentReset.y=null):(j.call(this),"y"===s.axis?T.call(this):"yx"===s.axis&&o.overflowed[1]&&Q(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==s.axis&&(o.overflowed[1]?l[1].width()>l[1].parent().width()?j.call(this):(Q(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),o.contentReset.x=null):(j.call(this),"x"===s.axis?T.call(this):"yx"===s.axis&&o.overflowed[0]&&Q(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),a&&o&&(2===a&&s.callbacks.onImageLoad&&"function"==typeof s.callbacks.onImageLoad?s.callbacks.onImageLoad.call(this):3===a&&s.callbacks.onSelectorChange&&"function"==typeof s.callbacks.onSelectorChange?s.callbacks.onSelectorChange.call(this):s.callbacks.onUpdate&&"function"==typeof s.callbacks.onUpdate&&s.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,a){if(void 0!==t&&null!=t){var o=u.call(this);return e(o).each(function(){var o=e(this);if(o.data(i)){var s=o.data(i),n=s.opt,r={trigger:"external",scrollInertia:n.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},l=e.extend(!0,{},r,a),c=F.call(this,t),d=l.scrollInertia>0&&l.scrollInertia<17?17:l.scrollInertia;c[0]=q.call(this,c[0],"y"),c[1]=q.call(this,c[1],"x"),l.moveDragger&&(c[0]*=s.scrollRatio.y,c[1]*=s.scrollRatio.x),l.dur=ie()?0:d,setTimeout(function(){null!==c[0]&&void 0!==c[0]&&"x"!==n.axis&&s.overflowed[0]&&(l.dir="y",l.overwrite="all",Q(o,c[0].toString(),l)),null!==c[1]&&void 0!==c[1]&&"y"!==n.axis&&s.overflowed[1]&&(l.dir="x",l.overwrite="none",Q(o,c[1].toString(),l))},l.timeout)}})}},stop:function(){var t=u.call(this);return e(t).each(function(){var t=e(this);t.data(i)&&V(t)})},disable:function(t){var a=u.call(this);return e(a).each(function(){var a=e(this);a.data(i)&&(a.data(i),N.call(this,"remove"),T.call(this),t&&j.call(this),M.call(this,!0),a.addClass(d[3]))})},destroy:function(){var t=u.call(this);return e(t).each(function(){var o=e(this);if(o.data(i)){var s=o.data(i),n=s.opt,r=e("#mCSB_"+s.idx),l=e("#mCSB_"+s.idx+"_container"),c=e(".mCSB_"+s.idx+"_scrollbar");n.live&&m(n.liveSelector||e(t).selector),N.call(this,"remove"),T.call(this),j.call(this),o.removeData(i),K(this,"mcs"),c.remove(),l.find("img."+d[2]).removeClass(d[2]),r.replaceWith(l.contents()),o.removeClass(a+" _"+i+"_"+s.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},u=function(){return"object"!=typeof e(this)||e(this).length<1?o:this},f=function(t){t.autoDraggerLength=!(e.inArray(t.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"])>-1)&&t.autoDraggerLength,t.autoExpandScrollbar=!(e.inArray(t.theme,["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"])>-1)&&t.autoExpandScrollbar,t.scrollButtons.enable=!(e.inArray(t.theme,["minimal","minimal-dark"])>-1)&&t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,["minimal","minimal-dark"])>-1||t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,["minimal","minimal-dark"])>-1?"outside":t.scrollbarPosition},m=function(e){r[e]&&(clearTimeout(r[e]),K(r,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},x=function(){var t=e(this),o=t.data(i),s=o.opt,n=s.autoExpandScrollbar?" "+d[1]+"_expand":"",r=["<div id='mCSB_"+o.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+o.idx+"_scrollbar mCS-"+s.theme+" mCSB_scrollTools_vertical"+n+"'><div class='"+d[12]+"'><div id='mCSB_"+o.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div></div><div class='mCSB_draggerRail' /></div>","<div id='mCSB_"+o.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+o.idx+"_scrollbar mCS-"+s.theme+" mCSB_scrollTools_horizontal"+n+"'><div class='"+d[12]+"'><div id='mCSB_"+o.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],l="yx"===s.axis?"mCSB_vertical_horizontal":"x"===s.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===s.axis?r[0]+r[1]:"x"===s.axis?r[1]:r[0],h="yx"===s.axis?"<div id='mCSB_"+o.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",u=s.autoHideScrollbar?" "+d[6]:"",f="x"!==s.axis&&"rtl"===o.langDir?" "+d[7]:"";s.setWidth&&t.css("width",s.setWidth),s.setHeight&&t.css("height",s.setHeight),s.setLeft="y"!==s.axis&&"rtl"===o.langDir?"989999px":s.setLeft,t.addClass(a+" _"+i+"_"+o.idx+u+f).wrapInner("<div id='mCSB_"+o.idx+"' class='mCustomScrollBox mCS-"+s.theme+" "+l+"'><div id='mCSB_"+o.idx+"_container' class='mCSB_container' style='position:relative; top:"+s.setTop+"; left:"+s.setLeft+";' dir='"+o.langDir+"' /></div>");var m=e("#mCSB_"+o.idx),p=e("#mCSB_"+o.idx+"_container");"y"===s.axis||s.advanced.autoExpandHorizontalScroll||p.css("width",v(p)),"outside"===s.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(h)),_.call(this);var g=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},v=function(t){var a=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],i=t.parent().width();return a[0]>i?a[0]:a[1]>i?a[1]:"100%"},w=function(){var t=e(this),a=t.data(i),o=a.opt,s=e("#mCSB_"+a.idx+"_container");if(o.advanced.autoExpandHorizontalScroll&&"y"!==o.axis){s.css({width:"auto","min-width":0,"overflow-x":"scroll"});var n=Math.ceil(s[0].scrollWidth);3===o.advanced.autoExpandHorizontalScroll||2!==o.advanced.autoExpandHorizontalScroll&&n>s.parent().width()?s.css({width:n,"min-width":"100%","overflow-x":"inherit"}):s.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(s[0].getBoundingClientRect().right+.4)-Math.floor(s[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},_=function(){var t=e(this),a=t.data(i),o=a.opt,s=e(".mCSB_"+a.idx+"_scrollbar:first"),n=te(o.scrollButtons.tabindex)?"tabindex='"+o.scrollButtons.tabindex+"'":"",r=["<a href='#' class='"+d[13]+"' "+n+" />","<a href='#' class='"+d[14]+"' "+n+" />","<a href='#' class='"+d[15]+"' "+n+" />","<a href='#' class='"+d[16]+"' "+n+" />"],l=["x"===o.axis?r[2]:r[0],"x"===o.axis?r[3]:r[1],r[2],r[3]];o.scrollButtons.enable&&s.prepend(l[0]).append(l[1]).next(".mCSB_scrollTools").prepend(l[2]).append(l[3])},S=function(){var t=e(this),a=t.data(i),o=e("#mCSB_"+a.idx),s=e("#mCSB_"+a.idx+"_container"),n=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")],r=[o.height()/s.outerHeight(!1),o.width()/s.outerWidth(!1)],c=[parseInt(n[0].css("min-height")),Math.round(r[0]*n[0].parent().height()),parseInt(n[1].css("min-width")),Math.round(r[1]*n[1].parent().width())],d=l&&c[1]<c[0]?c[0]:c[1],h=l&&c[3]<c[2]?c[2]:c[3];n[0].css({height:d,"max-height":n[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),n[1].css({width:h,"max-width":n[1].parent().width()-10})},b=function(){var t=e(this),a=t.data(i),o=e("#mCSB_"+a.idx),s=e("#mCSB_"+a.idx+"_container"),n=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")],r=[s.outerHeight(!1)-o.height(),s.outerWidth(!1)-o.width()],l=[r[0]/(n[0].parent().height()-n[0].height()),r[1]/(n[1].parent().width()-n[1].width())];a.scrollRatio={y:l[0],x:l[1]}},y=function(e,t,a){var i=a?d[0]+"_expanded":"",o=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+i),o.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),o.removeClass(d[1])):(e.addClass(d[0]),o.addClass(d[1])))},C=function(){var t=e(this),a=t.data(i),o=e("#mCSB_"+a.idx),s=e("#mCSB_"+a.idx+"_container"),n=null==a.overflowed?s.height():s.outerHeight(!1),r=null==a.overflowed?s.width():s.outerWidth(!1),l=s[0].scrollHeight,c=s[0].scrollWidth;return l>n&&(n=l),c>r&&(r=c),[n>o.height(),r>o.width()]},j=function(){var t=e(this),a=t.data(i),o=a.opt,s=e("#mCSB_"+a.idx),n=e("#mCSB_"+a.idx+"_container"),r=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")];if(V(t),("x"!==o.axis&&!a.overflowed[0]||"y"===o.axis&&a.overflowed[0])&&(r[0].add(n).css("top",0),Q(t,"_resetY")),"y"!==o.axis&&!a.overflowed[1]||"x"===o.axis&&a.overflowed[1]){var l=dx=0;"rtl"===a.langDir&&(l=s.width()-n.outerWidth(!1),dx=Math.abs(l/a.scrollRatio.x)),n.css("left",l),r[1].css("left",dx),Q(t,"_resetX")}},B=function(){var t,a=e(this),o=a.data(i),s=o.opt;o.bindEvents||(D.call(this),s.contentTouchScroll&&O.call(this),I.call(this),s.mouseWheel.enable&&function i(){t=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(t),E.call(a[0])):i()},100)}(),z.call(this),P.call(this),s.advanced.autoScrollOnFocus&&H.call(this),s.scrollButtons.enable&&X.call(this),s.keyboard.enable&&Y.call(this),o.bindEvents=!0)},T=function(){var t=e(this),a=t.data(i),o=a.opt,s=i+"_"+a.idx,n=".mCSB_"+a.idx+"_scrollbar",r=e("#mCSB_"+a.idx+",#mCSB_"+a.idx+"_container,#mCSB_"+a.idx+"_container_wrapper,"+n+" ."+d[12]+",#mCSB_"+a.idx+"_dragger_vertical,#mCSB_"+a.idx+"_dragger_horizontal,"+n+">a"),l=e("#mCSB_"+a.idx+"_container");o.advanced.releaseDraggableSelectors&&r.add(e(o.advanced.releaseDraggableSelectors)),o.advanced.extraDraggableSelectors&&r.add(e(o.advanced.extraDraggableSelectors)),a.bindEvents&&(e(document).add(e(!L()||top.document)).unbind("."+s),r.each(function(){e(this).unbind("."+s)}),clearTimeout(t[0]._focusTimeout),K(t[0],"_focusTimeout"),clearTimeout(a.sequential.step),K(a.sequential,"step"),clearTimeout(l[0].onCompleteTimeout),K(l[0],"onCompleteTimeout"),a.bindEvents=!1)},M=function(t){var a=e(this),o=a.data(i),s=o.opt,n=e("#mCSB_"+o.idx+"_container_wrapper"),r=n.length?n:e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_scrollbar_vertical"),e("#mCSB_"+o.idx+"_scrollbar_horizontal")],c=[l[0].find(".mCSB_dragger"),l[1].find(".mCSB_dragger")];"x"!==s.axis&&(o.overflowed[0]&&!t?(l[0].add(c[0]).add(l[0].children("a")).css("display","block"),r.removeClass(d[8]+" "+d[10])):(s.alwaysShowScrollbar?(2!==s.alwaysShowScrollbar&&c[0].css("display","none"),r.removeClass(d[10])):(l[0].css("display","none"),r.addClass(d[10])),r.addClass(d[8]))),"y"!==s.axis&&(o.overflowed[1]&&!t?(l[1].add(c[1]).add(l[1].children("a")).css("display","block"),r.removeClass(d[9]+" "+d[11])):(s.alwaysShowScrollbar?(2!==s.alwaysShowScrollbar&&c[1].css("display","none"),r.removeClass(d[11])):(l[1].css("display","none"),r.addClass(d[11])),r.addClass(d[9]))),o.overflowed[0]||o.overflowed[1]?a.removeClass(d[5]):a.addClass(d[5])},k=function(t){var a=t.type,i=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,o=L()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(a){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return i?[t.originalEvent.pageY-i[0]+o[0],t.originalEvent.pageX-i[1]+o[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var s=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],n=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[s.screenY,s.screenX,n>1]:[s.pageY,s.pageX,n>1];default:return i?[t.pageY-i[0]+o[0],t.pageX-i[1]+o[1],!1]:[t.pageY,t.pageX,!1]}},D=function(){function t(e,t,i,o){if(f[0].idleTimer=d.scrollInertia<233?250:0,a.attr("id")===u[1])var s="x",l=(a[0].offsetLeft-t+o)*r.scrollRatio.x;else var s="y",l=(a[0].offsetTop-e+i)*r.scrollRatio.y;Q(n,l.toString(),{dir:s,drag:!0})}var a,o,s,n=e(this),r=n.data(i),d=r.opt,h=i+"_"+r.idx,u=["mCSB_"+r.idx+"_dragger_vertical","mCSB_"+r.idx+"_dragger_horizontal"],f=e("#mCSB_"+r.idx+"_container"),m=e("#"+u[0]+",#"+u[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!L()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!L()||top.document);m.bind("contextmenu."+h,function(e){e.preventDefault()}).bind("mousedown."+h+" touchstart."+h+" pointerdown."+h+" MSPointerDown."+h,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),$(t)){c=!0,l&&(document.onselectstart=function(){return!1}),R.call(f,!1),V(n);var i=(a=e(this)).offset(),r=k(t)[0]-i.top,h=k(t)[1]-i.left,u=a.height()+i.top,m=a.width()+i.left;u>r&&r>0&&m>h&&h>0&&(o=r,s=h),y(a,"active",d.autoExpandScrollbar)}}).bind("touchmove."+h,function(e){e.stopImmediatePropagation(),e.preventDefault();var i=a.offset(),n=k(e)[0]-i.top,r=k(e)[1]-i.left;t(o,s,n,r)}),e(document).add(g).bind("mousemove."+h+" pointermove."+h+" MSPointerMove."+h,function(e){if(a){var i=a.offset(),n=k(e)[0]-i.top,r=k(e)[1]-i.left;if(o===n&&s===r)return;t(o,s,n,r)}}).add(p).bind("mouseup."+h+" touchend."+h+" pointerup."+h+" MSPointerUp."+h,function(){a&&(y(a,"active",d.autoExpandScrollbar),a=null),c=!1,l&&(document.onselectstart=null),R.call(f,!0)})},O=function(){function a(e){if(!ee(e)||c||k(e)[2])t=0;else{t=1,b=0,y=0,d=1,C.removeClass("mCS_touch_action");var a=D.offset();h=k(e)[0]-a.top,u=k(e)[1]-a.left,A=[k(e)[0],k(e)[1]]}}function o(e){if(ee(e)&&!c&&!k(e)[2]&&(B.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!y||b)&&d)){g=J();var t=M.offset(),a=k(e)[0]-t.top,i=k(e)[1]-t.left,o="mcsLinearOut";if(I.push(a),E.push(i),A[2]=Math.abs(k(e)[0]-A[0]),A[3]=Math.abs(k(e)[1]-A[1]),j.overflowed[0])var s=O[0].parent().height()-O[0].height(),n=h-a>0&&a-h>-s*j.scrollRatio.y&&(2*A[3]<A[2]||"yx"===B.axis);if(j.overflowed[1])var r=O[1].parent().width()-O[1].width(),f=u-i>0&&i-u>-r*j.scrollRatio.x&&(2*A[2]<A[3]||"yx"===B.axis);n||f?(P||e.preventDefault(),b=1):(y=1,C.addClass("mCS_touch_action")),P&&e.preventDefault(),_="yx"===B.axis?[h-a,u-i]:"x"===B.axis?[null,u-i]:[h-a,null],D[0].idleTimer=250,j.overflowed[0]&&l(_[0],W,o,"y","all",!0),j.overflowed[1]&&l(_[1],W,o,"x",R,!0)}}function s(e){if(!ee(e)||c||k(e)[2])t=0;else{t=1,e.stopImmediatePropagation(),V(C),p=J();var a=M.offset();f=k(e)[0]-a.top,m=k(e)[1]-a.left,I=[],E=[]}}function n(e){if(ee(e)&&!c&&!k(e)[2]){d=0,e.stopImmediatePropagation(),b=0,y=0,x=J();var t=M.offset(),a=k(e)[0]-t.top,i=k(e)[1]-t.left;if(!(x-g>30)){var o="mcsEaseOut",s=2.5>(w=1e3/(x-p)),n=s?[I[I.length-2],E[E.length-2]]:[0,0];v=s?[a-n[0],i-n[1]]:[a-f,i-m];var h=[Math.abs(v[0]),Math.abs(v[1])];w=s?[Math.abs(v[0]/4),Math.abs(v[1]/4)]:[w,w];var u=[Math.abs(D[0].offsetTop)-v[0]*r(h[0]/w[0],w[0]),Math.abs(D[0].offsetLeft)-v[1]*r(h[1]/w[1],w[1])];_="yx"===B.axis?[u[0],u[1]]:"x"===B.axis?[null,u[1]]:[u[0],null],S=[4*h[0]+B.scrollInertia,4*h[1]+B.scrollInertia];var C=parseInt(B.contentTouchScroll)||0;_[0]=h[0]>C?_[0]:0,_[1]=h[1]>C?_[1]:0,j.overflowed[0]&&l(_[0],S[0],o,"y",R,!1),j.overflowed[1]&&l(_[1],S[1],o,"x",R,!1)}}}function r(e,t){var a=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?a[0]:a[3]:e>60?t>3?a[3]:a[2]:e>30?t>8?a[1]:t>6?a[0]:t>4?t:a[2]:t>8?t:a[3]}function l(e,t,a,i,o,s){e&&Q(C,e.toString(),{dur:t,scrollEasing:a,dir:i,overwrite:o,drag:s})}var d,h,u,f,m,p,g,x,v,w,_,S,b,y,C=e(this),j=C.data(i),B=j.opt,T=i+"_"+j.idx,M=e("#mCSB_"+j.idx),D=e("#mCSB_"+j.idx+"_container"),O=[e("#mCSB_"+j.idx+"_dragger_vertical"),e("#mCSB_"+j.idx+"_dragger_horizontal")],I=[],E=[],W=0,R="yx"===B.axis?"none":"all",A=[],z=D.find("iframe"),H=["touchstart."+T+" pointerdown."+T+" MSPointerDown."+T,"touchmove."+T+" pointermove."+T+" MSPointerMove."+T,"touchend."+T+" pointerup."+T+" MSPointerUp."+T],P=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;D.bind(H[0],function(e){a(e)}).bind(H[1],function(e){o(e)}),M.bind(H[0],function(e){s(e)}).bind(H[2],function(e){n(e)}),z.length&&z.each(function(){e(this).bind("load",function(){L(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){a(e),s(e)}).bind(H[1],function(e){o(e)}).bind(H[2],function(e){n(e)})})})},I=function(){function a(e,t,a){l.type=a&&o?"stepped":"stepless",l.scrollAmount=10,U(s,e,t,"mcsLinearOut",a?60:null)}var o,s=e(this),n=s.data(i),r=n.opt,l=n.sequential,d=i+"_"+n.idx,h=e("#mCSB_"+n.idx+"_container"),u=h.parent();h.bind("mousedown."+d,function(){t||o||(o=1,c=!0)}).add(document).bind("mousemove."+d,function(e){if(!t&&o&&(window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type&&document.selection.createRange().text)){var i=h.offset(),s=k(e)[0]-i.top+h[0].offsetTop,c=k(e)[1]-i.left+h[0].offsetLeft;s>0&&s<u.height()&&c>0&&c<u.width()?l.step&&a("off",null,"stepped"):("x"!==r.axis&&n.overflowed[0]&&(0>s?a("on",38):s>u.height()&&a("on",40)),"y"!==r.axis&&n.overflowed[1]&&(0>c?a("on",37):c>u.width()&&a("on",39)))}}).bind("mouseup."+d+" dragend."+d,function(){t||(o&&(o=0,a("off",null)),c=!1)})},E=function(){function t(t,i){if(V(a),!A(a,t.target)){var n="auto"!==s.mouseWheel.deltaFactor?parseInt(s.mouseWheel.deltaFactor):l&&t.deltaFactor<100?100:t.deltaFactor||100,d=s.scrollInertia;if("x"===s.axis||"x"===s.mouseWheel.axis)var h="x",u=[Math.round(n*o.scrollRatio.x),parseInt(s.mouseWheel.scrollAmount)],f="auto"!==s.mouseWheel.scrollAmount?u[1]:u[0]>=r.width()?.9*r.width():u[0],m=Math.abs(e("#mCSB_"+o.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),x="y"===s.mouseWheel.axis?t.deltaY||i:t.deltaX;else var h="y",u=[Math.round(n*o.scrollRatio.y),parseInt(s.mouseWheel.scrollAmount)],f="auto"!==s.mouseWheel.scrollAmount?u[1]:u[0]>=r.height()?.9*r.height():u[0],m=Math.abs(e("#mCSB_"+o.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),x=t.deltaY||i;"y"===h&&!o.overflowed[0]||"x"===h&&!o.overflowed[1]||((s.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(x=-x),s.mouseWheel.normalizeDelta&&(x=0>x?-1:1),(x>0&&0!==p||0>x&&p!==g||s.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!s.mouseWheel.normalizeDelta&&(f=t.deltaFactor,d=17),Q(a,(m-x*f).toString(),{dir:h,dur:d}))}}if(e(this).data(i)){var a=e(this),o=a.data(i),s=o.opt,n=i+"_"+o.idx,r=e("#mCSB_"+o.idx),c=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],d=e("#mCSB_"+o.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){L(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+n,function(e,a){t(e,a)})})}),r.bind("mousewheel."+n,function(e,a){t(e,a)})}},W=new Object,L=function(t){var a=!1,i=!1,o=null;if(void 0===t?i="#empty":void 0!==e(t).attr("id")&&(i=e(t).attr("id")),!1!==i&&void 0!==W[i])return W[i];if(t){try{var s=t.contentDocument||t.contentWindow.document;o=s.body.innerHTML}catch(e){}a=null!==o}else{try{var s=top.document;o=s.body.innerHTML}catch(e){}a=null!==o}return!1!==i&&(W[i]=a),a},R=function(e){var t=this.find("iframe");if(t.length){var a=e?"auto":"none";t.css("pointer-events",a)}},A=function(t,a){var o=a.nodeName.toLowerCase(),s=t.data(i).opt.mouseWheel.disableOver;return e.inArray(o,s)>-1&&!(e.inArray(o,["select","textarea"])>-1&&!e(a).is(":focus"))},z=function(){var t,a=e(this),o=a.data(i),s=i+"_"+o.idx,n=e("#mCSB_"+o.idx+"_container"),r=n.parent(),l=e(".mCSB_"+o.idx+"_scrollbar ."+d[12]);l.bind("mousedown."+s+" touchstart."+s+" pointerdown."+s+" MSPointerDown."+s,function(a){c=!0,e(a.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+s+" pointerup."+s+" MSPointerUp."+s,function(){c=!1}).bind("click."+s,function(i){if(t&&(t=0,e(i.target).hasClass(d[12])||e(i.target).hasClass("mCSB_draggerRail"))){V(a);var s=e(this),l=s.find(".mCSB_dragger");if(s.parent(".mCSB_scrollTools_horizontal").length>0){if(!o.overflowed[1])return;var c="x",h=i.pageX>l.offset().left?-1:1,u=Math.abs(n[0].offsetLeft)-h*(.9*r.width())}else{if(!o.overflowed[0])return;var c="y",h=i.pageY>l.offset().top?-1:1,u=Math.abs(n[0].offsetTop)-h*(.9*r.height())}Q(a,u.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),a=t.data(i),o=a.opt,s=i+"_"+a.idx,n=e("#mCSB_"+a.idx+"_container"),r=n.parent();n.bind("focusin."+s,function(){var a=e(document.activeElement),i=n.find(".mCustomScrollBox").length;a.is(o.advanced.autoScrollOnFocus)&&(V(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=i?17*i:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(a)[0],ae(a)[1]],i=[n[0].offsetTop,n[0].offsetLeft],s=[i[0]+e[0]>=0&&i[0]+e[0]<r.height()-a.outerHeight(!1),i[1]+e[1]>=0&&i[0]+e[1]<r.width()-a.outerWidth(!1)],l="yx"!==o.axis||s[0]||s[1]?"all":"none";"x"===o.axis||s[0]||Q(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:l,dur:0}),"y"===o.axis||s[1]||Q(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:l,dur:0})},t[0]._focusTimer))})},P=function(){var t=e(this),a=t.data(i),o=i+"_"+a.idx,s=e("#mCSB_"+a.idx+"_container").parent();s.bind("scroll."+o,function(){0===s.scrollTop()&&0===s.scrollLeft()||e(".mCSB_"+a.idx+"_scrollbar").css("visibility","hidden")})},X=function(){var t=e(this),a=t.data(i),o=a.opt,s=a.sequential,n=i+"_"+a.idx,r=".mCSB_"+a.idx+"_scrollbar",l=e(r+">a");l.bind("contextmenu."+n,function(e){e.preventDefault()}).bind("mousedown."+n+" touchstart."+n+" pointerdown."+n+" MSPointerDown."+n+" mouseup."+n+" touchend."+n+" pointerup."+n+" MSPointerUp."+n+" mouseout."+n+" pointerout."+n+" MSPointerOut."+n+" click."+n,function(i){function n(e,a){s.scrollAmount=o.scrollButtons.scrollAmount,U(t,e,a)}if(i.preventDefault(),$(i)){var r=e(this).attr("class");switch(s.type=o.scrollButtons.scrollType,i.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===s.type)return;c=!0,a.tweenRunning=!1,n("on",r);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===s.type)return;c=!1,s.dir&&n("off",r);break;case"click":if("stepped"!==s.type||a.tweenRunning)return;n("on",r)}}})},Y=function(){function t(t){function i(e,t){n.type=s.keyboard.scrollType,n.scrollAmount=s.keyboard.scrollAmount,"stepped"===n.type&&o.tweenRunning||U(a,e,t)}switch(t.type){case"blur":o.tweenRunning&&n.dir&&i("off",null);break;case"keydown":case"keyup":var r=t.keyCode?t.keyCode:t.which,l="on";if("x"!==s.axis&&(38===r||40===r)||"y"!==s.axis&&(37===r||39===r)){if((38===r||40===r)&&!o.overflowed[0]||(37===r||39===r)&&!o.overflowed[1])return;"keyup"===t.type&&(l="off"),e(document.activeElement).is(h)||(t.preventDefault(),t.stopImmediatePropagation(),i(l,r))}else if(33===r||34===r){if((o.overflowed[0]||o.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){V(a);var u=34===r?-1:1;if("x"===s.axis||"yx"===s.axis&&o.overflowed[1]&&!o.overflowed[0])var f="x",m=Math.abs(c[0].offsetLeft)-u*(.9*d.width());else var f="y",m=Math.abs(c[0].offsetTop)-u*(.9*d.height());Q(a,m.toString(),{dir:f,scrollEasing:"mcsEaseInOut"})}}else if((35===r||36===r)&&!e(document.activeElement).is(h)&&((o.overflowed[0]||o.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===s.axis||"yx"===s.axis&&o.overflowed[1]&&!o.overflowed[0])var f="x",m=35===r?Math.abs(d.width()-c.outerWidth(!1)):0;else var f="y",m=35===r?Math.abs(d.height()-c.outerHeight(!1)):0;Q(a,m.toString(),{dir:f,scrollEasing:"mcsEaseInOut"})}}}var a=e(this),o=a.data(i),s=o.opt,n=o.sequential,r=i+"_"+o.idx,l=e("#mCSB_"+o.idx),c=e("#mCSB_"+o.idx+"_container"),d=c.parent(),h="input,textarea,select,datalist,keygen,[contenteditable='true']",u=c.find("iframe"),f=["blur."+r+" keydown."+r+" keyup."+r];u.length&&u.each(function(){e(this).bind("load",function(){L(this)&&e(this.contentDocument||this.contentWindow.document).bind(f[0],function(e){t(e)})})}),l.attr("tabindex","0").bind(f[0],function(e){t(e)})},U=function(t,a,o,s,n){function r(e){c.snapAmount&&(h.scrollAmount=c.snapAmount instanceof Array?"x"===h.dir[0]?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount);var a="stepped"!==h.type,i=n||(e?a?m/1.5:p:1e3/60),o=e?a?7.5:40:2.5,d=[Math.abs(u[0].offsetTop),Math.abs(u[0].offsetLeft)],f=[l.scrollRatio.y>10?10:l.scrollRatio.y,l.scrollRatio.x>10?10:l.scrollRatio.x],g="x"===h.dir[0]?d[1]+h.dir[1]*(f[1]*o):d[0]+h.dir[1]*(f[0]*o),x="x"===h.dir[0]?d[1]+h.dir[1]*parseInt(h.scrollAmount):d[0]+h.dir[1]*parseInt(h.scrollAmount),v="auto"!==h.scrollAmount?x:g,w=s||(e?a?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),_=!!e;return e&&17>i&&(v="x"===h.dir[0]?d[1]:d[0]),Q(t,v.toString(),{dir:h.dir[0],scrollEasing:w,dur:i,onComplete:_}),e?void(h.dir=!1):(clearTimeout(h.step),void(h.step=setTimeout(function(){r()},i)))}var l=t.data(i),c=l.opt,h=l.sequential,u=e("#mCSB_"+l.idx+"_container"),f="stepped"===h.type,m=c.scrollInertia<26?26:c.scrollInertia,p=c.scrollInertia<1?17:c.scrollInertia;switch(a){case"on":if(h.dir=[o===d[16]||o===d[15]||39===o||37===o?"x":"y",o===d[13]||o===d[15]||38===o||37===o?-1:1],V(t),te(o)&&"stepped"===h.type)return;r(f);break;case"off":clearTimeout(h.step),K(h,"step"),V(t),(f||l.tweenRunning&&h.dir)&&r(!0)}},F=function(t){var a=e(this).data(i).opt,o=[];return"function"==typeof t&&(t=t()),t instanceof Array?o=t.length>1?[t[0],t[1]]:"x"===a.axis?[null,t[0]]:[t[0],null]:(o[0]=t.y?t.y:t.x||"x"===a.axis?null:t,o[1]=t.x?t.x:t.y||"y"===a.axis?null:t),"function"==typeof o[0]&&(o[0]=o[0]()),"function"==typeof o[1]&&(o[1]=o[1]()),o},q=function(t,a){if(null!=t&&void 0!==t){var o=e(this),s=o.data(i),n=s.opt,r=e("#mCSB_"+s.idx+"_container"),l=r.parent(),c=typeof t;a||(a="x"===n.axis?"x":"y");var d="x"===a?r.outerWidth(!1)-l.width():r.outerHeight(!1)-l.height(),u="x"===a?r[0].offsetLeft:r[0].offsetTop,f="x"===a?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===a?ae(m)[1]:ae(m)[0];case"string":case"number":if(te(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(u-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=u+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&te(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(l.height()-r.outerHeight(!1));if("right"===t)return Math.abs(l.width()-r.outerWidth(!1));if("first"===t||"last"===t){var m=r.find(":"+t);return"x"===a?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===a?ae(e(t))[1]:ae(e(t))[0]:(r.css(f,t),void h.update.call(null,o[0]))}}},N=function(t){function a(e){clearTimeout(r[0].autoUpdate),h.update.call(null,o[0],e)}var o=e(this),s=o.data(i),n=s.opt,r=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(r[0].autoUpdate),void K(r[0],"autoUpdate")):void function t(){return clearTimeout(r[0].autoUpdate),0===o.parents("html").length?void(o=null):void(r[0].autoUpdate=setTimeout(function(){return n.advanced.updateOnSelectorChange&&(s.poll.change.n=function(){!0===n.advanced.updateOnSelectorChange&&(n.advanced.updateOnSelectorChange="*");var e=0,t=r.find(n.advanced.updateOnSelectorChange);return n.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void a(3)):n.advanced.updateOnContentResize&&(s.poll.size.n=o[0].scrollHeight+o[0].scrollWidth+r[0].offsetHeight+o[0].offsetHeight+o[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void a(1)):!n.advanced.updateOnImageLoad||"auto"===n.advanced.updateOnImageLoad&&"y"===n.axis||(s.poll.img.n=r.find("img").length,s.poll.img.n===s.poll.img.o)?void((n.advanced.updateOnSelectorChange||n.advanced.updateOnContentResize||n.advanced.updateOnImageLoad)&&t()):(s.poll.img.o=s.poll.img.n,void r.find("img").each(function(){!function(t){if(e(t).hasClass(d[2]))a();else{var i=new Image;i.onload=function(e,t){return function(){return t.apply(e,arguments)}}(i,function(){this.onload=null,e(t).addClass(d[2]),a(2)}),i.src=t.src}}(this)}))},n.advanced.autoUpdateTimeout))}()},V=function(t){var a=t.data(i),o=e("#mCSB_"+a.idx+"_container,#mCSB_"+a.idx+"_container_wrapper,#mCSB_"+a.idx+"_dragger_vertical,#mCSB_"+a.idx+"_dragger_horizontal");o.each(function(){G.call(this)})},Q=function(t,a,o){function s(e){return r&&l.callbacks[e]&&"function"==typeof l.callbacks[e]}function n(){var e=[u[0].offsetTop,u[0].offsetLeft],a=[x[0].offsetTop,x[0].offsetLeft],i=[u.outerHeight(!1),u.outerWidth(!1)],s=[h.height(),h.width()];t[0].mcs={content:u,top:e[0],left:e[1],draggerTop:a[0],draggerLeft:a[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(i[0])-s[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(i[1])-s[1])),direction:o.dir}}var r=t.data(i),l=r.opt,c={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:l.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},o=e.extend(c,o),d=[o.dur,o.drag?0:o.dur],h=e("#mCSB_"+r.idx),u=e("#mCSB_"+r.idx+"_container"),f=u.parent(),m=l.callbacks.onTotalScrollOffset?F.call(t,l.callbacks.onTotalScrollOffset):[0,0],p=l.callbacks.onTotalScrollBackOffset?F.call(t,l.callbacks.onTotalScrollBackOffset):[0,0];if(r.trigger=o.trigger,0===f.scrollTop()&&0===f.scrollLeft()||(e(".mCSB_"+r.idx+"_scrollbar").css("visibility","visible"),f.scrollTop(0).scrollLeft(0)),"_resetY"!==a||r.contentReset.y||(s("onOverflowYNone")&&l.callbacks.onOverflowYNone.call(t[0]),r.contentReset.y=1),"_resetX"!==a||r.contentReset.x||(s("onOverflowXNone")&&l.callbacks.onOverflowXNone.call(t[0]),r.contentReset.x=1),"_resetY"!==a&&"_resetX"!==a){if(!r.contentReset.y&&t[0].mcs||!r.overflowed[0]||(s("onOverflowY")&&l.callbacks.onOverflowY.call(t[0]),r.contentReset.x=null),!r.contentReset.x&&t[0].mcs||!r.overflowed[1]||(s("onOverflowX")&&l.callbacks.onOverflowX.call(t[0]),r.contentReset.x=null),l.snapAmount){var g=l.snapAmount instanceof Array?"x"===o.dir?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount;a=function(e,t,a){return Math.round(e/t)*t-a}(a,g,l.snapOffset)}switch(o.dir){case"x":var x=e("#mCSB_"+r.idx+"_dragger_horizontal"),v="left",w=u[0].offsetLeft,_=[h.width()-u.outerWidth(!1),x.parent().width()-x.width()],S=[a,0===a?0:a/r.scrollRatio.x],b=m[1],C=p[1],j=b>0?b/r.scrollRatio.x:0,B=C>0?C/r.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+r.idx+"_dragger_vertical"),v="top",w=u[0].offsetTop,_=[h.height()-u.outerHeight(!1),x.parent().height()-x.height()],S=[a,0===a?0:a/r.scrollRatio.y],b=m[0],C=p[0],j=b>0?b/r.scrollRatio.y:0,B=C>0?C/r.scrollRatio.y:0}S[1]<0||0===S[0]&&0===S[1]?S=[0,0]:S[1]>=_[1]?S=[_[0],_[1]]:S[0]=-S[0],t[0].mcs||(n(),s("onInit")&&l.callbacks.onInit.call(t[0])),clearTimeout(u[0].onCompleteTimeout),Z(x[0],v,Math.round(S[1]),d[1],o.scrollEasing),!r.tweenRunning&&(0===w&&S[0]>=0||w===_[0]&&S[0]<=_[0])||Z(u[0],v,Math.round(S[0]),d[0],o.scrollEasing,o.overwrite,{onStart:function(){o.callbacks&&o.onStart&&!r.tweenRunning&&(s("onScrollStart")&&(n(),l.callbacks.onScrollStart.call(t[0])),r.tweenRunning=!0,y(x),r.cbOffsets=[l.callbacks.alwaysTriggerOffsets||w>=_[0]+b,l.callbacks.alwaysTriggerOffsets||-C>=w])},onUpdate:function(){o.callbacks&&o.onUpdate&&s("whileScrolling")&&(n(),l.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(o.callbacks&&o.onComplete){"yx"===l.axis&&clearTimeout(u[0].onCompleteTimeout);var e=u[0].idleTimer||0;u[0].onCompleteTimeout=setTimeout(function(){s("onScroll")&&(n(),l.callbacks.onScroll.call(t[0])),s("onTotalScroll")&&S[1]>=_[1]-j&&r.cbOffsets[0]&&(n(),l.callbacks.onTotalScroll.call(t[0])),s("onTotalScrollBack")&&S[1]<=B&&r.cbOffsets[1]&&(n(),l.callbacks.onTotalScrollBack.call(t[0])),r.tweenRunning=!1,u[0].idleTimer=0,y(x,"hide")},e)}}})}},Z=function(e,t,a,i,o,s,n){function r(){v.stop||(p||h.call(),p=J()-m,l(),p>=v.time&&(v.time=p>v.time?p+c-(p-v.time):p+c-1,v.time<p+1&&(v.time=p+1)),v.time<i?v.id=d(r):f.call())}function l(){i>0?(v.currVal=function(e,t,a,i,o){switch(o){case"linear":case"mcsLinear":return a*e/i+t;case"mcsLinearOut":return e/=i,e--,a*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return 1>(e/=i/2)?a/2*e*e+t:-a/2*(--e*(e-2)-1)+t;case"easeInOutStrong":return 1>(e/=i/2)?a/2*Math.pow(2,10*(e-1))+t:(e--,a/2*(2-Math.pow(2,-10*e))+t);case"easeInOut":case"mcsEaseInOut":return 1>(e/=i/2)?a/2*e*e*e+t:a/2*((e-=2)*e*e+2)+t;case"easeOutSmooth":return e/=i,-a*(--e*e*e*e-1)+t;case"easeOutStrong":return a*(1-Math.pow(2,-10*e/i))+t;case"easeOut":case"mcsEaseOut":default:var s=(e/=i)*e,n=s*e;return t+a*(.499999999999997*n*s+-2.5*s*s+5.5*n+-6.5*s+4*e)}}(v.time,g,w,i,o),x[t]=Math.round(v.currVal)+"px"):x[t]=a+"px",u.call()}e._mTween||(e._mTween={top:{},left:{}});var c,d,n=n||{},h=n.onStart||function(){},u=n.onUpdate||function(){},f=n.onComplete||function(){},m=J(),p=0,g=e.offsetTop,x=e.style,v=e._mTween[t];"left"===t&&(g=e.offsetLeft);var w=a-g;v.stop=0,"none"!==s&&null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null),c=1e3/60,v.time=p+c,d=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return l(),setTimeout(e,.01)},v.id=d(r)},J=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},G=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],a=0;a<t.length;a++){var i=t[a];e._mTween[i].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[i].id):clearTimeout(e._mTween[i].id),e._mTween[i].id=null,e._mTween[i].stop=1)}},K=function(e,t){try{delete e[t]}catch(a){e[t]=null}},$=function(e){return!(e.which&&1!==e.which)},ee=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},te=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ae=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},ie=function(){var e=function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}();return!!e&&document[e]};e.fn[a]=function(t){return h[t]?h[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):h.init.apply(this,arguments)},e[a]=function(t){return h[t]?h[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):h.init.apply(this,arguments)},e[a].defaults=s,window[a]=!0,e(window).bind("load",function(){e(o)[a](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var a,i,o=e(t),s=o.parents(".mCSB_container");if(s.length)return a=s.parent(),(i=[s[0].offsetTop,s[0].offsetLeft])[0]+ae(o)[0]>=0&&i[0]+ae(o)[0]<a.height()-o.outerHeight(!1)&&i[1]+ae(o)[1]>=0&&i[1]+ae(o)[1]<a.width()-o.outerWidth(!1)},mcsInSight:e.expr[":"].mcsInSight||function(t,a,i){var o,s,n,r,l=e(t),c=l.parents(".mCSB_container"),d="exact"===i[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return o=[l.outerHeight(!1),l.outerWidth(!1)],n=[c[0].offsetTop+ae(l)[0],c[0].offsetLeft+ae(l)[1]],s=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],n[0]-s[0]*(r=[o[0]<s[0]?d[0]:d[1],o[1]<s[1]?d[0]:d[1]])[0][0]<0&&n[0]+o[0]-s[0]*r[0][1]>=0&&n[1]-s[1]*r[1][0]<0&&n[1]+o[1]-s[1]*r[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var a=e(t).data(i);if(a)return a.overflowed[0]||a.overflowed[1]}})})}()});
|
public/js/ivory-search.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function ivory_search_analytics(s,e,i){try{var t="function"==typeof __gaTracker?__gaTracker:"function"==typeof ga&&ga,a="function"==typeof gtag&>ag;if(!1!==a)return void a("event","Ivory Search - "+s,{event_label:e,event_category:i});!1!==t&&t("send",{hitType:"event",eventCategory:i,eventAction:"Ivory Search - "+s,eventLabel:e})}catch(s){}}!function(s){"use strict";s(window).on("load",function(){(s(".is-menu a, .is-menu a svg").on("click",function(e){if(e.stopPropagation(),e.preventDefault(),"static"===s(this).closest("ul").css("position")&&s(this).closest("ul").css("position","relative"),s(this).closest(".is-menu-wrapper").length&&(s(this).closest(".is-menu").hasClass("sliding")||s(this).closest(".is-menu").hasClass("full-width-menu"))&&s(this).closest(".is-menu-wrapper").addClass("is-expanded"),s(this).closest(".is-menu").hasClass("sliding")||s(this).closest(".is-menu").hasClass("full-width-menu")){s(this).closest(".is-menu").find("button.is-search-submit").hide();var i=s(this).closest("li.is-menu").outerHeight();i/=2,s(this).closest(".is-menu").find("form").css({top:i-18+"px"}),s(this).closest(".is-menu").find(".search-close").css({top:i-10+"px"})}if(s(this).closest(".is-menu").hasClass("is-dropdown"))s(this).closest(".is-menu").find("form").fadeIn();else if(s(this).closest(".is-menu").hasClass("sliding"))s(this).closest(".is-menu").find("form").animate({width:"310"},function(){s(this).closest(".is-menu").find("button.is-search-submit").show()});else if(s(this).closest(".is-menu").hasClass("full-width-menu")){
|
1 |
+
function ivory_search_analytics(s,e,i){try{var t="function"==typeof __gaTracker?__gaTracker:"function"==typeof ga&&ga,a="function"==typeof gtag&>ag;if(!1!==a)return void a("event","Ivory Search - "+s,{event_label:e,event_category:i});!1!==t&&t("send",{hitType:"event",eventCategory:i,eventAction:"Ivory Search - "+s,eventLabel:e})}catch(s){}}!function(s){"use strict";s(window).on("load",function(){(s(".is-menu a, .is-menu a svg").on("click",function(e){if(e.stopPropagation(),e.preventDefault(),"static"===s(this).closest("ul").css("position")&&s(this).closest("ul").css("position","relative"),s(this).closest(".is-menu-wrapper").length&&(s(this).closest(".is-menu").hasClass("sliding")||s(this).closest(".is-menu").hasClass("full-width-menu"))&&s(this).closest(".is-menu-wrapper").addClass("is-expanded"),s(this).closest(".is-menu").hasClass("sliding")||s(this).closest(".is-menu").hasClass("full-width-menu")){s(this).closest(".is-menu").find("button.is-search-submit").hide();var i=s(this).closest("li.is-menu").outerHeight();i/=2,s(this).closest(".is-menu").find("form").css({top:i-18+"px"}),s(this).closest(".is-menu").find(".search-close").css({top:i-10+"px"})}if(s(this).closest(".is-menu").hasClass("is-dropdown"))s(this).closest(".is-menu").find("form").fadeIn();else if(s(this).closest(".is-menu").hasClass("sliding"))s(this).closest(".is-menu").find("form").animate({width:"310"},function(){s(this).closest(".is-menu").addClass("open"),s(this).closest(".is-menu").find("button.is-search-submit").show()});else if(s(this).closest(".is-menu").hasClass("full-width-menu")){var t=s(this).closest("ul").outerWidth();if(s(this).closest(".is-menu-wrapper").hasClass("is-expanded"))t=s(window).width(),s(this).closest(".is-menu").find("form").css("right","-5px"),s(this).closest(".is-menu").find(".search-close").hide();else{var a=s(this).offset();if(!s(this).closest(".is-menu").hasClass("is-first")&&a.left<t){t=a.left;var n=s(this).closest("li").outerWidth();n>t&&(t=n)}}s(this).closest(".is-menu").find("form").animate({width:t+"px"},function(){s(this).closest(".is-menu").addClass("active-search"),s(this).closest(".is-menu").addClass("open"),s(this).closest(".is-menu").find("button.is-search-submit").show()})}else s(this).closest(".is-menu").hasClass("popup")&&(s("#is-popup-wrapper").fadeIn(),s('#is-popup-wrapper form input[type="text"], #is-popup-wrapper form input[type="search"]').focus());(s(this).closest(".is-menu").hasClass("sliding")||s(this).closest(".is-menu").hasClass("full-width-menu"))&&s(this).closest(".is-menu").find('form input[type="search"], form input[type="text"]').focus(),s(this).closest(".is-menu").find('form input[type="search"], form input[type="text"]').focus()}),s("#is-popup-wrapper").on("click",function(e){s(e.target).closest("form").length||s("#is-popup-wrapper, .is-ajax-search-result, .is-ajax-search-details").fadeOut()}),"undefined"!=typeof IvorySearchVars&&void 0!==IvorySearchVars.is_analytics_enabled)&&ivory_search_analytics(void 0!==IvorySearchVars.is_id?IvorySearchVars.is_id:"Default",void 0!==IvorySearchVars.is_label?IvorySearchVars.is_label:"",void 0!==IvorySearchVars.is_cat?IvorySearchVars.is_cat:"");window.matchMedia("(max-width: 1024px)").matches&&s(".is-menu a").attr("href",""),s(window).resize(function(){window.matchMedia("(max-width: 1024px)").matches&&s(".is-menu a").attr("href","")})}),s(document).keyup(function(e){27===e.keyCode&&s("#is-popup-wrapper, .is-ajax-search-result, .is-ajax-search-details").hide()}),s('.is-menu form input[type="search"], .is-menu form input[type="text"]').on("click",function(s){return s.stopPropagation(),!1}),s("form.is-search-form, form.search-form").on("mouseover",function(e){s(this).next(".is-link-container").length&&s(this).append(s(this).next(".is-link-container").remove())}),s(window).click(function(e){0===e.button&&0===s(e.target).closest(".is-search-input").length&&0===s(e.target).closest(".is-search-submit").length&&0===s(e.target).closest(".is-ajax-search-result").length&&0===s(e.target).closest(".is-ajax-search-details").length&&(s(".is-menu").hasClass("open")?(s(".is-menu button.is-search-submit").hide(),s(".is-menu form").animate({width:"0"},400,function(){s(".is-menu").removeClass("active-search"),s(".is-menu").removeClass("open"),s(".is-menu-wrapper").removeClass("is-expanded")}),s(".is-ajax-search-result, .is-ajax-search-details").hide()):s(".is-menu").hasClass("is-dropdown")&&(s(".is-menu form").fadeOut(),s(".is-ajax-search-result, .is-ajax-search-details").hide()))})}(jQuery);
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: ivorysearch, vinod dalvi
|
|
3 |
Donate link: https://ivorysearch.com/pricing/
|
4 |
Tags: search, woocommerce search, image search, ajax search, search shortcode, live search, exclude from search, search widget, search menu, search plugin, custom search, search by post type, search by category, relevant search, search forms
|
5 |
Requires at least: 3.9
|
6 |
-
Tested up to: 5.
|
7 |
Requires PHP: 5.2.4
|
8 |
-
Stable tag: 4.6.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -46,7 +46,8 @@ Feel free to ask it using [Contact Form](https://ivorysearch.com/contact/).
|
|
46 |
<li> Exclude specific content from search results.</li>
|
47 |
<li> Display Search Forms anywhere on your site.</li>
|
48 |
<li> Supports multilingual search.</li>
|
49 |
-
<li>
|
|
|
50 |
</ul>
|
51 |
|
52 |
###AJAX Search or Live Search
|
@@ -193,6 +194,9 @@ Yes we do. We try our best to help free users with customisation requests and we
|
|
193 |
|
194 |
== Changelog ==
|
195 |
|
|
|
|
|
|
|
196 |
= 4.6.3 =
|
197 |
* Fixed - Notice displayed on creating new search form and in the plugin settings.
|
198 |
* Fixed - Full width menu search opening and closing issue.
|
3 |
Donate link: https://ivorysearch.com/pricing/
|
4 |
Tags: search, woocommerce search, image search, ajax search, search shortcode, live search, exclude from search, search widget, search menu, search plugin, custom search, search by post type, search by category, relevant search, search forms
|
5 |
Requires at least: 3.9
|
6 |
+
Tested up to: 5.8
|
7 |
Requires PHP: 5.2.4
|
8 |
+
Stable tag: 4.6.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
46 |
<li> Exclude specific content from search results.</li>
|
47 |
<li> Display Search Forms anywhere on your site.</li>
|
48 |
<li> Supports multilingual search.</li>
|
49 |
+
<li> Multilingual Search supported by Weglot</li>
|
50 |
+
<li> Integrates with popular plugins such as WooCommerce, Weglot, Polylang, bbPress, WPML etc.</li>
|
51 |
</ul>
|
52 |
|
53 |
###AJAX Search or Live Search
|
194 |
|
195 |
== Changelog ==
|
196 |
|
197 |
+
= 4.6.4 =
|
198 |
+
* Fixed - AJAX was not working since last plugin version.
|
199 |
+
|
200 |
= 4.6.3 =
|
201 |
* Fixed - Notice displayed on creating new search form and in the plugin settings.
|
202 |
* Fixed - Full width menu search opening and closing issue.
|