2 lines
23 KiB
JavaScript
2 lines
23 KiB
JavaScript
/*! For license information please see mazer.js.LICENSE.txt */
|
|
(()=>{var t={750:()=>{function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,i,r){void 0===e&&(e=400),void 0===r&&(r=!1),t.style.overflow="hidden",r&&(t.style.display="block");var n,o=window.getComputedStyle(t),l=parseFloat(o.getPropertyValue("height")),s=parseFloat(o.getPropertyValue("padding-top")),a=parseFloat(o.getPropertyValue("padding-bottom")),c=parseFloat(o.getPropertyValue("margin-top")),h=parseFloat(o.getPropertyValue("margin-bottom")),d=l/e,u=s/e,p=a/e,f=c/e,v=h/e;window.requestAnimationFrame((function o(g){void 0===n&&(n=g);var b=g-n;r?(t.style.height=d*b+"px",t.style.paddingTop=u*b+"px",t.style.paddingBottom=p*b+"px",t.style.marginTop=f*b+"px",t.style.marginBottom=v*b+"px"):(t.style.height=l-d*b+"px",t.style.paddingTop=s-u*b+"px",t.style.paddingBottom=a-p*b+"px",t.style.marginTop=c-f*b+"px",t.style.marginBottom=h-v*b+"px"),b>=e?(t.style.height="",t.style.paddingTop="",t.style.paddingBottom="",t.style.marginTop="",t.style.marginBottom="",t.style.overflow="",r||(t.style.display="none"),"function"==typeof i&&i()):window.requestAnimationFrame(o)}))}var r=function(){function r(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,r),this.sidebarEL=e instanceof HTMLElement?e:document.querySelector(e),this.options=i,this.init()}var n,o,l;return n=r,(o=[{key:"init",value:function(){var t=this;document.querySelectorAll(".burger-btn").forEach((function(e){return e.addEventListener("click",t.toggle.bind(t))})),document.querySelectorAll(".sidebar-hide").forEach((function(e){return e.addEventListener("click",t.toggle.bind(t))})),window.addEventListener("resize",this.onResize.bind(this));for(var e=document.querySelectorAll(".sidebar-item.has-sub"),r=function(){var r=e[n];e[n].querySelector(".sidebar-link").addEventListener("click",(function(e){e.preventDefault();var n=r.querySelector(".submenu");n.classList.contains("active")&&(n.style.display="block"),"none"==n.style.display?n.classList.add("active"):n.classList.remove("active"),function(t,e,r){0===t.clientHeight?i(t,e,r,!0):i(t,e,r)}(n,300,(function(){return t.forceElementVisibility(r)}))}))},n=0;n<e.length;n++)r();if("function"==typeof PerfectScrollbar){var o=document.querySelector(".sidebar-wrapper");new PerfectScrollbar(o,{wheelPropagation:!1})}setTimeout((function(){var t;return null===(t=document.querySelector(".sidebar-item.active"))||void 0===t?void 0:t.scrollIntoView(!1)}),100),this.onFirstLoad()}},{key:"onFirstLoad",value:function(){window.innerWidth<1200&&this.sidebarEL.classList.remove("active")}},{key:"onResize",value:function(){window.innerWidth<1200?this.sidebarEL.classList.remove("active"):this.sidebarEL.classList.add("active"),this.deleteBackdrop(),this.toggleOverflowBody(!0)}},{key:"toggle",value:function(){this.sidebarEL.classList.contains("active")?this.hide():this.show()}},{key:"show",value:function(){this.sidebarEL.classList.add("active"),this.createBackdrop(),this.toggleOverflowBody()}},{key:"hide",value:function(){this.sidebarEL.classList.remove("active"),this.deleteBackdrop(),this.toggleOverflowBody()}},{key:"createBackdrop",value:function(){if(!(window.body.clientWidth<1200)){this.deleteBackdrop();var t=document.createElement("div");t.classList.add("sidebar-backdrop"),t.addEventListener("click",this.hide.bind(this)),document.body.appendChild(t)}}},{key:"deleteBackdrop",value:function(){var t=document.querySelector(".sidebar-backdrop");t&&t.remove()}},{key:"toggleOverflowBody",value:function(t){var e=this.sidebarEL.classList.contains("active"),i=document.querySelector("body");i.style.overflowY=void 0===t?e?"hidden":"auto":t?"auto":"hidden"}},{key:"isElementInViewport",value:function(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}},{key:"forceElementVisibility",value:function(t){this.isElementInViewport(t)||t.scrollIntoView(!1)}}])&&e(n.prototype,o),l&&e(n,l),Object.defineProperty(n,"prototype",{writable:!1}),r}(),n=document.getElementById("sidebar");n&&(window.sidebar=new r(n))},225:function(t){t.exports=function(){"use strict";var t=Math.abs,e=Math.floor;function i(t){return getComputedStyle(t)}function r(t,e){for(var i in e){var r=e[i];"number"==typeof r&&(r+="px"),t.style[i]=r}return t}function n(t){var e=document.createElement("div");return e.className=t,e}function o(t,e){if(!Y)throw new Error("No element matching method supported");return Y.call(t,e)}function l(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function s(t,e){return Array.prototype.filter.call(t.children,(function(t){return o(t,e)}))}function a(t,e){var i=t.element.classList,r=L.state.scrolling(e);i.contains(r)?clearTimeout(X[e]):i.add(r)}function c(t,e){X[e]=setTimeout((function(){return t.isAlive&&t.element.classList.remove(L.state.scrolling(e))}),t.settings.scrollingThreshold)}function h(t,e){a(t,e),c(t,e)}function d(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function u(t,e,i,r,n){var o;if(void 0===r&&(r=!0),void 0===n&&(n=!1),"top"===e)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}p(t,i,o,r,n)}function p(t,e,i,r,n){var o=i[0],l=i[1],s=i[2],a=i[3],c=i[4],u=i[5];void 0===r&&(r=!0),void 0===n&&(n=!1);var p=t.element;t.reach[a]=null,1>p[s]&&(t.reach[a]="start"),p[s]>t[o]-t[l]-1&&(t.reach[a]="end"),e&&(p.dispatchEvent(d("ps-scroll-"+a)),0>e?p.dispatchEvent(d("ps-scroll-"+c)):0<e&&p.dispatchEvent(d("ps-scroll-"+u)),r&&h(t,a)),t.reach[a]&&(e||n)&&p.dispatchEvent(d("ps-"+a+"-reach-"+t.reach[a]))}function f(t){return parseInt(t,10)||0}function v(t){return o(t,"input,[contenteditable]")||o(t,"select,[contenteditable]")||o(t,"textarea,[contenteditable]")||o(t,"button,[contenteditable]")}function g(t){var e=i(t);return f(e.width)+f(e.paddingLeft)+f(e.paddingRight)+f(e.borderLeftWidth)+f(e.borderRightWidth)}function b(t){var i=Math.round,r=t.element,n=e(r.scrollTop),o=r.getBoundingClientRect();t.containerWidth=i(o.width),t.containerHeight=i(o.height),t.contentWidth=r.scrollWidth,t.contentHeight=r.scrollHeight,r.contains(t.scrollbarXRail)||(s(r,L.element.rail("x")).forEach((function(t){return l(t)})),r.appendChild(t.scrollbarXRail)),r.contains(t.scrollbarYRail)||(s(r,L.element.rail("y")).forEach((function(t){return l(t)})),r.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=m(t,f(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=f((t.negativeScrollAdjustment+r.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=m(t,f(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=f(n*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),y(r,t),t.scrollbarXActive?r.classList.add(L.state.active("x")):(r.classList.remove(L.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,r.scrollLeft=!0===t.isRtl?t.contentWidth:0),t.scrollbarYActive?r.classList.add(L.state.active("y")):(r.classList.remove(L.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,r.scrollTop=0)}function m(t,e){var i=Math.min,r=Math.max;return t.settings.minScrollbarLength&&(e=r(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=i(e,t.settings.maxScrollbarLength)),e}function y(t,i){var n={width:i.railXWidth},o=e(t.scrollTop);n.left=i.isRtl?i.negativeScrollAdjustment+t.scrollLeft+i.containerWidth-i.contentWidth:t.scrollLeft,i.isScrollbarXUsingBottom?n.bottom=i.scrollbarXBottom-o:n.top=i.scrollbarXTop+o,r(i.scrollbarXRail,n);var l={top:o,height:i.railYHeight};i.isScrollbarYUsingRight?i.isRtl?l.right=i.contentWidth-(i.negativeScrollAdjustment+t.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth-9:l.right=i.scrollbarYRight-t.scrollLeft:i.isRtl?l.left=i.negativeScrollAdjustment+t.scrollLeft+2*i.containerWidth-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth:l.left=i.scrollbarYLeft+t.scrollLeft,r(i.scrollbarYRail,l),r(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth}),r(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}function w(t,e){function i(e){e.touches&&e.touches[0]&&(e[s]=e.touches[0].pageY),g[p]=m+w*(e[s]-y),a(t,f),b(t),e.stopPropagation(),e.type.startsWith("touch")&&1<e.changedTouches.length&&e.preventDefault()}function r(){c(t,f),t[v].classList.remove(L.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",i)}function n(e,n){m=g[p],n&&e.touches&&(e[s]=e.touches[0].pageY),y=e[s],w=(t[l]-t[o])/(t[h]-t[u]),n?t.event.bind(t.ownerDocument,"touchmove",i):(t.event.bind(t.ownerDocument,"mousemove",i),t.event.once(t.ownerDocument,"mouseup",r),e.preventDefault()),t[v].classList.add(L.state.clicking),e.stopPropagation()}var o=e[0],l=e[1],s=e[2],h=e[3],d=e[4],u=e[5],p=e[6],f=e[7],v=e[8],g=t.element,m=null,y=null,w=null;t.event.bind(t[d],"mousedown",(function(t){n(t)})),t.event.bind(t[d],"touchstart",(function(t){n(t,!0)}))}var Y="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),L={main:"ps",rtl:"ps__rtl",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},X={x:null,y:null},W=function(t){this.element=t,this.handlers={}},E={isEmpty:{configurable:!0}};W.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},W.prototype.unbind=function(t,e){var i=this;this.handlers[t]=this.handlers[t].filter((function(r){return!(!e||r===e)||(i.element.removeEventListener(t,r,!1),!1)}))},W.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},E.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every((function(e){return 0===t.handlers[e].length}))},Object.defineProperties(W.prototype,E);var T=function(){this.eventElements=[]};T.prototype.eventElement=function(t){var e=this.eventElements.filter((function(e){return e.element===t}))[0];return e||(e=new W(t),this.eventElements.push(e)),e},T.prototype.bind=function(t,e,i){this.eventElement(t).bind(e,i)},T.prototype.unbind=function(t,e,i){var r=this.eventElement(t);r.unbind(e,i),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},T.prototype.unbindAll=function(){this.eventElements.forEach((function(t){return t.unbindAll()})),this.eventElements=[]},T.prototype.once=function(t,e,i){var r=this.eventElement(t),n=function(t){r.unbind(e,n),i(t)};r.bind(e,n)};var R={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&0<window.navigator.maxTouchPoints||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},S=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},H={"click-rail":function(t){t.element,t.event.bind(t.scrollbarY,"mousedown",(function(t){return t.stopPropagation()})),t.event.bind(t.scrollbarYRail,"mousedown",(function(e){var i=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=i*t.containerHeight,b(t),e.stopPropagation()})),t.event.bind(t.scrollbarX,"mousedown",(function(t){return t.stopPropagation()})),t.event.bind(t.scrollbarXRail,"mousedown",(function(e){var i=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=i*t.containerWidth,b(t),e.stopPropagation()}))},"drag-thumb":function(t){w(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),w(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){function i(i,n){var o=e(r.scrollTop);if(0===i){if(!t.scrollbarYActive)return!1;if(0===o&&0<n||o>=t.contentHeight-t.containerHeight&&0>n)return!t.settings.wheelPropagation}var l=r.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===l&&0>i||l>=t.contentWidth-t.containerWidth&&0<i)return!t.settings.wheelPropagation}return!0}var r=t.element,n=function(){return o(r,":hover")},l=function(){return o(t.scrollbarX,":focus")||o(t.scrollbarY,":focus")};t.event.bind(t.ownerDocument,"keydown",(function(e){if(!(e.isDefaultPrevented&&e.isDefaultPrevented()||e.defaultPrevented)&&(n()||l())){var o=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(o){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(v(o))return}var s=0,a=0;switch(e.which){case 37:s=e.metaKey?-t.contentWidth:e.altKey?-t.containerWidth:-30;break;case 38:a=e.metaKey?t.contentHeight:e.altKey?t.containerHeight:30;break;case 39:s=e.metaKey?t.contentWidth:e.altKey?t.containerWidth:30;break;case 40:a=e.metaKey?-t.contentHeight:e.altKey?-t.containerHeight:-30;break;case 32:a=e.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:a=t.containerHeight;break;case 34:a=-t.containerHeight;break;case 36:a=t.contentHeight;break;case 35:a=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==s||t.settings.suppressScrollY&&0!==a||(r.scrollTop-=a,r.scrollLeft+=s,b(t),i(s,a)&&e.preventDefault())}}))},wheel:function(r){function n(i,n){var o=e(a.scrollTop),l=0===a.scrollTop,s=o+a.offsetHeight===a.scrollHeight,c=0===a.scrollLeft,h=a.scrollLeft+a.offsetWidth===a.scrollWidth;return!(t(n)>t(i)?l||s:c||h)||!r.settings.wheelPropagation}function o(t){var e=t.deltaX,i=-1*t.deltaY;return(void 0===e||void 0===i)&&(e=-1*t.wheelDeltaX/6,i=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,i*=10),e!=e&&i!=i&&(e=0,i=t.wheelDelta),t.shiftKey?[-i,-e]:[e,i]}function l(t,e,r){if(!R.isWebKit&&a.querySelector("select:focus"))return!0;if(!a.contains(t))return!1;for(var n=t;n&&n!==a;){if(n.classList.contains(L.element.consuming))return!0;var o=i(n);if(r&&o.overflowY.match(/(scroll|auto)/)){var l=n.scrollHeight-n.clientHeight;if(0<l&&(0<n.scrollTop&&0>r||n.scrollTop<l&&0<r))return!0}if(e&&o.overflowX.match(/(scroll|auto)/)){var s=n.scrollWidth-n.clientWidth;if(0<s&&(0<n.scrollLeft&&0>e||n.scrollLeft<s&&0<e))return!0}n=n.parentNode}return!1}function s(t){var e=o(t),i=e[0],s=e[1];if(!l(t.target,i,s)){var c=!1;r.settings.useBothWheelAxes?r.scrollbarYActive&&!r.scrollbarXActive?(s?a.scrollTop-=s*r.settings.wheelSpeed:a.scrollTop+=i*r.settings.wheelSpeed,c=!0):r.scrollbarXActive&&!r.scrollbarYActive&&(i?a.scrollLeft+=i*r.settings.wheelSpeed:a.scrollLeft-=s*r.settings.wheelSpeed,c=!0):(a.scrollTop-=s*r.settings.wheelSpeed,a.scrollLeft+=i*r.settings.wheelSpeed),b(r),(c=c||n(i,s))&&!t.ctrlKey&&(t.stopPropagation(),t.preventDefault())}}var a=r.element;void 0===window.onwheel?void 0!==window.onmousewheel&&r.event.bind(a,"mousewheel",s):r.event.bind(a,"wheel",s)},touch:function(r){function n(i,n){var o=e(u.scrollTop),l=u.scrollLeft,s=t(i),a=t(n);if(a>s){if(0>n&&o===r.contentHeight-r.containerHeight||0<n&&0===o)return 0===window.scrollY&&0<n&&R.isChrome}else if(s>a&&(0>i&&l===r.contentWidth-r.containerWidth||0<i&&0===l))return!0;return!0}function o(t,e){u.scrollTop-=e,u.scrollLeft-=t,b(r)}function l(t){return t.targetTouches?t.targetTouches[0]:t}function s(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function a(t){if(s(t)){var e=l(t);p.pageX=e.pageX,p.pageY=e.pageY,f=(new Date).getTime(),null!==g&&clearInterval(g)}}function c(t,e,r){if(!u.contains(t))return!1;for(var n=t;n&&n!==u;){if(n.classList.contains(L.element.consuming))return!0;var o=i(n);if(r&&o.overflowY.match(/(scroll|auto)/)){var l=n.scrollHeight-n.clientHeight;if(0<l&&(0<n.scrollTop&&0>r||n.scrollTop<l&&0<r))return!0}if(e&&o.overflowX.match(/(scroll|auto)/)){var s=n.scrollWidth-n.clientWidth;if(0<s&&(0<n.scrollLeft&&0>e||n.scrollLeft<s&&0<e))return!0}n=n.parentNode}return!1}function h(t){if(s(t)){var e=l(t),i={pageX:e.pageX,pageY:e.pageY},r=i.pageX-p.pageX,a=i.pageY-p.pageY;if(c(t.target,r,a))return;o(r,a),p=i;var h=(new Date).getTime(),d=h-f;0<d&&(v.x=r/d,v.y=a/d,f=h),n(r,a)&&t.preventDefault()}}function d(){r.settings.swipeEasing&&(clearInterval(g),g=setInterval((function(){return r.isInitialized?void clearInterval(g):v.x||v.y?.01>t(v.x)&&.01>t(v.y)?void clearInterval(g):r.element?(o(30*v.x,30*v.y),v.x*=.8,void(v.y*=.8)):void clearInterval(g):void clearInterval(g)}),10))}if(R.supportsTouch||R.supportsIePointer){var u=r.element,p={},f=0,v={},g=null;R.supportsTouch?(r.event.bind(u,"touchstart",a),r.event.bind(u,"touchmove",h),r.event.bind(u,"touchend",d)):R.supportsIePointer&&(window.PointerEvent?(r.event.bind(u,"pointerdown",a),r.event.bind(u,"pointermove",h),r.event.bind(u,"pointerup",d)):window.MSPointerEvent&&(r.event.bind(u,"MSPointerDown",a),r.event.bind(u,"MSPointerMove",h),r.event.bind(u,"MSPointerUp",d)))}}},k=function(t,o){var l=this;if(void 0===o&&(o={}),"string"==typeof t&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var s in this.element=t,t.classList.add(L.main),this.settings=S(),o)this.settings[s]=o[s];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var a=function(){return t.classList.add(L.state.focus)},c=function(){return t.classList.remove(L.state.focus)};this.isRtl="rtl"===i(t).direction,!0===this.isRtl&&t.classList.add(L.rtl),this.isNegativeScroll=function(){var e=t.scrollLeft,i=null;return t.scrollLeft=-1,i=0>t.scrollLeft,t.scrollLeft=e,i}(),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new T,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=n(L.element.rail("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=n(L.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",c),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var h=i(this.scrollbarXRail);this.scrollbarXBottom=parseInt(h.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=f(h.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=f(h.borderLeftWidth)+f(h.borderRightWidth),r(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=f(h.marginLeft)+f(h.marginRight),r(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=n(L.element.rail("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=n(L.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",c),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var d=i(this.scrollbarYRail);this.scrollbarYRight=parseInt(d.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=f(d.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?g(this.scrollbarY):null,this.railBorderYWidth=f(d.borderTopWidth)+f(d.borderBottomWidth),r(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=f(d.marginTop)+f(d.marginBottom),r(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:0>=t.scrollLeft?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:0>=t.scrollTop?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(t){return H[t](l)})),this.lastScrollTop=e(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",(function(t){return l.onScroll(t)})),b(this)};return k.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,r(this.scrollbarXRail,{display:"block"}),r(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=f(i(this.scrollbarXRail).marginLeft)+f(i(this.scrollbarXRail).marginRight),this.railYMarginHeight=f(i(this.scrollbarYRail).marginTop)+f(i(this.scrollbarYRail).marginBottom),r(this.scrollbarXRail,{display:"none"}),r(this.scrollbarYRail,{display:"none"}),b(this),u(this,"top",0,!1,!0),u(this,"left",0,!1,!0),r(this.scrollbarXRail,{display:""}),r(this.scrollbarYRail,{display:""}))},k.prototype.onScroll=function(){this.isAlive&&(b(this),u(this,"top",this.element.scrollTop-this.lastScrollTop),u(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=e(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},k.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),l(this.scrollbarX),l(this.scrollbarY),l(this.scrollbarXRail),l(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},k.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(t){return!t.match(/^ps([-_].+|)$/)})).join(" ")},k}()}},e={};function i(r){var n=e[r];if(void 0!==n)return n.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,i),o.exports}i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";window.PerfectScrollbar=i(225);i(750)})()})(); |