window.IVS_AJAX_JS_LOAD=function(){"use strict";jQuery(document).ready(function(e){var t,s=null,i="",a=-1,r=e(document.activeElement).closest("form");function l(s,r){r||(r=1);var l=e(s),o=l.val()||"",n=l.parents(".is-ajax-search"),c=n.attr("data-min-no-for-search")||"",h=n.attr("data-result-box-max-height")||"400",d=e(n).attr("data-form-id");if(e(".is-form-id-"+d+" .is-search-input").val(o),""===i||i!==o.trim()||a!==d)i=o.trim(),a=d;else if(1===r){e("#is-ajax-search-result-"+d).show();return}if(1===r&&n.addClass("processing"),o.length>=c){if(1===r){if(e("#is-ajax-search-result-"+d+", #is-ajax-search-details-"+d).hide(),n.hasClass("is-form-style-1")){var u=n.find(".is-search-submit").outerWidth()+5;n.find(".is-loader-image").css("right",u+"px")}n.find(".is-loader-image").show()}var p={action:"is_ajax_load_posts",page:r,security:IvoryAjaxVars.ajax_nonce},f=n.serialize()+"&"+e.param(p);0===n.find('input[name="id"]').length&&(f+="&id="+d),t&&4!==t.readystate&&t.abort(),t=e.ajax({url:IvoryAjaxVars.ajaxurl,data:f,type:"POST",success:function(t){if("undefined"!=typeof IvorySearchVars&&void 0!==IvorySearchVars.is_analytics_enabled){var s=e(t).find(".is-ajax-search-no-result").length?"Nothing Found":"Results Found";ivory_search_analytics(d,o,s)}if(n.find(".is-loader-image").hide(),n.removeClass("processing"),1===r){var i=n.offset(),a=n.innerHeight(),l=n.outerWidth();l=l<500?500:l,0===e("#is-ajax-search-result-"+d).length&&e("body").append('<div id="is-ajax-search-result-'+d+'" class="is-ajax-search-result"></div>'),e("#is-ajax-search-result-"+d).css({width:l-10+"px"});var c=e("#is-ajax-search-result-"+d).outerWidth(),u=e(window).width(),p=0;if(i.left+c>u&&(p=i.left+c-u),e("#is-ajax-search-result-"+d).css({top:i.top+a+"px",left:i.left-p+"px",width:l-10+"px"}),e("#is-ajax-search-result-"+d).show().html(t),0!==e("#is-ajax-search-details-"+d).length&&e("body > #is-ajax-search-details-"+d).remove(),0!==e("#is-ajax-search-result-"+d+" .is-ajax-search-details").length){e("body").append('<div id="is-ajax-search-details-'+d+'" class="is-ajax-search-details">'+e("#is-ajax-search-result-"+d+" .is-ajax-search-details").html()+"</div>"),e("#is-ajax-search-result-"+d+" .is-ajax-search-details").remove();var f=e("#is-ajax-search-details-"+d).outerWidth(),v=i.left+c;if(i.left+c+f>u+30){var x=i.left-(p+f);x>-30&&(v=x)}e("#is-ajax-search-details-"+d).css({top:i.top+a+"px",left:v+"px"})}}else e("#is-ajax-search-result-"+d+" .is-show-more-results").remove(),e("#is-ajax-search-result-"+d+" .is-ajax-search-posts").append(t),0!==e("#is-ajax-search-result-"+d+" .is-ajax-search-posts .is-show-more-results").length&&(e("#is-ajax-search-result-"+d).append(e("#is-ajax-search-result-"+d+" .is-ajax-search-posts .is-show-more-results")[0].outerHTML),e("#is-ajax-search-result-"+d+" .is-ajax-search-posts .is-show-more-results").remove()),e("#is-ajax-search-details-"+d+" .is-ajax-search-posts-details").append(e("#is-ajax-search-result-"+d+" .is-ajax-search-items .is-ajax-search-posts-details").html()),e("#is-ajax-search-result-"+d+" .is-ajax-search-items .is-ajax-search-details").remove();var g=o.trim().split(" ");if(0!=g.length&&e.isFunction(e.fn.is_highlight)){var m,b,y,$=[".is-ajax-search-result"],E=jQuery.support.opacity?"mark":"span";for(y in $)if(0!=(m=e($[y])).length){for(b in g)m.is_highlight(g[b],E,"is-highlight term-"+b),m.find("*").is_highlight(g[b],E,"is-highlight term-"+b);break}}e("#is-ajax-search-result-"+d+" .is-ajax-search-items, #is-ajax-search-details-"+d+" .is-ajax-search-items").css("max-height",h+"px"),e(".is-ajax-search-items").each(function(e,t){new SimpleBar(t)}),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")}),e(".is-ajax-woocommerce-actions .qty").on("change",function(){e(this).parent().next().find(".add_to_cart_button").attr("data-quantity",e(this).val())})},error:function(e,t,s){console.log(e.statusText),"abort"!==e.statusText&&console.log("AJAX request aborted")}})}else e("#is-ajax-search-result-"+d).hide(),n.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 s=e(window).outerWidth();if(parseInt(s)>=910){var i=e(this).attr("data-id")||"",a=e(t.target).closest(".is-ajax-search-result").attr("id").split(/[-]+/).pop(),r=e("#is-ajax-search-result-"+a).offset(),l=e(".is-form-id-"+a).attr("data-result-box-max-height")||"400";e("#is-ajax-search-details-"+a).css({top:r.top+"px"}),e("#is-ajax-search-details-"+a+" .is-ajax-search-items").css("height",l+"px"),e("#is-ajax-search-details-"+a+" .is-ajax-search-items > div").css("min-height",l+"px"),e(this).parents("div").hasClass("is-ajax-search-tags")&&e("#is-ajax-search-details-"+a+" .is-ajax-search-tags-details").length&&e("#is-ajax-search-details-"+a+' .is-ajax-search-tags-details > div[data-id="'+i+'"]').length?(e("#is-ajax-search-details-"+a+" .is-ajax-search-tags-details, #is-ajax-search-details-"+a).show(),e("#is-ajax-search-details-"+a+" .is-ajax-search-categories-details, #is-ajax-search-details-"+a+" .is-ajax-search-posts-details").hide(),e("#is-ajax-search-details-"+a+" .is-ajax-search-tags-details").find(" > div ").hide(),e("#is-ajax-search-details-"+a+" .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-"+a+" .is-ajax-search-categories-details").length&&e("#is-ajax-search-details-"+a+' .is-ajax-search-categories-details > div[data-id="'+i+'"]').length?(e("#is-ajax-search-details-"+a+" .is-ajax-search-categories-details, #is-ajax-search-details-"+a).show(),e("#is-ajax-search-details-"+a+" .is-ajax-search-tags-details, #is-ajax-search-details-"+a+" .is-ajax-search-posts-details").hide(),e("#is-ajax-search-details-"+a+" .is-ajax-search-categories-details").find("> div ").hide(),e("#is-ajax-search-details-"+a+" .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-"+a+" .is-ajax-search-tags-details, #is-ajax-search-details-"+a+" .is-ajax-search-categories-details").hide(),e("#is-ajax-search-details-"+a+" .is-ajax-search-posts-details").find("> div ").hide(),e("#is-ajax-search-details-"+a+" .is-ajax-search-posts-details, #is-ajax-search-details-"+a).show(),e("#is-ajax-search-details-"+a+" .is-ajax-search-posts-details").find('> div[data-id="'+i+'"] ').show())}}),e(".is-ajax-search .is-search-input").on("focusin, click",function(t){if(r=e(this).closest("form"),""!==e(this).val()&&0===e(t.target).closest("form.processing").length){var s=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-"+s).css({width:i-10+"px"});var a=e(t.target).closest(".is-ajax-search").offset(),l=e(t.target).closest(".is-ajax-search").innerHeight(),o=e("#is-ajax-search-result-"+s).outerWidth(),n=e(window).width(),c=0;if(a.left+o>n&&(c=a.left+o-n),e("#is-ajax-search-result-"+s).css({top:a.top+l+"px",left:a.left-c+"px"}),e(".is-ajax-search-result, .is-ajax-search-details").hide(),e("#is-ajax-search-result-"+s).show(),0!==e("#is-ajax-search-details-"+s).length){var h=e("#is-ajax-search-details-"+s).outerWidth(),d=a.left+o;if(a.left+o+h>n+30){var u=a.left-(c+h);u>-30&&(d=u)}e("#is-ajax-search-details-"+s).css({top:a.top+l+"px",left:d+"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(),r=!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(document).on("click",".is-show-more-results",function(t){var s=e(t.target).closest(".is-ajax-search-result").attr("id").split(/[-]+/).pop();if(e(this).hasClass("redirect-tosr")){e(".is-form-id-"+s).submit();return}e(this).find(".is-show-more-results-text").hide(),e(this).find(".is-load-more-image").show();var i=e(".is-form-id-"+s+" .is-search-input"),a=e(this).attr("data-page")||"";l(i,a)}),e(window).on("resize scroll",function(){if(e(r).hasClass("is-ajax-search")&&""!==e(r).find(".is-search-input").val()){var t=e(r).attr("data-form-id");if(0!==e("#is-ajax-search-result-"+t).length){var s=e(r).offset(),i=e(r).innerHeight(),a=e("#is-ajax-search-result-"+t).outerWidth(),l=e(window).width(),o=0;if(s.left+a>l&&(o=s.left+a-l),e("#is-ajax-search-result-"+t).css({top:s.top+i+"px",left:s.left-o+"px"}),e("#is-ajax-search-result-"+t).show(),0!==e("#is-ajax-search-details-"+t).length){var n=e("#is-ajax-search-details-"+t).outerWidth(),c=s.left+a;if(s.left+a+n>l+30){var h=s.left-(o+n);h>-30&&(c=h)}e("#is-ajax-search-details-"+t).css({top:s.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(r=e(this).closest("form"),32!==t.which){var i=this;window.clearTimeout(s),s=window.setTimeout(function(){s=null,l(i)},500)}if(13===t.which)return t.stopPropagation(),t.preventDefault(),!1})}),e("form.is-ajax-search.is-disable-submit").on("submit",function(t){if(!e(".is-show-more-results.redirect-tosr").length)return t.stopPropagation(),t.preventDefault(),!1})})},IVS_AJAX_JS_LOAD();var SimpleBar=function(){"use strict";var e=function(t,s){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])})(t,s)};function t(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var s="object"==typeof global&&global&&global.Object===Object&&global,i="object"==typeof self&&self&&self.Object===Object&&self,a=s||i||Function("return this")(),r=function(){return a.Date.now()},l=/\s/,o=/^\s+/,n=a.Symbol,c=Object.prototype,h=c.hasOwnProperty,d=c.toString,u=n?n.toStringTag:void 0,p=Object.prototype.toString,f=n?n.toStringTag:void 0,v=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,g=/^0o[0-7]+$/i,m=parseInt;function b(e){if("number"==typeof e)return e;if("symbol"==typeof(s=e)||null!=(i=s)&&"object"==typeof i&&"[object Symbol]"==(null==(a=s)?void 0===a?"[object Undefined]":"[object Null]":f&&f in Object(a)?function(e){var t=h.call(e,u),s=e[u];try{e[u]=void 0;var i=!0}catch(a){}var r=d.call(e);return i&&(t?e[u]=s:delete e[u]),r}(a):(r=a,p.call(r))))return NaN;if(t(e)){var s,i,a,r,n,c="function"==typeof e.valueOf?e.valueOf():e;e=t(c)?c+"":c}if("string"!=typeof e)return 0===e?e:+e;e=(n=e)?n.slice(0,function(e){for(var t=e.length;t--&&l.test(e.charAt(t)););return t}(n)+1).replace(o,""):n;var b=x.test(e);return b||g.test(e)?m(e.slice(2),b?2:8):v.test(e)?NaN:+e}var y=Math.max,$=Math.min;function E(e,s,i){var a,l,o,n,c,h,d=0,u=!1,p=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(t){var s=a,i=l;return a=l=void 0,d=t,n=e.apply(i,s)}function x(e){var t=e-h;return void 0===h||t>=s||t<0||p&&e-d>=o}function g(){var e,t,i=r();if(x(i))return m(i);c=setTimeout(g,(t=s-((e=i)-h),p?$(t,o-(e-d)):t))}function m(e){return c=void 0,f&&a?v(e):(a=l=void 0,n)}function E(){var e,t=r(),i=x(t);if(a=arguments,l=this,h=t,i){if(void 0===c)return d=e=h,c=setTimeout(g,s),u?v(e):n;if(p)return clearTimeout(c),c=setTimeout(g,s),v(h)}return void 0===c&&(c=setTimeout(g,s)),n}return s=b(s)||0,t(i)&&(u=!!i.leading,o=(p="maxWait"in i)?y(b(i.maxWait)||0,s):o,f="trailing"in i?!!i.trailing:f),E.cancel=function(){void 0!==c&&clearTimeout(c),d=0,a=h=l=c=void 0},E.flush=function(){return void 0===c?n:m(r())},E}var j=function(){return(j=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++)for(var a in t=arguments[s])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function w(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function S(e){return e&&e.ownerDocument?e.ownerDocument:document}var O=function(e){return Array.prototype.reduce.call(e,function(e,t){var s=t.name.match(/data-simplebar-(.+)/);if(s){var i=s[1].replace(/\W+(.)/g,function(e,t){return t.toUpperCase()});switch(t.value){case"true":case void 0:e[i]=!0;break;case"false":e[i]=!1;break;default:e[i]=t.value}}return e},{})};function A(e,t){var s;e&&(s=e.classList).add.apply(s,t.split(" "))}function k(e,t){e&&t.split(" ").forEach(function(t){e.classList.remove(t)})}function W(e){return".".concat(e.split(" ").join("."))}var M=!("undefined"==typeof window||!window.document||!window.document.createElement),N=Object.freeze({__proto__:null,addClasses:A,canUseDOM:M,classNamesToQuery:W,getElementDocument:S,getElementWindow:w,getOptions:O,removeClasses:k}),C=null,L=null;function z(){if(null===C){if("undefined"==typeof document)return C=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var s=t.getBoundingClientRect().right;e.removeChild(t),C=s}return C}M&&window.addEventListener("resize",function(){L!==window.devicePixelRatio&&(L=window.devicePixelRatio,C=null)});var _=w,D=S,T=O,R=A,V=k,H=W,P=function(){function e(s,i){void 0===i&&(i={});var a=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var e=_(a.el);a.scrollXTicking||(e.requestAnimationFrame(a.scrollX),a.scrollXTicking=!0),a.scrollYTicking||(e.requestAnimationFrame(a.scrollY),a.scrollYTicking=!0),a.isScrolling||(a.isScrolling=!0,R(a.el,a.classNames.scrolling)),a.showScrollbar("x"),a.showScrollbar("y"),a.onStopScrolling()},this.scrollX=function(){a.axis.x.isOverflowing&&a.positionScrollbar("x"),a.scrollXTicking=!1},this.scrollY=function(){a.axis.y.isOverflowing&&a.positionScrollbar("y"),a.scrollYTicking=!1},this._onStopScrolling=function(){V(a.el,a.classNames.scrolling),a.options.autoHide&&(a.hideScrollbar("x"),a.hideScrollbar("y")),a.isScrolling=!1},this.onMouseEnter=function(){a.isMouseEntering||(R(a.el,a.classNames.mouseEntered),a.showScrollbar("x"),a.showScrollbar("y"),a.isMouseEntering=!0),a.onMouseEntered()},this._onMouseEntered=function(){V(a.el,a.classNames.mouseEntered),a.options.autoHide&&(a.hideScrollbar("x"),a.hideScrollbar("y")),a.isMouseEntering=!1},this._onMouseMove=function(e){a.mouseX=e.clientX,a.mouseY=e.clientY,(a.axis.x.isOverflowing||a.axis.x.forceVisible)&&a.onMouseMoveForAxis("x"),(a.axis.y.isOverflowing||a.axis.y.forceVisible)&&a.onMouseMoveForAxis("y")},this.onMouseLeave=function(){a.onMouseMove.cancel(),(a.axis.x.isOverflowing||a.axis.x.forceVisible)&&a.onMouseLeaveForAxis("x"),(a.axis.y.isOverflowing||a.axis.y.forceVisible)&&a.onMouseLeaveForAxis("y"),a.mouseX=-1,a.mouseY=-1},this._onWindowResize=function(){a.scrollbarWidth=a.getScrollbarWidth(),a.hideNativeScrollbar()},this.onPointerEvent=function(e){var t,s;a.axis.x.track.el&&a.axis.y.track.el&&a.axis.x.scrollbar.el&&a.axis.y.scrollbar.el&&(a.axis.x.track.rect=a.axis.x.track.el.getBoundingClientRect(),a.axis.y.track.rect=a.axis.y.track.el.getBoundingClientRect(),(a.axis.x.isOverflowing||a.axis.x.forceVisible)&&(t=a.isWithinBounds(a.axis.x.track.rect)),(a.axis.y.isOverflowing||a.axis.y.forceVisible)&&(s=a.isWithinBounds(a.axis.y.track.rect)),(t||s)&&(e.stopPropagation(),"pointerdown"===e.type&&"touch"!==e.pointerType&&(t&&(a.axis.x.scrollbar.rect=a.axis.x.scrollbar.el.getBoundingClientRect(),a.isWithinBounds(a.axis.x.scrollbar.rect)?a.onDragStart(e,"x"):a.onTrackClick(e,"x")),s&&(a.axis.y.scrollbar.rect=a.axis.y.scrollbar.el.getBoundingClientRect(),a.isWithinBounds(a.axis.y.scrollbar.rect)?a.onDragStart(e,"y"):a.onTrackClick(e,"y")))))},this.drag=function(t){var s,i,r,l,o,n,c,h,d,u,p;if(a.draggedAxis&&a.contentWrapperEl){var f=a.axis[a.draggedAxis].track,v=null!==(i=null===(s=f.rect)||void 0===s?void 0:s[a.axis[a.draggedAxis].sizeAttr])&&void 0!==i?i:0,x=a.axis[a.draggedAxis].scrollbar,g=null!==(l=null===(r=a.contentWrapperEl)||void 0===r?void 0:r[a.axis[a.draggedAxis].scrollSizeAttr])&&void 0!==l?l:0,m=parseInt(null!==(n=null===(o=a.elStyles)||void 0===o?void 0:o[a.axis[a.draggedAxis].sizeAttr])&&void 0!==n?n:"0px",10);t.preventDefault(),t.stopPropagation();var b=("y"===a.draggedAxis?t.pageY:t.pageX)-(null!==(h=null===(c=f.rect)||void 0===c?void 0:c[a.axis[a.draggedAxis].offsetAttr])&&void 0!==h?h:0)-a.axis[a.draggedAxis].dragOffset,y=(b="x"===a.draggedAxis&&a.isRtl?(null!==(u=null===(d=f.rect)||void 0===d?void 0:d[a.axis[a.draggedAxis].sizeAttr])&&void 0!==u?u:0)-x.size-b:b)/(v-x.size)*(g-m);"x"===a.draggedAxis&&a.isRtl&&(y=(null===(p=e.getRtlHelpers())||void 0===p?void 0:p.isScrollingToNegative)?-y:y),a.contentWrapperEl[a.axis[a.draggedAxis].scrollOffsetAttr]=y}},this.onEndDrag=function(e){a.isDragging=!1;var t=D(a.el),s=_(a.el);e.preventDefault(),e.stopPropagation(),V(a.el,a.classNames.dragging),a.onStopScrolling(),t.removeEventListener("mousemove",a.drag,!0),t.removeEventListener("mouseup",a.onEndDrag,!0),a.removePreventClickId=s.setTimeout(function(){t.removeEventListener("click",a.preventClick,!0),t.removeEventListener("dblclick",a.preventClick,!0),a.removePreventClickId=null})},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=s,this.options=j(j({},e.defaultOptions),i),this.classNames=j(j({},e.defaultOptions.classNames),i.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},"object"!=typeof this.el||!this.el.nodeName)throw Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=function(e,s,i){var a=!0,r=!0;if("function"!=typeof e)throw TypeError("Expected a function");return t(i)&&(a="leading"in i?!!i.leading:a,r="trailing"in i?!!i.trailing:r),E(e,s,{leading:a,maxWait:s,trailing:r})}(this._onMouseMove,64),this.onWindowResize=E(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=E(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=E(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var s=t.firstElementChild,i=null==s?void 0:s.firstElementChild;if(!i)return null;document.body.appendChild(s),s.scrollLeft=0;var a=e.getOffset(s),r=e.getOffset(i);s.scrollLeft=-999;var l=e.getOffset(i);return document.body.removeChild(s),e.rtlHelpers={isScrollOriginAtZero:a.left!==r.left,isScrollingToNegative:r.left!==l.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:z()}catch(e){return z()}},e.getOffset=function(e){var t=e.getBoundingClientRect(),s=D(e),i=_(e);return{top:t.top+(i.pageYOffset||s.documentElement.scrollTop),left:t.left+(i.pageXOffset||s.documentElement.scrollLeft)}},e.prototype.init=function(){M&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var e,t;this.wrapperEl=this.el.querySelector(H(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(H(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(H(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(H(this.classNames.offset)),this.maskEl=this.el.querySelector(H(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,H(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(H(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(H(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(H(this.classNames.track)).concat(H(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(H(this.classNames.track)).concat(H(this.classNames.vertical))),this.axis.x.scrollbar.el=(null===(e=this.axis.x.track.el)||void 0===e?void 0:e.querySelector(H(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=(null===(t=this.axis.y.track.el)||void 0===t?void 0:t.querySelector(H(this.classNames.scrollbar)))||null,this.options.autoHide||(R(this.axis.x.scrollbar.el,this.classNames.visible),R(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var e,t=this,s=_(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),null===(e=this.contentWrapperEl)||void 0===e||e.addEventListener("scroll",this.onScroll),s.addEventListener("resize",this.onWindowResize),this.contentEl){if(window.ResizeObserver){var i=!1,a=s.ResizeObserver||ResizeObserver;this.resizeObserver=new a(function(){i&&s.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),s.requestAnimationFrame(function(){i=!0})}this.mutationObserver=new s.MutationObserver(function(){s.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(this.heightAutoObserverEl&&this.contentEl&&this.contentWrapperEl&&this.wrapperEl&&this.placeholderEl){var e=_(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.contentEl.offsetWidth,s=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1||t>0,a=this.contentWrapperEl.offsetWidth,r=this.elStyles.overflowX,l=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var o=this.contentEl.scrollHeight,n=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=s?"auto":"100%",this.placeholderEl.style.width=i?"".concat(t||n,"px"):"auto",this.placeholderEl.style.height="".concat(o,"px");var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=0!==t&&n>t,this.axis.y.isOverflowing=o>c,this.axis.x.isOverflowing="hidden"!==r&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==l&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var h=this.axis.x.isOverflowing?this.scrollbarWidth:0,d=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&n>a-d,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&o>c-h,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing||!this.contentEl)return 0;var t,s,i,a=this.contentEl[this.axis[e].scrollSizeAttr],r=null!==(s=null===(t=this.axis[e].track.el)||void 0===t?void 0:t[this.axis[e].offsetSizeAttr])&&void 0!==s?s:0;return i=Math.max(~~(r/a*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(i=Math.min(i,this.options.scrollbarMaxSize)),i},e.prototype.positionScrollbar=function(t){void 0===t&&(t="y");var s,i,a,r=this.axis[t].scrollbar;if(this.axis[t].isOverflowing&&this.contentWrapperEl&&r.el&&this.elStyles){var l=this.contentWrapperEl[this.axis[t].scrollSizeAttr],o=(null===(s=this.axis[t].track.el)||void 0===s?void 0:s[this.axis[t].offsetSizeAttr])||0,n=parseInt(this.elStyles[this.axis[t].sizeAttr],10),c=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];c="x"===t&&this.isRtl&&(null===(i=e.getRtlHelpers())||void 0===i?void 0:i.isScrollOriginAtZero)?-c:c,"x"===t&&this.isRtl&&(c=(null===(a=e.getRtlHelpers())||void 0===a?void 0:a.isScrollingToNegative)?c:-c);var h=c/(l-n),d=~~((o-r.size)*h);d="x"===t&&this.isRtl?-d+(o-r.size):d,r.el.style.transform="x"===t?"translate3d(".concat(d,"px, 0, 0)"):"translate3d(0, ".concat(d,"px, 0)")}},e.prototype.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,s=this.axis[e].scrollbar.el;t&&s&&this.contentWrapperEl&&(this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(e))):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(e))),this.axis[e].isOverflowing?s.style.display="block":s.style.display="none")},e.prototype.showScrollbar=function(e){void 0===e&&(e="y"),this.axis[e].isOverflowing&&!this.axis[e].scrollbar.isVisible&&(R(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(e){void 0===e&&(e="y"),this.isDragging||this.axis[e].isOverflowing&&this.axis[e].scrollbar.isVisible&&(V(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(e){void 0===e&&(e="y");var t=this.axis[e];t.track.el&&t.scrollbar.el&&(t.track.rect=t.track.el.getBoundingClientRect(),t.scrollbar.rect=t.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(t.track.rect)?(this.showScrollbar(e),R(t.track.el,this.classNames.hover),this.isWithinBounds(t.scrollbar.rect)?R(t.scrollbar.el,this.classNames.hover):V(t.scrollbar.el,this.classNames.hover)):(V(t.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)))},e.prototype.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),V(this.axis[e].track.el,this.classNames.hover),V(this.axis[e].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)},e.prototype.onDragStart=function(e,t){void 0===t&&(t="y"),this.isDragging=!0;var s,i=D(this.el),a=_(this.el),r=this.axis[t].scrollbar,l="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=l-((null===(s=r.rect)||void 0===s?void 0:s[this.axis[t].offsetAttr])||0),this.draggedAxis=t,R(this.el,this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(e,t){var s,i,a,r,l=this;void 0===t&&(t="y");var o=this.axis[t];if(this.options.clickOnTrack&&o.scrollbar.el&&this.contentWrapperEl){e.preventDefault();var n=_(this.el);this.axis[t].scrollbar.rect=o.scrollbar.el.getBoundingClientRect();var c=null!==(i=null===(s=this.axis[t].scrollbar.rect)||void 0===s?void 0:s[this.axis[t].offsetAttr])&&void 0!==i?i:0,h=parseInt(null!==(r=null===(a=this.elStyles)||void 0===a?void 0:a[this.axis[t].sizeAttr])&&void 0!==r?r:"0px",10),d=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],u=("y"===t?this.mouseY-c:this.mouseX-c)<0?-1:1,p=-1===u?d-h:d+h,f=function(){l.contentWrapperEl&&(-1===u?d>p&&(d-=40,l.contentWrapperEl[l.axis[t].scrollOffsetAttr]=d,n.requestAnimationFrame(f)):d<p&&(d+=40,l.contentWrapperEl[l.axis[t].scrollOffsetAttr]=d,n.requestAnimationFrame(f)))};f()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var e=_(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},e.prototype.findChild=function(e,t){var s=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,function(e){return s.call(e,t)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=T,e.helpers=N,e}(),q=P.helpers,B=q.getOptions,X=q.addClasses,Y=q.canUseDOM,F=function(t){function s(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var a=t.apply(this,e)||this;return s.instances.set(e[0],a),a}return function(t,s){if("function"!=typeof s&&null!==s)throw TypeError("Class extends value "+String(s)+" is not a constructor or null");function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}(s,t),s.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(e){"init"===e.getAttribute("data-simplebar")||s.instances.has(e)||new s(e,B(e.attributes))})},s.removeObserver=function(){var e;null===(e=s.globalObserver)||void 0===e||e.disconnect()},s.prototype.initDOM=function(){var e,t,s,i=this;if(!Array.prototype.filter.call(this.el.children,function(e){return e.classList.contains(i.classNames.wrapper)}).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),X(this.wrapperEl,this.classNames.wrapper),X(this.contentWrapperEl,this.classNames.contentWrapper),X(this.offsetEl,this.classNames.offset),X(this.maskEl,this.classNames.mask),X(this.contentEl,this.classNames.contentEl),X(this.placeholderEl,this.classNames.placeholder),X(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),X(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),null===(e=this.contentWrapperEl)||void 0===e||e.setAttribute("tabindex",this.options.tabIndex.toString()),null===(t=this.contentWrapperEl)||void 0===t||t.setAttribute("role","region"),null===(s=this.contentWrapperEl)||void 0===s||s.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var a=document.createElement("div"),r=document.createElement("div");X(a,this.classNames.track),X(r,this.classNames.scrollbar),a.appendChild(r),this.axis.x.track.el=a.cloneNode(!0),X(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=a.cloneNode(!0),X(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}P.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},s.prototype.unMount=function(){P.prototype.unMount.call(this),s.instances.delete(this.el)},s.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(s.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"!==document.readyState&&("loading"===document.readyState||document.documentElement.doScroll)?(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements)):window.setTimeout(this.initDOMLoadedElements)},s.handleMutations=function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!s.instances.has(e)&&document.documentElement.contains(e)&&new s(e,B(e.attributes)):e.querySelectorAll("[data-simplebar]").forEach(function(e){"init"!==e.getAttribute("data-simplebar")&&!s.instances.has(e)&&document.documentElement.contains(e)&&new s(e,B(e.attributes))}))}),e.removedNodes.forEach(function(e){var t;1!==e.nodeType||("init"===e.getAttribute("data-simplebar")?document.documentElement.contains(e)||null===(t=s.instances.get(e))||void 0===t||t.unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),function(e){var t;document.documentElement.contains(e)||null===(t=s.instances.get(e))||void 0===t||t.unMount()}))})})},s.instances=new WeakMap,s}(P);return Y&&F.initHtmlApi(),F}();