Albisrieden/assets/libs/simplebar/dist/simplebar.esm.js.map
2025-01-07 04:13:11 +01:00

1 line
70 KiB
Plaintext

{"version":3,"file":"simplebar.esm.js","sources":["../src/helpers.js","../src/scrollbar-width.js","../src/simplebar.js","../src/index.js"],"sourcesContent":["// Helper function to retrieve options from element attributes\nexport const getOptions = function(obj) {\n const options = Array.prototype.reduce.call(\n obj,\n (acc, attribute) => {\n const option = attribute.name.match(/data-simplebar-(.+)/);\n if (option) {\n const key = option[1].replace(/\\W+(.)/g, (x, chr) => chr.toUpperCase());\n switch (attribute.value) {\n case 'true':\n acc[key] = true;\n break;\n case 'false':\n acc[key] = false;\n break;\n case undefined:\n acc[key] = true;\n break;\n default:\n acc[key] = attribute.value;\n }\n }\n return acc;\n },\n {}\n );\n return options;\n};\n\nexport function getElementWindow(element) {\n if (\n !element ||\n !element.ownerDocument ||\n !element.ownerDocument.defaultView\n ) {\n return window;\n }\n return element.ownerDocument.defaultView;\n}\n\nexport function getElementDocument(element) {\n if (!element || !element.ownerDocument) {\n return document;\n }\n return element.ownerDocument;\n}\n","import canUseDOM from 'can-use-dom';\nimport { getElementDocument } from \"./helpers\";\n\nlet cachedScrollbarWidth = null;\nlet cachedDevicePixelRatio = null;\n\nif (canUseDOM) {\n window.addEventListener('resize', () => {\n if (cachedDevicePixelRatio !== window.devicePixelRatio) {\n cachedDevicePixelRatio = window.devicePixelRatio;\n cachedScrollbarWidth = null;\n }\n });\n}\n\nexport default function scrollbarWidth(el) {\n if (cachedScrollbarWidth === null) {\n \n const document = getElementDocument(el);\n \n if (typeof document === 'undefined') {\n cachedScrollbarWidth = 0;\n return cachedScrollbarWidth;\n }\n const body = document.body;\n const box = document.createElement('div');\n\n box.classList.add('simplebar-hide-scrollbar');\n\n body.appendChild(box);\n\n const width = box.getBoundingClientRect().right;\n\n body.removeChild(box);\n\n cachedScrollbarWidth = width;\n }\n\n return cachedScrollbarWidth;\n}\n","import throttle from 'lodash.throttle';\nimport debounce from 'lodash.debounce';\nimport memoize from 'lodash.memoize';\nimport { ResizeObserver } from '@juggle/resize-observer';\nimport canUseDOM from 'can-use-dom';\nimport scrollbarWidth from './scrollbar-width';\nimport { getElementWindow, getElementDocument } from './helpers';\n\nexport default class SimpleBar {\n constructor(element, options) {\n this.el = element;\n this.minScrollbarWidth = 20;\n this.options = { ...SimpleBar.defaultOptions, ...options };\n this.classNames = {\n ...SimpleBar.defaultOptions.classNames,\n ...this.options.classNames\n };\n this.axis = {\n x: {\n scrollOffsetAttr: 'scrollLeft',\n sizeAttr: 'width',\n scrollSizeAttr: 'scrollWidth',\n offsetSizeAttr: 'offsetWidth',\n offsetAttr: 'left',\n overflowAttr: 'overflowX',\n dragOffset: 0,\n isOverflowing: true,\n isVisible: false,\n forceVisible: false,\n track: {},\n scrollbar: {}\n },\n y: {\n scrollOffsetAttr: 'scrollTop',\n sizeAttr: 'height',\n scrollSizeAttr: 'scrollHeight',\n offsetSizeAttr: 'offsetHeight',\n offsetAttr: 'top',\n overflowAttr: 'overflowY',\n dragOffset: 0,\n isOverflowing: true,\n isVisible: false,\n forceVisible: false,\n track: {},\n scrollbar: {}\n }\n };\n this.removePreventClickId = null;\n\n // Don't re-instantiate over an existing one\n if (SimpleBar.instances.has(this.el)) {\n return;\n }\n\n this.recalculate = throttle(this.recalculate.bind(this), 64);\n this.onMouseMove = throttle(this.onMouseMove.bind(this), 64);\n this.hideScrollbars = debounce(\n this.hideScrollbars.bind(this),\n this.options.timeout\n );\n this.onWindowResize = debounce(this.onWindowResize.bind(this), 64, {\n leading: true\n });\n\n SimpleBar.getRtlHelpers = memoize(SimpleBar.getRtlHelpers);\n\n this.init();\n }\n\n /**\n * Static properties\n */\n\n /**\n * Helper to fix browsers inconsistency on RTL:\n * - Firefox inverts the scrollbar initial position\n * - IE11 inverts both scrollbar position and scrolling offset\n * Directly inspired by @KingSora's OverlayScrollbars https://github.com/KingSora/OverlayScrollbars/blob/master/js/OverlayScrollbars.js#L1634\n */\n static getRtlHelpers() {\n const dummyDiv = document.createElement('div');\n dummyDiv.innerHTML =\n '<div class=\"hs-dummy-scrollbar-size\"><div style=\"height: 200%; width: 200%; margin: 10px 0;\"></div></div>';\n const scrollbarDummyEl = dummyDiv.firstElementChild;\n document.body.appendChild(scrollbarDummyEl);\n const dummyContainerChild = scrollbarDummyEl.firstElementChild;\n scrollbarDummyEl.scrollLeft = 0;\n const dummyContainerOffset = SimpleBar.getOffset(scrollbarDummyEl);\n const dummyContainerChildOffset = SimpleBar.getOffset(dummyContainerChild);\n scrollbarDummyEl.scrollLeft = 999;\n const dummyContainerScrollOffsetAfterScroll = SimpleBar.getOffset(\n dummyContainerChild\n );\n\n return {\n // determines if the scrolling is responding with negative values\n isRtlScrollingInverted:\n dummyContainerOffset.left !== dummyContainerChildOffset.left &&\n dummyContainerChildOffset.left -\n dummyContainerScrollOffsetAfterScroll.left !==\n 0,\n // determines if the origin scrollbar position is inverted or not (positioned on left or right)\n isRtlScrollbarInverted:\n dummyContainerOffset.left !== dummyContainerChildOffset.left\n };\n }\n\n static defaultOptions = {\n autoHide: true,\n forceVisible: false,\n clickOnTrack: true,\n clickOnTrackSpeed: 40,\n classNames: {\n contentEl: 'simplebar-content',\n contentWrapper: 'simplebar-content-wrapper',\n offset: 'simplebar-offset',\n mask: 'simplebar-mask',\n wrapper: 'simplebar-wrapper',\n placeholder: 'simplebar-placeholder',\n scrollbar: 'simplebar-scrollbar',\n track: 'simplebar-track',\n heightAutoObserverWrapperEl: 'simplebar-height-auto-observer-wrapper',\n heightAutoObserverEl: 'simplebar-height-auto-observer',\n visible: 'simplebar-visible',\n horizontal: 'simplebar-horizontal',\n vertical: 'simplebar-vertical',\n hover: 'simplebar-hover',\n dragging: 'simplebar-dragging'\n },\n scrollbarMinSize: 25,\n scrollbarMaxSize: 0,\n timeout: 1000\n };\n\n static getOffset(el) {\n const rect = el.getBoundingClientRect();\n const elDocument = getElementDocument(el);\n const elWindow = getElementWindow(el);\n\n return {\n top:\n rect.top +\n (elWindow.pageYOffset || elDocument.documentElement.scrollTop),\n left:\n rect.left +\n (elWindow.pageXOffset || elDocument.documentElement.scrollLeft)\n };\n }\n\n static instances = new WeakMap();\n\n init() {\n // Save a reference to the instance, so we know this DOM node has already been instancied\n SimpleBar.instances.set(this.el, this);\n\n // We stop here on server-side\n if (canUseDOM) {\n this.initDOM();\n\n this.setAccessibilityAttributes();\n\n this.scrollbarWidth = this.getScrollbarWidth();\n\n this.recalculate();\n\n this.initListeners();\n }\n }\n\n initDOM() {\n // make sure this element doesn't have the elements yet\n if (\n Array.prototype.filter.call(this.el.children, child =>\n child.classList.contains(this.classNames.wrapper)\n ).length\n ) {\n // assume that element has his DOM already initiated\n this.wrapperEl = this.el.querySelector(`.${this.classNames.wrapper}`);\n this.contentWrapperEl =\n this.options.scrollableNode ||\n this.el.querySelector(`.${this.classNames.contentWrapper}`);\n this.contentEl =\n this.options.contentNode ||\n this.el.querySelector(`.${this.classNames.contentEl}`);\n\n this.offsetEl = this.el.querySelector(`.${this.classNames.offset}`);\n this.maskEl = this.el.querySelector(`.${this.classNames.mask}`);\n\n this.placeholderEl = this.findChild(\n this.wrapperEl,\n `.${this.classNames.placeholder}`\n );\n this.heightAutoObserverWrapperEl = this.el.querySelector(\n `.${this.classNames.heightAutoObserverWrapperEl}`\n );\n this.heightAutoObserverEl = this.el.querySelector(\n `.${this.classNames.heightAutoObserverEl}`\n );\n this.axis.x.track.el = this.findChild(\n this.el,\n `.${this.classNames.track}.${this.classNames.horizontal}`\n );\n this.axis.y.track.el = this.findChild(\n this.el,\n `.${this.classNames.track}.${this.classNames.vertical}`\n );\n } else {\n // Prepare DOM\n this.wrapperEl = document.createElement('div');\n this.contentWrapperEl = document.createElement('div');\n this.offsetEl = document.createElement('div');\n this.maskEl = document.createElement('div');\n this.contentEl = document.createElement('div');\n this.placeholderEl = document.createElement('div');\n this.heightAutoObserverWrapperEl = document.createElement('div');\n this.heightAutoObserverEl = document.createElement('div');\n\n this.wrapperEl.classList.add(this.classNames.wrapper);\n this.contentWrapperEl.classList.add(this.classNames.contentWrapper);\n this.offsetEl.classList.add(this.classNames.offset);\n this.maskEl.classList.add(this.classNames.mask);\n this.contentEl.classList.add(this.classNames.contentEl);\n this.placeholderEl.classList.add(this.classNames.placeholder);\n this.heightAutoObserverWrapperEl.classList.add(\n this.classNames.heightAutoObserverWrapperEl\n );\n this.heightAutoObserverEl.classList.add(\n this.classNames.heightAutoObserverEl\n );\n\n while (this.el.firstChild) {\n this.contentEl.appendChild(this.el.firstChild);\n }\n\n this.contentWrapperEl.appendChild(this.contentEl);\n this.offsetEl.appendChild(this.contentWrapperEl);\n this.maskEl.appendChild(this.offsetEl);\n this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);\n this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);\n this.wrapperEl.appendChild(this.maskEl);\n this.wrapperEl.appendChild(this.placeholderEl);\n this.el.appendChild(this.wrapperEl);\n }\n\n if (!this.axis.x.track.el || !this.axis.y.track.el) {\n const track = document.createElement('div');\n const scrollbar = document.createElement('div');\n\n track.classList.add(this.classNames.track);\n scrollbar.classList.add(this.classNames.scrollbar);\n\n track.appendChild(scrollbar);\n\n this.axis.x.track.el = track.cloneNode(true);\n this.axis.x.track.el.classList.add(this.classNames.horizontal);\n\n this.axis.y.track.el = track.cloneNode(true);\n this.axis.y.track.el.classList.add(this.classNames.vertical);\n\n this.el.appendChild(this.axis.x.track.el);\n this.el.appendChild(this.axis.y.track.el);\n }\n\n this.axis.x.scrollbar.el = this.axis.x.track.el.querySelector(\n `.${this.classNames.scrollbar}`\n );\n this.axis.y.scrollbar.el = this.axis.y.track.el.querySelector(\n `.${this.classNames.scrollbar}`\n );\n\n if (!this.options.autoHide) {\n this.axis.x.scrollbar.el.classList.add(this.classNames.visible);\n this.axis.y.scrollbar.el.classList.add(this.classNames.visible);\n }\n\n this.el.setAttribute('data-simplebar', 'init');\n }\n\n setAccessibilityAttributes() {\n const ariaLabel = this.options.ariaLabel || 'scrollable content';\n\n this.contentWrapperEl.setAttribute('tabindex', '0');\n this.contentWrapperEl.setAttribute('role', 'region');\n this.contentWrapperEl.setAttribute('aria-label', ariaLabel);\n }\n\n initListeners() {\n const elWindow = getElementWindow(this.el);\n // Event listeners\n if (this.options.autoHide) {\n this.el.addEventListener('mouseenter', this.onMouseEnter);\n }\n\n ['mousedown', 'click', 'dblclick'].forEach(e => {\n this.el.addEventListener(e, this.onPointerEvent, true);\n });\n\n ['touchstart', 'touchend', 'touchmove'].forEach(e => {\n this.el.addEventListener(e, this.onPointerEvent, {\n capture: true,\n passive: true\n });\n });\n\n this.el.addEventListener('mousemove', this.onMouseMove);\n this.el.addEventListener('mouseleave', this.onMouseLeave);\n\n this.contentWrapperEl.addEventListener('scroll', this.onScroll);\n\n // Browser zoom triggers a window resize\n elWindow.addEventListener('resize', this.onWindowResize);\n\n // Hack for https://github.com/WICG/ResizeObserver/issues/38\n let resizeObserverStarted = false;\n const resizeObserver = elWindow.ResizeObserver || ResizeObserver;\n this.resizeObserver = new resizeObserver(() => {\n if (!resizeObserverStarted) return;\n this.recalculate();\n });\n\n this.resizeObserver.observe(this.el);\n this.resizeObserver.observe(this.contentEl);\n\n elWindow.requestAnimationFrame(() => {\n resizeObserverStarted = true;\n });\n\n // This is required to detect horizontal scroll. Vertical scroll only needs the resizeObserver.\n this.mutationObserver = new elWindow.MutationObserver(this.recalculate);\n\n this.mutationObserver.observe(this.contentEl, {\n childList: true,\n subtree: true,\n characterData: true\n });\n }\n\n recalculate() {\n const elWindow = getElementWindow(this.el);\n this.elStyles = elWindow.getComputedStyle(this.el);\n this.isRtl = this.elStyles.direction === 'rtl';\n\n const isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;\n const isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1;\n const contentElOffsetWidth = this.contentEl.offsetWidth;\n\n const contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;\n\n const elOverflowX = this.elStyles.overflowX;\n const elOverflowY = this.elStyles.overflowY;\n\n this.contentEl.style.padding = `${this.elStyles.paddingTop} ${this.elStyles.paddingRight} ${this.elStyles.paddingBottom} ${this.elStyles.paddingLeft}`;\n this.wrapperEl.style.margin = `-${this.elStyles.paddingTop} -${this.elStyles.paddingRight} -${this.elStyles.paddingBottom} -${this.elStyles.paddingLeft}`;\n\n const contentElScrollHeight = this.contentEl.scrollHeight;\n const contentElScrollWidth = this.contentEl.scrollWidth;\n\n this.contentWrapperEl.style.height = isHeightAuto ? 'auto' : '100%';\n\n // Determine placeholder size\n this.placeholderEl.style.width = isWidthAuto\n ? `${contentElOffsetWidth}px`\n : 'auto';\n this.placeholderEl.style.height = `${contentElScrollHeight}px`;\n\n const contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;\n\n this.axis.x.isOverflowing = contentElScrollWidth > contentElOffsetWidth;\n this.axis.y.isOverflowing =\n contentElScrollHeight > contentWrapperElOffsetHeight;\n\n // Set isOverflowing to false if user explicitely set hidden overflow\n this.axis.x.isOverflowing =\n elOverflowX === 'hidden' ? false : this.axis.x.isOverflowing;\n this.axis.y.isOverflowing =\n elOverflowY === 'hidden' ? false : this.axis.y.isOverflowing;\n\n this.axis.x.forceVisible =\n this.options.forceVisible === 'x' || this.options.forceVisible === true;\n this.axis.y.forceVisible =\n this.options.forceVisible === 'y' || this.options.forceVisible === true;\n\n this.hideNativeScrollbar();\n\n // Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)\n let offsetForXScrollbar = this.axis.x.isOverflowing\n ? this.scrollbarWidth\n : 0;\n let offsetForYScrollbar = this.axis.y.isOverflowing\n ? this.scrollbarWidth\n : 0;\n\n this.axis.x.isOverflowing =\n this.axis.x.isOverflowing &&\n contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;\n this.axis.y.isOverflowing =\n this.axis.y.isOverflowing &&\n contentElScrollHeight >\n contentWrapperElOffsetHeight - offsetForXScrollbar;\n\n this.axis.x.scrollbar.size = this.getScrollbarSize('x');\n this.axis.y.scrollbar.size = this.getScrollbarSize('y');\n\n this.axis.x.scrollbar.el.style.width = `${this.axis.x.scrollbar.size}px`;\n this.axis.y.scrollbar.el.style.height = `${this.axis.y.scrollbar.size}px`;\n\n this.positionScrollbar('x');\n this.positionScrollbar('y');\n\n this.toggleTrackVisibility('x');\n this.toggleTrackVisibility('y');\n }\n\n /**\n * Calculate scrollbar size\n */\n getScrollbarSize(axis = 'y') {\n if (!this.axis[axis].isOverflowing) {\n return 0;\n }\n\n const contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];\n const trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];\n let scrollbarSize;\n\n let scrollbarRatio = trackSize / contentSize;\n\n // Calculate new height/position of drag handle.\n scrollbarSize = Math.max(\n ~~(scrollbarRatio * trackSize),\n this.options.scrollbarMinSize\n );\n\n if (this.options.scrollbarMaxSize) {\n scrollbarSize = Math.min(scrollbarSize, this.options.scrollbarMaxSize);\n }\n\n return scrollbarSize;\n }\n\n positionScrollbar(axis = 'y') {\n if (!this.axis[axis].isOverflowing) {\n return;\n }\n\n const contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];\n const trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];\n const hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);\n const scrollbar = this.axis[axis].scrollbar;\n\n let scrollOffset = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];\n scrollOffset =\n axis === 'x' &&\n this.isRtl &&\n SimpleBar.getRtlHelpers().isRtlScrollingInverted\n ? -scrollOffset\n : scrollOffset;\n let scrollPourcent = scrollOffset / (contentSize - hostSize);\n\n let handleOffset = ~~((trackSize - scrollbar.size) * scrollPourcent);\n handleOffset =\n axis === 'x' &&\n this.isRtl &&\n SimpleBar.getRtlHelpers().isRtlScrollbarInverted\n ? handleOffset + (trackSize - scrollbar.size)\n : handleOffset;\n\n scrollbar.el.style.transform =\n axis === 'x'\n ? `translate3d(${handleOffset}px, 0, 0)`\n : `translate3d(0, ${handleOffset}px, 0)`;\n }\n\n toggleTrackVisibility(axis = 'y') {\n const track = this.axis[axis].track.el;\n const scrollbar = this.axis[axis].scrollbar.el;\n\n if (this.axis[axis].isOverflowing || this.axis[axis].forceVisible) {\n track.style.visibility = 'visible';\n this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'scroll';\n } else {\n track.style.visibility = 'hidden';\n this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'hidden';\n }\n\n // Even if forceVisible is enabled, scrollbar itself should be hidden\n if (this.axis[axis].isOverflowing) {\n scrollbar.style.display = 'block';\n } else {\n scrollbar.style.display = 'none';\n }\n }\n\n hideNativeScrollbar() {\n this.offsetEl.style[this.isRtl ? 'left' : 'right'] =\n this.axis.y.isOverflowing || this.axis.y.forceVisible\n ? `-${this.scrollbarWidth}px`\n : 0;\n this.offsetEl.style.bottom =\n this.axis.x.isOverflowing || this.axis.x.forceVisible\n ? `-${this.scrollbarWidth}px`\n : 0;\n }\n\n /**\n * On scroll event handling\n */\n onScroll = () => {\n const elWindow = getElementWindow(this.el);\n if (!this.scrollXTicking) {\n elWindow.requestAnimationFrame(this.scrollX);\n this.scrollXTicking = true;\n }\n\n if (!this.scrollYTicking) {\n elWindow.requestAnimationFrame(this.scrollY);\n this.scrollYTicking = true;\n }\n };\n\n scrollX = () => {\n if (this.axis.x.isOverflowing) {\n this.showScrollbar('x');\n this.positionScrollbar('x');\n }\n\n this.scrollXTicking = false;\n };\n\n scrollY = () => {\n if (this.axis.y.isOverflowing) {\n this.showScrollbar('y');\n this.positionScrollbar('y');\n }\n\n this.scrollYTicking = false;\n };\n\n onMouseEnter = () => {\n this.showScrollbar('x');\n this.showScrollbar('y');\n };\n\n onMouseMove = e => {\n this.mouseX = e.clientX;\n this.mouseY = e.clientY;\n\n if (this.axis.x.isOverflowing || this.axis.x.forceVisible) {\n this.onMouseMoveForAxis('x');\n }\n\n if (this.axis.y.isOverflowing || this.axis.y.forceVisible) {\n this.onMouseMoveForAxis('y');\n }\n };\n\n onMouseMoveForAxis(axis = 'y') {\n this.axis[axis].track.rect = this.axis[\n axis\n ].track.el.getBoundingClientRect();\n this.axis[axis].scrollbar.rect = this.axis[\n axis\n ].scrollbar.el.getBoundingClientRect();\n\n const isWithinScrollbarBoundsX = this.isWithinBounds(\n this.axis[axis].scrollbar.rect\n );\n\n if (isWithinScrollbarBoundsX) {\n this.axis[axis].scrollbar.el.classList.add(this.classNames.hover);\n } else {\n this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);\n }\n\n if (this.isWithinBounds(this.axis[axis].track.rect)) {\n this.showScrollbar(axis);\n this.axis[axis].track.el.classList.add(this.classNames.hover);\n } else {\n this.axis[axis].track.el.classList.remove(this.classNames.hover);\n }\n }\n\n onMouseLeave = () => {\n this.onMouseMove.cancel();\n\n if (this.axis.x.isOverflowing || this.axis.x.forceVisible) {\n this.onMouseLeaveForAxis('x');\n }\n\n if (this.axis.y.isOverflowing || this.axis.y.forceVisible) {\n this.onMouseLeaveForAxis('y');\n }\n\n this.mouseX = -1;\n this.mouseY = -1;\n };\n\n onMouseLeaveForAxis(axis = 'y') {\n this.axis[axis].track.el.classList.remove(this.classNames.hover);\n this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);\n }\n\n onWindowResize = () => {\n // Recalculate scrollbarWidth in case it's a zoom\n this.scrollbarWidth = this.getScrollbarWidth();\n\n this.hideNativeScrollbar();\n };\n\n /**\n * Show scrollbar\n */\n showScrollbar(axis = 'y') {\n let scrollbar = this.axis[axis].scrollbar.el;\n\n if (!this.axis[axis].isVisible) {\n scrollbar.classList.add(this.classNames.visible);\n this.axis[axis].isVisible = true;\n }\n\n if (this.options.autoHide) {\n this.hideScrollbars();\n }\n }\n\n /**\n * Hide Scrollbar\n */\n hideScrollbars = () => {\n this.axis.x.track.rect = this.axis.x.track.el.getBoundingClientRect();\n this.axis.y.track.rect = this.axis.y.track.el.getBoundingClientRect();\n\n if (!this.isWithinBounds(this.axis.y.track.rect)) {\n this.axis.y.scrollbar.el.classList.remove(this.classNames.visible);\n this.axis.y.isVisible = false;\n }\n\n if (!this.isWithinBounds(this.axis.x.track.rect)) {\n this.axis.x.scrollbar.el.classList.remove(this.classNames.visible);\n this.axis.x.isVisible = false;\n }\n };\n\n onPointerEvent = e => {\n let isWithinTrackXBounds, isWithinTrackYBounds;\n\n this.axis.x.track.rect = this.axis.x.track.el.getBoundingClientRect();\n this.axis.y.track.rect = this.axis.y.track.el.getBoundingClientRect();\n\n if (this.axis.x.isOverflowing || this.axis.x.forceVisible) {\n isWithinTrackXBounds = this.isWithinBounds(this.axis.x.track.rect);\n }\n\n if (this.axis.y.isOverflowing || this.axis.y.forceVisible) {\n isWithinTrackYBounds = this.isWithinBounds(this.axis.y.track.rect);\n }\n\n // If any pointer event is called on the scrollbar\n if (isWithinTrackXBounds || isWithinTrackYBounds) {\n // Preventing the event's default action stops text being\n // selectable during the drag.\n e.preventDefault();\n // Prevent event leaking\n e.stopPropagation();\n\n if (e.type === 'mousedown') {\n if (isWithinTrackXBounds) {\n this.axis.x.scrollbar.rect = this.axis.x.scrollbar.el.getBoundingClientRect();\n\n if (this.isWithinBounds(this.axis.x.scrollbar.rect)) {\n this.onDragStart(e, 'x');\n } else {\n this.onTrackClick(e, 'x');\n }\n }\n\n if (isWithinTrackYBounds) {\n this.axis.y.scrollbar.rect = this.axis.y.scrollbar.el.getBoundingClientRect();\n\n if (this.isWithinBounds(this.axis.y.scrollbar.rect)) {\n this.onDragStart(e, 'y');\n } else {\n this.onTrackClick(e, 'y');\n }\n }\n }\n }\n };\n\n /**\n * on scrollbar handle drag movement starts\n */\n onDragStart(e, axis = 'y') {\n const elDocument = getElementDocument(this.el);\n const elWindow = getElementWindow(this.el);\n const scrollbar = this.axis[axis].scrollbar;\n\n // Measure how far the user's mouse is from the top of the scrollbar drag handle.\n const eventOffset = axis === 'y' ? e.pageY : e.pageX;\n this.axis[axis].dragOffset =\n eventOffset - scrollbar.rect[this.axis[axis].offsetAttr];\n this.draggedAxis = axis;\n\n this.el.classList.add(this.classNames.dragging);\n\n elDocument.addEventListener('mousemove', this.drag, true);\n elDocument.addEventListener('mouseup', this.onEndDrag, true);\n if (this.removePreventClickId === null) {\n elDocument.addEventListener('click', this.preventClick, true);\n elDocument.addEventListener('dblclick', this.preventClick, true);\n } else {\n elWindow.clearTimeout(this.removePreventClickId);\n this.removePreventClickId = null;\n }\n }\n\n /**\n * Drag scrollbar handle\n */\n drag = e => {\n let eventOffset;\n const track = this.axis[this.draggedAxis].track;\n const trackSize = track.rect[this.axis[this.draggedAxis].sizeAttr];\n const scrollbar = this.axis[this.draggedAxis].scrollbar;\n const contentSize = this.contentWrapperEl[\n this.axis[this.draggedAxis].scrollSizeAttr\n ];\n const hostSize = parseInt(\n this.elStyles[this.axis[this.draggedAxis].sizeAttr],\n 10\n );\n\n e.preventDefault();\n e.stopPropagation();\n\n if (this.draggedAxis === 'y') {\n eventOffset = e.pageY;\n } else {\n eventOffset = e.pageX;\n }\n\n // Calculate how far the user's mouse is from the top/left of the scrollbar (minus the dragOffset).\n let dragPos =\n eventOffset -\n track.rect[this.axis[this.draggedAxis].offsetAttr] -\n this.axis[this.draggedAxis].dragOffset;\n // Convert the mouse position into a percentage of the scrollbar height/width.\n let dragPerc = dragPos / (trackSize - scrollbar.size);\n\n // Scroll the content by the same percentage.\n let scrollPos = dragPerc * (contentSize - hostSize);\n\n // Fix browsers inconsistency on RTL\n if (this.draggedAxis === 'x') {\n scrollPos =\n this.isRtl && SimpleBar.getRtlHelpers().isRtlScrollbarInverted\n ? scrollPos - (trackSize + scrollbar.size)\n : scrollPos;\n scrollPos =\n this.isRtl && SimpleBar.getRtlHelpers().isRtlScrollingInverted\n ? -scrollPos\n : scrollPos;\n }\n\n this.contentWrapperEl[\n this.axis[this.draggedAxis].scrollOffsetAttr\n ] = scrollPos;\n };\n\n /**\n * End scroll handle drag\n */\n onEndDrag = e => {\n const elDocument = getElementDocument(this.el);\n const elWindow = getElementWindow(this.el);\n e.preventDefault();\n e.stopPropagation();\n\n this.el.classList.remove(this.classNames.dragging);\n\n elDocument.removeEventListener('mousemove', this.drag, true);\n elDocument.removeEventListener('mouseup', this.onEndDrag, true);\n this.removePreventClickId = elWindow.setTimeout(() => {\n // Remove these asynchronously so we still suppress click events\n // generated simultaneously with mouseup.\n elDocument.removeEventListener('click', this.preventClick, true);\n elDocument.removeEventListener('dblclick', this.preventClick, true);\n this.removePreventClickId = null;\n });\n };\n\n /**\n * Handler to ignore click events during drag\n */\n preventClick = e => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n onTrackClick(e, axis = 'y') {\n if (!this.options.clickOnTrack) return;\n\n const elWindow = getElementWindow(this.el);\n this.axis[axis].scrollbar.rect = this.axis[\n axis\n ].scrollbar.el.getBoundingClientRect();\n const scrollbar = this.axis[axis].scrollbar;\n const scrollbarOffset = scrollbar.rect[this.axis[axis].offsetAttr];\n const hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);\n let scrolled = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];\n const t =\n axis === 'y'\n ? this.mouseY - scrollbarOffset\n : this.mouseX - scrollbarOffset;\n const dir = t < 0 ? -1 : 1;\n const scrollSize = dir === -1 ? scrolled - hostSize : scrolled + hostSize;\n\n const scrollTo = () => {\n if (dir === -1) {\n if (scrolled > scrollSize) {\n scrolled -= this.options.clickOnTrackSpeed;\n this.contentWrapperEl.scrollTo({\n [this.axis[axis].offsetAttr]: scrolled\n });\n elWindow.requestAnimationFrame(scrollTo);\n }\n } else {\n if (scrolled < scrollSize) {\n scrolled += this.options.clickOnTrackSpeed;\n this.contentWrapperEl.scrollTo({\n [this.axis[axis].offsetAttr]: scrolled\n });\n elWindow.requestAnimationFrame(scrollTo);\n }\n }\n };\n\n scrollTo();\n }\n\n /**\n * Getter for content element\n */\n getContentElement() {\n return this.contentEl;\n }\n\n /**\n * Getter for original scrolling element\n */\n getScrollElement() {\n return this.contentWrapperEl;\n }\n\n getScrollbarWidth() {\n // Try/catch for FF 56 throwing on undefined computedStyles\n try {\n // Detect browsers supporting CSS scrollbar styling and do not calculate\n if (\n getComputedStyle(this.contentWrapperEl, '::-webkit-scrollbar')\n .display === 'none' ||\n 'scrollbarWidth' in document.documentElement.style ||\n '-ms-overflow-style' in document.documentElement.style\n ) {\n return 0;\n } else {\n return scrollbarWidth(this.el);\n }\n } catch (e) {\n return scrollbarWidth(this.el);\n }\n }\n\n removeListeners() {\n const elWindow = getElementWindow(this.el);\n // Event listeners\n if (this.options.autoHide) {\n this.el.removeEventListener('mouseenter', this.onMouseEnter);\n }\n\n ['mousedown', 'click', 'dblclick'].forEach(e => {\n this.el.removeEventListener(e, this.onPointerEvent, true);\n });\n\n ['touchstart', 'touchend', 'touchmove'].forEach(e => {\n this.el.removeEventListener(e, this.onPointerEvent, {\n capture: true,\n passive: true\n });\n });\n\n this.el.removeEventListener('mousemove', this.onMouseMove);\n this.el.removeEventListener('mouseleave', this.onMouseLeave);\n\n if (this.contentWrapperEl) {\n this.contentWrapperEl.removeEventListener('scroll', this.onScroll);\n }\n\n elWindow.removeEventListener('resize', this.onWindowResize);\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n\n // Cancel all debounced functions\n this.recalculate.cancel();\n this.onMouseMove.cancel();\n this.hideScrollbars.cancel();\n this.onWindowResize.cancel();\n }\n\n /**\n * UnMount mutation observer and delete SimpleBar instance from DOM element\n */\n unMount() {\n this.removeListeners();\n SimpleBar.instances.delete(this.el);\n }\n\n /**\n * Check if mouse is within bounds\n */\n isWithinBounds(bbox) {\n return (\n this.mouseX >= bbox.left &&\n this.mouseX <= bbox.left + bbox.width &&\n this.mouseY >= bbox.top &&\n this.mouseY <= bbox.top + bbox.height\n );\n }\n\n /**\n * Find element children matches query\n */\n findChild(el, query) {\n const matches =\n el.matches ||\n el.webkitMatchesSelector ||\n el.mozMatchesSelector ||\n el.msMatchesSelector;\n return Array.prototype.filter.call(el.children, child =>\n matches.call(child, query)\n )[0];\n }\n}\n","import canUseDOM from 'can-use-dom';\n\nimport SimpleBar from './simplebar';\nimport { getOptions } from './helpers';\n\nSimpleBar.initDOMLoadedElements = function() {\n document.removeEventListener('DOMContentLoaded', this.initDOMLoadedElements);\n window.removeEventListener('load', this.initDOMLoadedElements);\n\n Array.prototype.forEach.call(\n document.querySelectorAll('[data-simplebar]'),\n el => {\n if (\n el.getAttribute('data-simplebar') !== 'init' &&\n !SimpleBar.instances.has(el)\n )\n new SimpleBar(el, getOptions(el.attributes));\n }\n );\n};\n\nSimpleBar.removeObserver = function() {\n this.globalObserver.disconnect();\n};\n\nSimpleBar.initHtmlApi = function() {\n this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this);\n\n // MutationObserver is IE11+\n if (typeof MutationObserver !== 'undefined') {\n // Mutation observer to observe dynamically added elements\n this.globalObserver = new MutationObserver(SimpleBar.handleMutations);\n\n this.globalObserver.observe(document, { childList: true, subtree: true });\n }\n\n // Taken from jQuery `ready` function\n // Instantiate elements already present on the page\n if (\n document.readyState === 'complete' ||\n (document.readyState !== 'loading' && !document.documentElement.doScroll)\n ) {\n // Handle it asynchronously to allow scripts the opportunity to delay init\n window.setTimeout(this.initDOMLoadedElements);\n } else {\n document.addEventListener('DOMContentLoaded', this.initDOMLoadedElements);\n window.addEventListener('load', this.initDOMLoadedElements);\n }\n};\n\nSimpleBar.handleMutations = mutations => {\n mutations.forEach(mutation => {\n Array.prototype.forEach.call(mutation.addedNodes, addedNode => {\n if (addedNode.nodeType === 1) {\n if (addedNode.hasAttribute('data-simplebar')) {\n !SimpleBar.instances.has(addedNode) &&\n document.documentElement.contains(addedNode) &&\n new SimpleBar(addedNode, getOptions(addedNode.attributes));\n } else {\n Array.prototype.forEach.call(\n addedNode.querySelectorAll('[data-simplebar]'),\n function(el) {\n if (\n el.getAttribute('data-simplebar') !== 'init' &&\n !SimpleBar.instances.has(el) &&\n document.documentElement.contains(el)\n )\n new SimpleBar(el, getOptions(el.attributes));\n }\n );\n }\n }\n });\n\n Array.prototype.forEach.call(mutation.removedNodes, removedNode => {\n if (removedNode.nodeType === 1) {\n if (removedNode.getAttribute('data-simplebar') === 'init') {\n SimpleBar.instances.has(removedNode) &&\n !document.documentElement.contains(removedNode) &&\n SimpleBar.instances.get(removedNode).unMount();\n } else {\n Array.prototype.forEach.call(\n removedNode.querySelectorAll('[data-simplebar=\"init\"]'),\n el => {\n SimpleBar.instances.has(el) &&\n !document.documentElement.contains(el) &&\n SimpleBar.instances.get(el).unMount();\n }\n );\n }\n }\n });\n });\n};\n\nSimpleBar.getOptions = getOptions;\n\n/**\n * HTML API\n * Called only in a browser env.\n */\nif (canUseDOM) {\n SimpleBar.initHtmlApi();\n}\n\nexport default SimpleBar;\n"],"names":["getOptions","obj","options","Array","prototype","reduce","call","acc","attribute","option","name","match","key","replace","x","chr","toUpperCase","value","undefined","getElementWindow","element","ownerDocument","defaultView","window","getElementDocument","document","cachedScrollbarWidth","cachedDevicePixelRatio","canUseDOM","addEventListener","devicePixelRatio","scrollbarWidth","el","body","box","createElement","classList","add","appendChild","width","getBoundingClientRect","right","removeChild","SimpleBar","onScroll","elWindow","scrollXTicking","requestAnimationFrame","scrollX","scrollYTicking","scrollY","axis","isOverflowing","showScrollbar","positionScrollbar","y","onMouseEnter","onMouseMove","e","mouseX","clientX","mouseY","clientY","forceVisible","onMouseMoveForAxis","onMouseLeave","cancel","onMouseLeaveForAxis","onWindowResize","getScrollbarWidth","hideNativeScrollbar","hideScrollbars","track","rect","isWithinBounds","scrollbar","remove","classNames","visible","isVisible","onPointerEvent","isWithinTrackXBounds","isWithinTrackYBounds","preventDefault","stopPropagation","type","onDragStart","onTrackClick","drag","eventOffset","draggedAxis","trackSize","sizeAttr","contentSize","contentWrapperEl","scrollSizeAttr","hostSize","parseInt","elStyles","pageY","pageX","dragPos","offsetAttr","dragOffset","dragPerc","size","scrollPos","isRtl","getRtlHelpers","isRtlScrollbarInverted","isRtlScrollingInverted","scrollOffsetAttr","onEndDrag","elDocument","dragging","removeEventListener","removePreventClickId","setTimeout","preventClick","minScrollbarWidth","defaultOptions","offsetSizeAttr","overflowAttr","instances","has","recalculate","throttle","bind","debounce","timeout","leading","memoize","init","dummyDiv","innerHTML","scrollbarDummyEl","firstElementChild","dummyContainerChild","scrollLeft","dummyContainerOffset","getOffset","dummyContainerChildOffset","dummyContainerScrollOffsetAfterScroll","left","top","pageYOffset","documentElement","scrollTop","pageXOffset","set","initDOM","setAccessibilityAttributes","initListeners","filter","children","child","contains","wrapper","length","wrapperEl","querySelector","scrollableNode","contentWrapper","contentEl","contentNode","offsetEl","offset","maskEl","mask","placeholderEl","findChild","placeholder","heightAutoObserverWrapperEl","heightAutoObserverEl","horizontal","vertical","firstChild","cloneNode","autoHide","setAttribute","ariaLabel","forEach","capture","passive","resizeObserverStarted","resizeObserver","ResizeObserver","observe","mutationObserver","MutationObserver","childList","subtree","characterData","getComputedStyle","direction","isHeightAuto","offsetHeight","isWidthAuto","offsetWidth","contentElOffsetWidth","contentWrapperElOffsetWidth","elOverflowX","overflowX","elOverflowY","overflowY","style","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","contentElScrollHeight","scrollHeight","contentElScrollWidth","scrollWidth","height","contentWrapperElOffsetHeight","offsetForXScrollbar","offsetForYScrollbar","getScrollbarSize","toggleTrackVisibility","scrollbarSize","scrollbarRatio","Math","max","scrollbarMinSize","scrollbarMaxSize","min","scrollOffset","scrollPourcent","handleOffset","transform","visibility","display","bottom","isWithinScrollbarBoundsX","hover","clearTimeout","clickOnTrack","scrollbarOffset","scrolled","t","dir","scrollSize","scrollTo","clickOnTrackSpeed","getContentElement","getScrollElement","removeListeners","disconnect","unMount","delete","bbox","query","matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","WeakMap","initDOMLoadedElements","querySelectorAll","getAttribute","attributes","removeObserver","globalObserver","initHtmlApi","handleMutations","readyState","doScroll","mutations","mutation","addedNodes","addedNode","nodeType","hasAttribute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