(self.webpackChunk=self.webpackChunk||[]).push([[6229],{6229:function(t,e,l){"use strict";l.r(e),l(32081),l(911);var n=l(1892),i=l.n(n),s=l(35989),r=(i()(s.Z,{insert:"head",singleton:!1}),s.Z.locals,l(67752),l(21865),Object.create(HTMLDivElement.prototype));function o(t){var e="";return e+='<button type="button" is="paper-icon-button-light" data-ripple="false" data-direction="'+t+'" class="emby-scrollbuttons-button">',(e+='<span class="material-icons '+("left"===t?"chevron_left":"chevron_right")+'"></span>')+"</button>"}function c(t){return t.getScrollPosition?t.getScrollPosition():0}function a(t){var e,l=this.scroller;!function(t,e,l,n){n<=e+20&&(t.scrollButtonsLeft.classList.add("hide"),t.scrollButtonsRight.classList.add("hide")),t.scrollButtonsLeft.disabled=!(l>0);var i=l+e;t.scrollButtonsRight.disabled=n>0&&i>=n}(this,d(l),c(l),(e=l).getScrollSize?e.getScrollSize():0)}function u(t,e){var l=t.getPropertyValue(e);return l&&(l=l.replace("px",""))?(l=parseInt(l),isNaN(l)?0:l):0}function d(t){var e=t.offsetWidth,l=window.getComputedStyle(t,null),n=u(l,"padding-left");n&&(e-=n);var i=u(l,"padding-right");i&&(e-=i);var s=t.getScrollSlider();return(n=u(l=window.getComputedStyle(s,null),"padding-left"))&&(e-=n),(i=u(l,"padding-right"))&&(e-=i),e}function h(t){var e,l=this.parentNode.nextSibling,n=this.getAttribute("data-direction"),i=d(l),s=c(l);e="left"===n?Math.max(0,s-i):s+i,l.scrollToPosition(e,!1)}r.createdCallback=function(){},r.attachedCallback=function(){var t=this.nextSibling;this.scroller=t,this.parentNode.classList.add("emby-scroller-container"),this.innerHTML=o("left")+o("right");var e=this.querySelectorAll(".emby-scrollbuttons-button");e[0].addEventListener("click",h),e[1].addEventListener("click",h),this.scrollButtonsLeft=e[0],this.scrollButtonsRight=e[1];var l=a.bind(this);this.scrollHandler=l,t.addScrollEventListener(l,{capture:!1,passive:!0})},r.detachedCallback=function(){var t=this.scroller;this.scroller=null;var e=this.scrollHandler;t&&e&&t.removeScrollEventListener(e,{capture:!1,passive:!0}),this.scrollHandler=null,this.scrollButtonsLeft=null,this.scrollButtonsRight=null},document.registerElement("emby-scrollbuttons",{prototype:r,extends:"div"})},35989:function(t,e,l){"use strict";var n=l(93476),i=l.n(n)()((function(t){return t[1]}));i.push([t.id,".emby-scrollbuttons{position:absolute;top:0;right:0;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;min-width:104px;min-height:24px;padding-top:.85em;z-index:1;color:#fff;display:-webkit-flex;display:flex}.emby-scrollbuttons-button>.material-icons{min-width:24px;min-height:24px;display:block}",""]),e.Z=i}}]);