Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simplebar

Package Overview
Dependencies
Maintainers
2
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simplebar - npm Package Compare versions

Comparing version 4.3.0-alpha.0 to 4.3.0-alpha.1

dist/simplebar-core.esm.js

377

dist/simplebar.esm.js
/**
* SimpleBar.js - v4.3.0-alpha.0
* SimpleBar.js - v4.3.0-alpha.1
* Scrollbars, simpler.

@@ -10,16 +10,12 @@ * https://grsmto.github.io/simplebar/

import 'core-js/modules/es.array.for-each';
import 'core-js/modules/web.dom-collections.for-each';
import canUseDOM from 'can-use-dom';
import 'core-js/modules/es.array.filter';
import 'core-js/modules/es.array.for-each';
import 'core-js/modules/es.array.iterator';
import 'core-js/modules/es.array.reduce';
import 'core-js/modules/es.function.name';
import 'core-js/modules/es.object.assign';
import 'core-js/modules/es.object.to-string';
import 'core-js/modules/es.parse-int';
import 'core-js/modules/es.regexp.exec';
import 'core-js/modules/es.string.iterator';
import 'core-js/modules/es.string.match';
import 'core-js/modules/es.string.replace';
import 'core-js/modules/es.weak-map';
import 'core-js/modules/web.dom-collections.for-each';
import 'core-js/modules/web.dom-collections.iterator';

@@ -30,20 +26,33 @@ import throttle from 'lodash.throttle';

import ResizeObserver from 'resize-observer-polyfill';
import canUseDOM from 'can-use-dom';
import 'core-js/modules/es.array.reduce';
import 'core-js/modules/es.function.name';
import 'core-js/modules/es.regexp.exec';
import 'core-js/modules/es.string.match';
import 'core-js/modules/es.string.replace';
var cachedScrollbarWidth = null;
var cachedDevicePixelRatio = null;
window.addEventListener('resize', function () {
if (cachedDevicePixelRatio !== window.devicePixelRatio) {
cachedDevicePixelRatio = window.devicePixelRatio;
cachedScrollbarWidth = null;
}
});
function scrollbarWidth() {
if (typeof document === 'undefined') {
return 0;
if (cachedScrollbarWidth === null) {
if (typeof document === 'undefined' || /AppleWebKit/.test(navigator.userAgent) || 'scrollbarWidth' in document.documentElement.style) {
cachedScrollbarWidth = 0;
return cachedScrollbarWidth;
}
var body = document.body;
var box = document.createElement('div');
box.classList.add('simplebar-hide-scrollbar');
body.appendChild(box);
var width = box.getBoundingClientRect().right;
body.removeChild(box);
cachedScrollbarWidth = width;
}
var body = document.body;
var box = document.createElement('div');
var boxStyle = box.style;
boxStyle.position = 'fixed';
boxStyle.left = 0;
boxStyle.visibility = 'hidden';
boxStyle.overflowY = 'scroll';
body.appendChild(box);
var width = box.getBoundingClientRect().right;
body.removeChild(box);
return width;
return cachedScrollbarWidth;
}

@@ -185,2 +194,4 @@

var scrollbar = _this.axis[_this.draggedAxis].scrollbar;
var contentSize = _this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollSizeAttr];
var hostSize = parseInt(_this.elStyles[_this.axis[_this.draggedAxis].sizeAttr], 10);
e.preventDefault();

@@ -198,5 +209,5 @@ e.stopPropagation();

var dragPerc = dragPos / track.rect[_this.axis[_this.draggedAxis].sizeAttr]; // Scroll the content by the same percentage.
var dragPerc = dragPos / (trackSize - scrollbar.size); // Scroll the content by the same percentage.
var scrollPos = dragPerc * _this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollSizeAttr]; // Fix browsers inconsistency on RTL
var scrollPos = dragPerc * (contentSize - hostSize); // Fix browsers inconsistency on RTL

@@ -234,15 +245,5 @@ if (_this.draggedAxis === 'x') {

this.el = element;
this.flashTimeout;
this.contentEl;
this.contentWrapperEl;
this.offsetEl;
this.maskEl;
this.globalObserver;
this.mutationObserver;
this.resizeObserver;
this.scrollbarWidth;
this.minScrollbarWidth = 20;
this.options = Object.assign({}, SimpleBar.defaultOptions, options);
this.classNames = Object.assign({}, SimpleBar.defaultOptions.classNames, this.options.classNames);
this.isRtl;
this.options = Object.assign({}, SimpleBar.defaultOptions, {}, options);
this.classNames = Object.assign({}, SimpleBar.defaultOptions.classNames, {}, this.options.classNames);
this.axis = {

@@ -253,2 +254,3 @@ x: {

scrollSizeAttr: 'scrollWidth',
offsetSizeAttr: 'offsetWidth',
offsetAttr: 'left',

@@ -267,2 +269,3 @@ overflowAttr: 'overflowX',

scrollSizeAttr: 'scrollHeight',
offsetSizeAttr: 'offsetHeight',
offsetAttr: 'top',

@@ -324,95 +327,2 @@ overflowAttr: 'overflowY',

SimpleBar.initHtmlApi = function initHtmlApi() {
this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this); // MutationObserver is IE11+
if (typeof MutationObserver !== 'undefined') {
// Mutation observer to observe dynamically added elements
this.globalObserver = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) {
if (addedNode.nodeType === 1) {
if (addedNode.hasAttribute('data-simplebar')) {
!SimpleBar.instances.has(addedNode) && new SimpleBar(addedNode, SimpleBar.getElOptions(addedNode));
} else {
Array.prototype.forEach.call(addedNode.querySelectorAll('[data-simplebar]'), function (el) {
!SimpleBar.instances.has(el) && new SimpleBar(el, SimpleBar.getElOptions(el));
});
}
}
});
Array.prototype.forEach.call(mutation.removedNodes, function (removedNode) {
if (removedNode.nodeType === 1) {
if (removedNode.hasAttribute('data-simplebar')) {
SimpleBar.instances.has(removedNode) && SimpleBar.instances.get(removedNode).unMount();
} else {
Array.prototype.forEach.call(removedNode.querySelectorAll('[data-simplebar]'), function (el) {
SimpleBar.instances.has(el) && SimpleBar.instances.get(el).unMount();
});
}
}
});
});
});
this.globalObserver.observe(document, {
childList: true,
subtree: true
});
} // Taken from jQuery `ready` function
// Instantiate elements already present on the page
if (document.readyState === 'complete' || document.readyState !== 'loading' && !document.documentElement.doScroll) {
// Handle it asynchronously to allow scripts the opportunity to delay init
window.setTimeout(this.initDOMLoadedElements);
} else {
document.addEventListener('DOMContentLoaded', this.initDOMLoadedElements);
window.addEventListener('load', this.initDOMLoadedElements);
}
} // Helper function to retrieve options from element attributes
;
SimpleBar.getElOptions = function getElOptions(el) {
var options = Array.prototype.reduce.call(el.attributes, function (acc, attribute) {
var option = attribute.name.match(/data-simplebar-(.+)/);
if (option) {
var key = option[1].replace(/\W+(.)/g, function (x, chr) {
return chr.toUpperCase();
});
switch (attribute.value) {
case 'true':
acc[key] = true;
break;
case 'false':
acc[key] = false;
break;
case undefined:
acc[key] = true;
break;
default:
acc[key] = attribute.value;
}
}
return acc;
}, {});
return options;
};
SimpleBar.removeObserver = function removeObserver() {
this.globalObserver.disconnect();
};
SimpleBar.initDOMLoadedElements = function initDOMLoadedElements() {
document.removeEventListener('DOMContentLoaded', this.initDOMLoadedElements);
window.removeEventListener('load', this.initDOMLoadedElements);
Array.prototype.forEach.call(document.querySelectorAll('[data-simplebar]'), function (el) {
if (!SimpleBar.instances.has(el)) new SimpleBar(el, SimpleBar.getElOptions(el));
});
};
SimpleBar.getOffset = function getOffset(el) {

@@ -456,4 +366,4 @@ var rect = el.getBoundingClientRect();

this.heightAutoObserverEl = this.el.querySelector("." + this.classNames.heightAutoObserverEl);
this.axis.x.track.el = this.el.querySelector("." + this.classNames.track + "." + this.classNames.horizontal);
this.axis.y.track.el = this.el.querySelector("." + this.classNames.track + "." + this.classNames.vertical);
this.axis.x.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.horizontal);
this.axis.y.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.vertical);
} else {

@@ -538,30 +448,53 @@ // Prepare DOM

window.addEventListener('resize', this.onWindowResize);
this.resizeObserver = new ResizeObserver(this.recalculate);
window.addEventListener('resize', this.onWindowResize); // Hack for https://github.com/WICG/ResizeObserver/issues/38
var ignoredCallbacks = 0;
this.resizeObserver = new ResizeObserver(function () {
ignoredCallbacks++;
if (ignoredCallbacks === 1) return;
_this3.recalculate();
});
this.resizeObserver.observe(this.el);
this.resizeObserver.observe(this.contentEl);
this.resizeObserver.observe(this.contentEl); // This is required to detect horizontal scroll. Vertical scroll only needs the resizeObserver.
this.mutationObserver = new MutationObserver(this.recalculate);
this.mutationObserver.observe(this.contentEl, {
childList: true,
subtree: true,
characterData: true
});
};
_proto.recalculate = function recalculate() {
this.elStyles = window.getComputedStyle(this.el);
this.isRtl = this.elStyles.direction === 'rtl';
var isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
var isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1;
this.elStyles = window.getComputedStyle(this.el);
this.isRtl = this.elStyles.direction === 'rtl';
var contentElOffsetWidth = this.contentEl.offsetWidth;
var contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;
var elOverflowX = this.elStyles.overflowX;
var elOverflowY = this.elStyles.overflowY;
this.contentEl.style.padding = this.elStyles.paddingTop + " " + this.elStyles.paddingRight + " " + this.elStyles.paddingBottom + " " + this.elStyles.paddingLeft;
this.wrapperEl.style.margin = "-" + this.elStyles.paddingTop + " -" + this.elStyles.paddingRight + " -" + this.elStyles.paddingBottom + " -" + this.elStyles.paddingLeft;
var contentElScrollHeight = this.contentEl.scrollHeight;
var contentElScrollWidth = this.contentEl.scrollWidth;
this.contentWrapperEl.style.height = isHeightAuto ? 'auto' : '100%'; // Determine placeholder size
this.placeholderEl.style.width = isWidthAuto ? this.contentEl.offsetWidth + "px" : 'auto';
this.placeholderEl.style.height = this.contentEl.scrollHeight + "px"; // Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
this.placeholderEl.style.width = isWidthAuto ? contentElOffsetWidth + "px" : 'auto';
this.placeholderEl.style.height = contentElScrollHeight + "px";
var contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;
this.axis.x.isOverflowing = contentElScrollWidth > contentElOffsetWidth;
this.axis.y.isOverflowing = contentElScrollHeight > contentWrapperElOffsetHeight; // Set isOverflowing to false if user explicitely set hidden overflow
this.axis.x.isOverflowing = this.contentWrapperEl.scrollWidth > this.contentWrapperEl.offsetWidth;
this.axis.y.isOverflowing = this.contentWrapperEl.scrollHeight > this.contentWrapperEl.offsetHeight; // Set isOverflowing to false if user explicitely set hidden overflow
this.axis.x.isOverflowing = this.elStyles.overflowX === 'hidden' ? false : this.axis.x.isOverflowing;
this.axis.y.isOverflowing = this.elStyles.overflowY === 'hidden' ? false : this.axis.y.isOverflowing;
this.axis.x.isOverflowing = elOverflowX === 'hidden' ? false : this.axis.x.isOverflowing;
this.axis.y.isOverflowing = elOverflowY === 'hidden' ? false : this.axis.y.isOverflowing;
this.axis.x.forceVisible = this.options.forceVisible === 'x' || this.options.forceVisible === true;
this.axis.y.forceVisible = this.options.forceVisible === 'y' || this.options.forceVisible === true;
this.hideNativeScrollbar();
this.axis.x.track.rect = this.axis.x.track.el.getBoundingClientRect();
this.axis.y.track.rect = this.axis.y.track.el.getBoundingClientRect();
this.hideNativeScrollbar(); // Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
var offsetForXScrollbar = this.axis.x.isOverflowing ? this.scrollbarWidth : 0;
var offsetForYScrollbar = this.axis.y.isOverflowing ? this.scrollbarWidth : 0;
this.axis.x.isOverflowing = this.axis.x.isOverflowing && contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;
this.axis.y.isOverflowing = this.axis.y.isOverflowing && contentElScrollHeight > contentWrapperElOffsetHeight - offsetForXScrollbar;
this.axis.x.scrollbar.size = this.getScrollbarSize('x');

@@ -586,10 +519,9 @@ this.axis.y.scrollbar.size = this.getScrollbarSize('y');

var contentSize = this.scrollbarWidth ? this.contentWrapperEl[this.axis[axis].scrollSizeAttr] : this.contentWrapperEl[this.axis[axis].scrollSizeAttr] - this.minScrollbarWidth;
var trackSize = this.axis[axis].track.rect[this.axis[axis].sizeAttr];
var scrollbarSize;
if (!this.axis[axis].isOverflowing) {
return;
return 0;
}
var contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];
var trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
var scrollbarSize;
var scrollbarRatio = trackSize / contentSize; // Calculate new height/position of drag handle.

@@ -611,4 +543,8 @@

if (!this.axis[axis].isOverflowing) {
return;
}
var contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
var trackSize = this.axis[axis].track.rect[this.axis[axis].sizeAttr];
var trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);

@@ -649,10 +585,4 @@ var scrollbar = this.axis[axis].scrollbar;

_proto.hideNativeScrollbar = function hideNativeScrollbar() {
this.offsetEl.style[this.isRtl ? 'left' : 'right'] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-" + (this.scrollbarWidth || this.minScrollbarWidth) + "px" : 0;
this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-" + (this.scrollbarWidth || this.minScrollbarWidth) + "px" : 0; // If floating scrollbar
if (!this.scrollbarWidth) {
var paddingDirection = [this.isRtl ? 'paddingLeft' : 'paddingRight'];
this.contentWrapperEl.style[paddingDirection] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? this.minScrollbarWidth + "px" : 0;
this.contentWrapperEl.style.paddingBottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? this.minScrollbarWidth + "px" : 0;
}
this.offsetEl.style[this.isRtl ? 'left' : 'right'] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-" + this.scrollbarWidth + "px" : 0;
this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-" + this.scrollbarWidth + "px" : 0;
}

@@ -728,6 +658,6 @@ /**

var scrollbar = this.axis[axis].scrollbar.el; // Measure how far the user's mouse is from the top of the scrollbar drag handle.
var scrollbar = this.axis[axis].scrollbar; // Measure how far the user's mouse is from the top of the scrollbar drag handle.
var eventOffset = axis === 'y' ? e.pageY : e.pageX;
this.axis[axis].dragOffset = eventOffset - scrollbar.getBoundingClientRect()[this.axis[axis].offsetAttr];
this.axis[axis].dragOffset = eventOffset - scrollbar.rect[this.axis[axis].offsetAttr];
this.draggedAxis = axis;

@@ -787,3 +717,3 @@ this.el.classList.add(this.classNames.dragging);

window.removeEventListener('resize', this.onWindowResize);
this.mutationObserver && this.mutationObserver.disconnect();
this.mutationObserver.disconnect();
this.resizeObserver.disconnect(); // Cancel all debounced functions

@@ -806,18 +736,19 @@

/**
* Recursively walks up the parent nodes looking for this.el
* Check if mouse is within bounds
*/
;
_proto.isChildNode = function isChildNode(el) {
if (el === null) return false;
if (el === this.el) return true;
return this.isChildNode(el.parentNode);
_proto.isWithinBounds = function isWithinBounds(bbox) {
return this.mouseX >= bbox.left && this.mouseX <= bbox.left + bbox.width && this.mouseY >= bbox.top && this.mouseY <= bbox.top + bbox.height;
}
/**
* Check if mouse is within bounds
* Find element children matches query
*/
;
_proto.isWithinBounds = function isWithinBounds(bbox) {
return this.mouseX >= bbox.left && this.mouseX <= bbox.left + bbox.width && this.mouseY >= bbox.top && this.mouseY <= bbox.top + bbox.height;
_proto.findChild = function findChild(el, query) {
var matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
return Array.prototype.filter.call(el.children, function (child) {
return matches.call(child, query);
})[0];
};

@@ -827,8 +758,3 @@

}();
/**
* HTML API
* Called only in a browser env.
*/
SimpleBar.defaultOptions = {

@@ -860,2 +786,101 @@ autoHide: true,

// Helper function to retrieve options from element attributes
var getOptions = function getOptions(obj) {
var options = Array.prototype.reduce.call(obj, function (acc, attribute) {
var option = attribute.name.match(/data-simplebar-(.+)/);
if (option) {
var key = option[1].replace(/\W+(.)/g, function (x, chr) {
return chr.toUpperCase();
});
switch (attribute.value) {
case 'true':
acc[key] = true;
break;
case 'false':
acc[key] = false;
break;
case undefined:
acc[key] = true;
break;
default:
acc[key] = attribute.value;
}
}
return acc;
}, {});
return options;
};
SimpleBar.initDOMLoadedElements = function () {
document.removeEventListener('DOMContentLoaded', this.initDOMLoadedElements);
window.removeEventListener('load', this.initDOMLoadedElements);
Array.prototype.forEach.call(document.querySelectorAll('[data-simplebar]:not([data-simplebar="init"])'), function (el) {
if (!SimpleBar.instances.has(el)) new SimpleBar(el, getOptions(el.attributes));
});
};
SimpleBar.removeObserver = function () {
this.globalObserver.disconnect();
};
SimpleBar.initHtmlApi = function () {
this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this); // MutationObserver is IE11+
if (typeof MutationObserver !== 'undefined') {
// Mutation observer to observe dynamically added elements
this.globalObserver = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) {
if (addedNode.nodeType === 1) {
if (addedNode.hasAttribute('data-simplebar')) {
!SimpleBar.instances.has(addedNode) && new SimpleBar(addedNode, getOptions(addedNode.attributes));
} else {
Array.prototype.forEach.call(addedNode.querySelectorAll('[data-simplebar]:not([data-simplebar="init"])'), function (el) {
!SimpleBar.instances.has(el) && new SimpleBar(el, getOptions(el.attributes));
});
}
}
});
Array.prototype.forEach.call(mutation.removedNodes, function (removedNode) {
if (removedNode.nodeType === 1) {
if (removedNode.hasAttribute('[data-simplebar]:not([data-simplebar="init"])')) {
SimpleBar.instances.has(removedNode) && SimpleBar.instances.get(removedNode).unMount();
} else {
Array.prototype.forEach.call(removedNode.querySelectorAll('[data-simplebar]:not([data-simplebar="init"])'), function (el) {
SimpleBar.instances.has(el) && SimpleBar.instances.get(el).unMount();
});
}
}
});
});
});
this.globalObserver.observe(document, {
childList: true,
subtree: true
});
} // Taken from jQuery `ready` function
// Instantiate elements already present on the page
if (document.readyState === 'complete' || document.readyState !== 'loading' && !document.documentElement.doScroll) {
// Handle it asynchronously to allow scripts the opportunity to delay init
window.setTimeout(this.initDOMLoadedElements);
} else {
document.addEventListener('DOMContentLoaded', this.initDOMLoadedElements);
window.addEventListener('load', this.initDOMLoadedElements);
}
};
SimpleBar.getOptions = getOptions;
/**
* HTML API
* Called only in a browser env.
*/
if (canUseDOM) {

@@ -862,0 +887,0 @@ SimpleBar.initHtmlApi();

/**
* SimpleBar.js - v4.3.0-alpha.0
* SimpleBar.js - v4.3.0-alpha.1
* Scrollbars, simpler.

@@ -10,2 +10,2 @@ * https://grsmto.github.io/simplebar/

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).SimpleBar=e()}(this,function(){"use strict";var t=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},e=function(e,r,n){if(t(e),void 0===r)return e;switch(n){case 0:return function(){return e.call(r)};case 1:return function(t){return e.call(r,t)};case 2:return function(t,n){return e.call(r,t,n)};case 3:return function(t,n,i){return e.call(r,t,n,i)}}return function(){return e.apply(r,arguments)}},r=function(t){try{return!!t()}catch(t){return!0}},n={}.toString,i=function(t){return n.call(t).slice(8,-1)},o="".split,s=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object,a=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},c=function(t){return Object(a(t))},l=Math.ceil,u=Math.floor,f=function(t){return isNaN(t=+t)?0:(t>0?u:l)(t)},h=Math.min,d=function(t){return t>0?h(f(t),9007199254740991):0},p=function(t){return"object"==typeof t?null!==t:"function"==typeof t},v=Array.isArray||function(t){return"Array"==i(t)},g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function y(t,e){return t(e={exports:{}},e.exports),e.exports}var b,m,x,E="object"==typeof window&&window&&window.Math==Math?window:"object"==typeof self&&self&&self.Math==Math?self:Function("return this")(),w=!r(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),O=E.document,_=p(O)&&p(O.createElement),S=function(t){return _?O.createElement(t):{}},A=!w&&!r(function(){return 7!=Object.defineProperty(S("div"),"a",{get:function(){return 7}}).a}),k=function(t){if(!p(t))throw TypeError(String(t)+" is not an object");return t},L=function(t,e){if(!p(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!p(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!p(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!p(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},M=Object.defineProperty,j={f:w?M:function(t,e,r){if(k(t),e=L(e,!0),k(r),A)try{return M(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},R=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},T=w?function(t,e,r){return j.f(t,e,R(1,r))}:function(t,e,r){return t[e]=r,t},W=function(t,e){try{T(E,t,e)}catch(r){E[t]=e}return e},z=y(function(t){var e=E["__core-js_shared__"]||W("__core-js_shared__",{});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.0.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),C=0,N=Math.random(),I=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++C+N).toString(36))},D=!r(function(){return!String(Symbol())}),P=z("wks"),V=E.Symbol,F=function(t){return P[t]||(P[t]=D&&V[t]||(D?V:I)("Symbol."+t))},B=F("species"),H=function(t,e){var r;return v(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!v(r.prototype)?p(r)&&null===(r=r[B])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},q=function(t,r){var n=1==t,i=2==t,o=3==t,a=4==t,l=6==t,u=5==t||l,f=r||H;return function(r,h,p){for(var v,g,y=c(r),b=s(y),m=e(h,p,3),x=d(b.length),E=0,w=n?f(r,x):i?f(r,0):void 0;x>E;E++)if((u||E in b)&&(g=m(v=b[E],E,y),t))if(n)w[E]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return E;case 2:w.push(v)}else if(a)return!1;return l?-1:o||a?a:w}},$=F("species"),Y={}.propertyIsEnumerable,G=Object.getOwnPropertyDescriptor,X={f:G&&!Y.call({1:2},1)?function(t){var e=G(this,t);return!!e&&e.enumerable}:Y},U=function(t){return s(a(t))},Q={}.hasOwnProperty,K=function(t,e){return Q.call(t,e)},J=Object.getOwnPropertyDescriptor,Z={f:w?J:function(t,e){if(t=U(t),e=L(e,!0),A)try{return J(t,e)}catch(t){}if(K(t,e))return R(!X.f.call(t,e),t[e])}},tt=z("native-function-to-string",Function.toString),et=E.WeakMap,rt="function"==typeof et&&/native code/.test(tt.call(et)),nt=z("keys"),it=function(t){return nt[t]||(nt[t]=I(t))},ot={},st=E.WeakMap;if(rt){var at=new st,ct=at.get,lt=at.has,ut=at.set;b=function(t,e){return ut.call(at,t,e),e},m=function(t){return ct.call(at,t)||{}},x=function(t){return lt.call(at,t)}}else{var ft=it("state");ot[ft]=!0,b=function(t,e){return T(t,ft,e),e},m=function(t){return K(t,ft)?t[ft]:{}},x=function(t){return K(t,ft)}}var ht,dt={set:b,get:m,has:x,enforce:function(t){return x(t)?m(t):b(t,{})},getterFor:function(t){return function(e){var r;if(!p(e)||(r=m(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},pt=y(function(t){var e=dt.get,r=dt.enforce,n=String(tt).split("toString");z("inspectSource",function(t){return tt.call(t)}),(t.exports=function(t,e,i,o){var s=!!o&&!!o.unsafe,a=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof e||K(i,"name")||T(i,"name",e),r(i).source=n.join("string"==typeof e?e:"")),t!==E?(s?!c&&t[e]&&(a=!0):delete t[e],a?t[e]=i:T(t,e,i)):a?t[e]=i:W(e,i)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||tt.call(this)})}),vt=Math.max,gt=Math.min,yt=(ht=!1,function(t,e,r){var n,i=U(t),o=d(i.length),s=function(t,e){var r=f(t);return r<0?vt(r+e,0):gt(r,e)}(r,o);if(ht&&e!=e){for(;o>s;)if((n=i[s++])!=n)return!0}else for(;o>s;s++)if((ht||s in i)&&i[s]===e)return ht||s||0;return!ht&&-1}),bt=function(t,e){var r,n=U(t),i=0,o=[];for(r in n)!K(ot,r)&&K(n,r)&&o.push(r);for(;e.length>i;)K(n,r=e[i++])&&(~yt(o,r)||o.push(r));return o},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xt=mt.concat("length","prototype"),Et={f:Object.getOwnPropertyNames||function(t){return bt(t,xt)}},wt={f:Object.getOwnPropertySymbols},Ot=E.Reflect,_t=Ot&&Ot.ownKeys||function(t){var e=Et.f(k(t)),r=wt.f;return r?e.concat(r(t)):e},St=function(t,e){for(var r=_t(e),n=j.f,i=Z.f,o=0;o<r.length;o++){var s=r[o];K(t,s)||n(t,s,i(e,s))}},At=/#|\.prototype\./,kt=function(t,e){var n=Mt[Lt(t)];return n==Rt||n!=jt&&("function"==typeof e?r(e):!!e)},Lt=kt.normalize=function(t){return String(t).replace(At,".").toLowerCase()},Mt=kt.data={},jt=kt.NATIVE="N",Rt=kt.POLYFILL="P",Tt=kt,Wt=Z.f,zt=function(t,e){var r,n,i,o,s,a=t.target,c=t.global,l=t.stat;if(r=c?E:l?E[a]||W(a,{}):(E[a]||{}).prototype)for(n in e){if(o=e[n],i=t.noTargetGet?(s=Wt(r,n))&&s.value:r[n],!Tt(c?n:a+(l?".":"#")+n,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;St(o,i)}(t.sham||i&&i.sham)&&T(o,"sham",!0),pt(r,n,o,t)}},Ct=q(2),Nt=function(t){return!r(function(){var e=[];return(e.constructor={})[$]=function(){return{foo:1}},1!==e[t](Boolean).foo})}("filter");zt({target:"Array",proto:!0,forced:!Nt},{filter:function(t){return Ct(this,t,arguments[1])}});var It=function(t,e){var n=[][t];return!n||!r(function(){n.call(null,e||function(){throw 1},1)})},Dt=[].forEach,Pt=q(0),Vt=It("forEach")?function(t){return Pt(this,t,arguments[1])}:Dt;zt({target:"Array",proto:!0,forced:[].forEach!=Vt},{forEach:Vt});var Ft=Object.keys||function(t){return bt(t,mt)},Bt=w?Object.defineProperties:function(t,e){k(t);for(var r,n=Ft(e),i=n.length,o=0;i>o;)j.f(t,r=n[o++],e[r]);return t},Ht=E.document,qt=Ht&&Ht.documentElement,$t=it("IE_PROTO"),Yt=function(){},Gt=function(){var t,e=S("iframe"),r=mt.length;for(e.style.display="none",qt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),Gt=t.F;r--;)delete Gt.prototype[mt[r]];return Gt()},Xt=Object.create||function(t,e){var r;return null!==t?(Yt.prototype=k(t),r=new Yt,Yt.prototype=null,r[$t]=t):r=Gt(),void 0===e?r:Bt(r,e)};ot[$t]=!0;var Ut=F("unscopables"),Qt=Array.prototype;null==Qt[Ut]&&T(Qt,Ut,Xt(null));var Kt,Jt,Zt,te=function(t){Qt[Ut][t]=!0},ee={},re=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),ne=it("IE_PROTO"),ie=Object.prototype,oe=re?Object.getPrototypeOf:function(t){return t=c(t),K(t,ne)?t[ne]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ie:null},se=F("iterator"),ae=!1;[].keys&&("next"in(Zt=[].keys())?(Jt=oe(oe(Zt)))!==Object.prototype&&(Kt=Jt):ae=!0),null==Kt&&(Kt={}),K(Kt,se)||T(Kt,se,function(){return this});var ce={IteratorPrototype:Kt,BUGGY_SAFARI_ITERATORS:ae},le=j.f,ue=F("toStringTag"),fe=function(t,e,r){t&&!K(t=r?t:t.prototype,ue)&&le(t,ue,{configurable:!0,value:e})},he=ce.IteratorPrototype,de=function(){return this},pe=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return function(t,e){if(k(t),!p(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r,n),e?t.call(r,n):r.__proto__=n,r}}():void 0),ve=F("iterator"),ge=ce.IteratorPrototype,ye=ce.BUGGY_SAFARI_ITERATORS,be=function(){return this},me=function(t,e,r,n,i,o,s){!function(t,e,r){var n=e+" Iterator";t.prototype=Xt(he,{next:R(1,r)}),fe(t,n,!1),ee[n]=de}(r,e,n);var a,c,l,u=function(t){if(t===i&&v)return v;if(!ye&&t in d)return d[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",h=!1,d=t.prototype,p=d[ve]||d["@@iterator"]||i&&d[i],v=!ye&&p||u(i),g="Array"==e&&d.entries||p;if(g&&(a=oe(g.call(new t)),ge!==Object.prototype&&a.next&&(oe(a)!==ge&&(pe?pe(a,ge):"function"!=typeof a[ve]&&T(a,ve,be)),fe(a,f,!0))),"values"==i&&p&&"values"!==p.name&&(h=!0,v=function(){return p.call(this)}),d[ve]!==v&&T(d,ve,v),ee[e]=v,i)if(c={values:u("values"),keys:o?v:u("keys"),entries:u("entries")},s)for(l in c)!ye&&!h&&l in d||pt(d,l,c[l]);else zt({target:e,proto:!0,forced:ye||h},c);return c},xe=dt.set,Ee=dt.getterFor("Array Iterator"),we=me(Array,"Array",function(t,e){xe(this,{type:"Array Iterator",target:U(t),index:0,kind:e})},function(){var t=Ee(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}},"values");ee.Arguments=ee.Array,te("keys"),te("values"),te("entries");var Oe=It("reduce");zt({target:"Array",proto:!0,forced:Oe},{reduce:function(e){return function(e,r,n,i,o){t(r);var a=c(e),l=s(a),u=d(a.length),f=o?u-1:0,h=o?-1:1;if(n<2)for(;;){if(f in l){i=l[f],f+=h;break}if(f+=h,o?f<0:u<=f)throw TypeError("Reduce of empty array with no initial value")}for(;o?f>=0:u>f;f+=h)f in l&&(i=r(i,l[f],f,a));return i}(this,e,arguments.length,arguments[1],!1)}});var _e=j.f,Se=Function.prototype,Ae=Se.toString,ke=/^\s*function ([^ (]*)/;!w||"name"in Se||_e(Se,"name",{configurable:!0,get:function(){try{return Ae.call(this).match(ke)[1]}catch(t){return""}}});var Le=Object.assign,Me=!Le||r(function(){var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach(function(t){e[t]=t}),7!=Le({},t)[r]||"abcdefghijklmnopqrst"!=Ft(Le({},e)).join("")})?function(t,e){for(var r=c(t),n=arguments.length,i=1,o=wt.f,a=X.f;n>i;)for(var l,u=s(arguments[i++]),f=o?Ft(u).concat(o(u)):Ft(u),h=f.length,d=0;h>d;)a.call(u,l=f[d++])&&(r[l]=u[l]);return r}:Le;zt({target:"Object",stat:!0,forced:Object.assign!==Me},{assign:Me});var je=F("toStringTag"),Re="Arguments"==i(function(){return arguments}()),Te=function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),je))?r:Re?i(e):"Object"==(n=i(e))&&"function"==typeof e.callee?"Arguments":n},We={};We[F("toStringTag")]="z";var ze="[object z]"!==String(We)?function(){return"[object "+Te(this)+"]"}:We.toString,Ce=Object.prototype;ze!==Ce.toString&&pt(Ce,"toString",ze,{unsafe:!0});var Ne="\t\n\v\f\r                 \u2028\u2029\ufeff",Ie="["+Ne+"]",De=RegExp("^"+Ie+Ie+"*"),Pe=RegExp(Ie+Ie+"*$"),Ve=E.parseInt,Fe=/^[-+]?0[xX]/,Be=8!==Ve(Ne+"08")||22!==Ve(Ne+"0x16")?function(t,e){var r=function(t,e){return t=String(a(t)),1&e&&(t=t.replace(De,"")),2&e&&(t=t.replace(Pe,"")),t}(String(t),3);return Ve(r,e>>>0||(Fe.test(r)?16:10))}:Ve;zt({global:!0,forced:parseInt!=Be},{parseInt:Be});var He,qe,$e=RegExp.prototype.exec,Ye=String.prototype.replace,Ge=$e,Xe=(He=/a/,qe=/b*/g,$e.call(He,"a"),$e.call(qe,"a"),0!==He.lastIndex||0!==qe.lastIndex),Ue=void 0!==/()??/.exec("")[1];(Xe||Ue)&&(Ge=function(t){var e,r,n,i,o=this;return Ue&&(r=new RegExp("^"+o.source+"$(?!\\s)",function(){var t=k(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}.call(o))),Xe&&(e=o.lastIndex),n=$e.call(o,t),Xe&&n&&(o.lastIndex=o.global?n.index+n[0].length:e),Ue&&n&&n.length>1&&Ye.call(n[0],r,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(n[i]=void 0)}),n});var Qe=Ge;zt({target:"RegExp",proto:!0,forced:/./.exec!==Qe},{exec:Qe});var Ke=function(t,e,r){var n,i,o=String(a(t)),s=f(e),c=o.length;return s<0||s>=c?r?"":void 0:(n=o.charCodeAt(s))<55296||n>56319||s+1===c||(i=o.charCodeAt(s+1))<56320||i>57343?r?o.charAt(s):n:r?o.slice(s,s+2):i-56320+(n-55296<<10)+65536},Je=dt.set,Ze=dt.getterFor("String Iterator");me(String,"String",function(t){Je(this,{type:"String Iterator",string:String(t),index:0})},function(){var t,e=Ze(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Ke(r,n,!0),e.index+=t.length,{value:t,done:!1})});var tr=function(t,e,r){return e+(r?Ke(t,e,!0).length:1)},er=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==i(t))throw TypeError("RegExp#exec called on incompatible receiver");return Qe.call(t,e)},rr=F("species"),nr=!r(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),ir=!r(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}),or=function(t,e,n,i){var o=F(t),s=!r(function(){var e={};return e[o]=function(){return 7},7!=""[t](e)}),a=s&&!r(function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===t&&(r.constructor={},r.constructor[rr]=function(){return r}),r[o](""),!e});if(!s||!a||"replace"===t&&!nr||"split"===t&&!ir){var c=/./[o],l=n(o,""[t],function(t,e,r,n,i){return e.exec===Qe?s&&!i?{done:!0,value:c.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),u=l[0],f=l[1];pt(String.prototype,t,u),pt(RegExp.prototype,o,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}),i&&T(RegExp.prototype[o],"sham",!0)}};or("match",1,function(t,e,r){return[function(e){var r=a(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var i=k(t),o=String(this);if(!i.global)return er(i,o);var s=i.unicode;i.lastIndex=0;for(var a,c=[],l=0;null!==(a=er(i,o));){var u=String(a[0]);c[l]=u,""===u&&(i.lastIndex=tr(o,d(i.lastIndex),s)),l++}return 0===l?null:c}]});var sr=Math.max,ar=Math.min,cr=Math.floor,lr=/\$([$&`']|\d\d?|<[^>]*>)/g,ur=/\$([$&`']|\d\d?)/g;or("replace",2,function(t,e,r){return[function(r,n){var i=a(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i,n):e.call(String(i),r,n)},function(t,i){var o=r(e,t,this,i);if(o.done)return o.value;var s=k(t),a=String(this),c="function"==typeof i;c||(i=String(i));var l=s.global;if(l){var u=s.unicode;s.lastIndex=0}for(var h=[];;){var p=er(s,a);if(null===p)break;if(h.push(p),!l)break;""===String(p[0])&&(s.lastIndex=tr(a,d(s.lastIndex),u))}for(var v,g="",y=0,b=0;b<h.length;b++){p=h[b];for(var m=String(p[0]),x=sr(ar(f(p.index),a.length),0),E=[],w=1;w<p.length;w++)E.push(void 0===(v=p[w])?v:String(v));var O=p.groups;if(c){var _=[m].concat(E,x,a);void 0!==O&&_.push(O);var S=String(i.apply(void 0,_))}else S=n(m,a,x,E,O,i);x>=y&&(g+=a.slice(y,x)+S,y=x+m.length)}return g+a.slice(y)}];function n(t,r,n,i,o,s){var a=n+t.length,l=i.length,u=ur;return void 0!==o&&(o=c(o),u=lr),e.call(s,u,function(e,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(a);case"<":c=o[s.slice(1,-1)];break;default:var u=+s;if(0===u)return e;if(u>l){var f=cr(u/10);return 0===f?e:f<=l?void 0===i[f-1]?s.charAt(1):i[f-1]+s.charAt(1):e}c=i[u-1]}return void 0===c?"":c})}});var fr=function(t,e,r){for(var n in e)pt(t,n,e[n],r);return t},hr=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),dr=y(function(t){var e=I("meta"),r=j.f,n=0,i=Object.isExtensible||function(){return!0},o=function(t){r(t,e,{value:{objectID:"O"+ ++n,weakData:{}}})},s=t.exports={REQUIRED:!1,fastKey:function(t,r){if(!p(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!K(t,e)){if(!i(t))return"F";if(!r)return"E";o(t)}return t[e].objectID},getWeakData:function(t,r){if(!K(t,e)){if(!i(t))return!0;if(!r)return!1;o(t)}return t[e].weakData},onFreeze:function(t){return hr&&s.REQUIRED&&i(t)&&!K(t,e)&&o(t),t}};ot[e]=!0}),pr=(dr.REQUIRED,dr.fastKey,dr.getWeakData,dr.onFreeze,function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}),vr=F("iterator"),gr=Array.prototype,yr=F("iterator"),br=function(t,e,r,n){try{return n?e(k(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&k(i.call(t)),e}},mr=y(function(t){var r={};(t.exports=function(t,n,i,o,s){var a,c,l,u,f,h,p=e(n,i,o?2:1);if(s)a=t;else{if("function"!=typeof(c=function(t){if(null!=t)return t[yr]||t["@@iterator"]||ee[Te(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(h=c)&&(ee.Array===h||gr[vr]===h)){for(l=0,u=d(t.length);u>l;l++)if((o?p(k(f=t[l])[0],f[1]):p(t[l]))===r)return r;return}a=c.call(t)}for(;!(f=a.next()).done;)if(br(a,p,f.value,o)===r)return r}).BREAK=r}),xr=dr.getWeakData,Er=dt.set,wr=dt.getterFor,Or=q(5),_r=q(6),Sr=0,Ar=function(t){return t.frozen||(t.frozen=new kr)},kr=function(){this.entries=[]},Lr=function(t,e){return Or(t.entries,function(t){return t[0]===e})};kr.prototype={get:function(t){var e=Lr(this,t);if(e)return e[1]},has:function(t){return!!Lr(this,t)},set:function(t,e){var r=Lr(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=_r(this.entries,function(e){return e[0]===t});return~e&&this.entries.splice(e,1),!!~e}};var Mr={getConstructor:function(t,e,r,n){var i=t(function(t,o){pr(t,i,e),Er(t,{type:e,id:Sr++,frozen:void 0}),null!=o&&mr(o,t[n],t,r)}),o=wr(e),s=function(t,e,r){var n=o(t),i=xr(k(e),!0);return!0===i?Ar(n).set(e,r):i[n.id]=r,t};return fr(i.prototype,{delete:function(t){var e=o(this);if(!p(t))return!1;var r=xr(t);return!0===r?Ar(e).delete(t):r&&K(r,e.id)&&delete r[e.id]},has:function(t){var e=o(this);if(!p(t))return!1;var r=xr(t);return!0===r?Ar(e).has(t):r&&K(r,e.id)}}),fr(i.prototype,r?{get:function(t){var e=o(this);if(p(t)){var r=xr(t);return!0===r?Ar(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),i}},jr=F("iterator"),Rr=!1;try{var Tr=0;({next:function(){return{done:!!Tr++}},return:function(){Rr=!0}})[jr]=function(){return this}}catch(t){}var Wr=function(t,e,n,i,o){var s=E[t],a=s&&s.prototype,c=s,l=i?"set":"add",u={},f=function(t){var e=a[t];pt(a,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!p(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return o&&!p(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!p(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(Tt(t,"function"!=typeof s||!(o||a.forEach&&!r(function(){(new s).entries().next()}))))c=n.getConstructor(e,t,i,l),dr.REQUIRED=!0;else if(Tt(t,!0)){var h=new c,d=h[l](o?{}:-0,1)!=h,v=r(function(){h.has(1)}),g=function(t,e){if(!e&&!Rr)return!1;var r=!1;try{var n={};n[jr]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}(function(t){new s(t)}),y=!o&&r(function(){for(var t=new s,e=5;e--;)t[l](e,e);return!t.has(-0)});g||((c=e(function(e,r){pr(e,c,t);var n=function(t,e,r){var n,i=e.constructor;return i!==r&&"function"==typeof i&&(n=i.prototype)!==r.prototype&&p(n)&&pe&&pe(t,n),t}(new s,e,c);return null!=r&&mr(r,n[l],n,i),n})).prototype=a,a.constructor=c),(v||y)&&(f("delete"),f("has"),i&&f("get")),(y||d)&&f(l),o&&a.clear&&delete a.clear}return u[t]=c,zt({global:!0,forced:c!=s},u),fe(c,t),o||n.setStrong(c,t,i),c},zr=(y(function(t){var e,r=dt.enforce,n=!E.ActiveXObject&&"ActiveXObject"in E,i=Object.isExtensible,o=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},s=t.exports=Wr("WeakMap",o,Mr,!0,!0);if(rt&&n){e=Mr.getConstructor(o,"WeakMap",!0),dr.REQUIRED=!0;var a=s.prototype,c=a.delete,l=a.has,u=a.get,f=a.set;fr(a,{delete:function(t){if(p(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),c.call(this,t)||n.frozen.delete(t)}return c.call(this,t)},has:function(t){if(p(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),l.call(this,t)||n.frozen.has(t)}return l.call(this,t)},get:function(t){if(p(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),l.call(this,t)?u.call(this,t):n.frozen.get(t)}return u.call(this,t)},set:function(t,n){if(p(t)&&!i(t)){var o=r(this);o.frozen||(o.frozen=new e),l.call(this,t)?f.call(this,t,n):o.frozen.set(t,n)}else f.call(this,t,n);return this}})}}),{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0});for(var Cr in zr){var Nr=E[Cr],Ir=Nr&&Nr.prototype;if(Ir&&Ir.forEach!==Vt)try{T(Ir,"forEach",Vt)}catch(t){Ir.forEach=Vt}}var Dr=F("iterator"),Pr=F("toStringTag"),Vr=we.values;for(var Fr in zr){var Br=E[Fr],Hr=Br&&Br.prototype;if(Hr){if(Hr[Dr]!==Vr)try{T(Hr,Dr,Vr)}catch(t){Hr[Dr]=Vr}if(Hr[Pr]||T(Hr,Pr,Fr),zr[Fr])for(var qr in we)if(Hr[qr]!==we[qr])try{T(Hr,qr,we[qr])}catch(t){Hr[qr]=we[qr]}}}var $r="Expected a function",Yr=NaN,Gr="[object Symbol]",Xr=/^\s+|\s+$/g,Ur=/^[-+]0x[0-9a-f]+$/i,Qr=/^0b[01]+$/i,Kr=/^0o[0-7]+$/i,Jr=parseInt,Zr="object"==typeof g&&g&&g.Object===Object&&g,tn="object"==typeof self&&self&&self.Object===Object&&self,en=Zr||tn||Function("return this")(),rn=Object.prototype.toString,nn=Math.max,on=Math.min,sn=function(){return en.Date.now()};function an(t,e,r){var n,i,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError($r);function d(e){var r=n,o=i;return n=i=void 0,l=e,s=t.apply(o,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=sn();if(p(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?on(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&n?d(t):(n=i=void 0,s)}function y(){var t=sn(),r=p(t);if(n=arguments,i=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?d(t):s}(c);if(f)return a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=ln(e)||0,cn(r)&&(u=!!r.leading,o=(f="maxWait"in r)?nn(ln(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=i=a=void 0},y.flush=function(){return void 0===a?s:g(sn())},y}function cn(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function ln(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&rn.call(t)==Gr}(t))return Yr;if(cn(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=cn(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Xr,"");var r=Qr.test(t);return r||Kr.test(t)?Jr(t.slice(2),r?2:8):Ur.test(t)?Yr:+t}var un=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new TypeError($r);return cn(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),an(t,e,{leading:n,maxWait:e,trailing:i})},fn="Expected a function",hn=NaN,dn="[object Symbol]",pn=/^\s+|\s+$/g,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,yn=/^0o[0-7]+$/i,bn=parseInt,mn="object"==typeof g&&g&&g.Object===Object&&g,xn="object"==typeof self&&self&&self.Object===Object&&self,En=mn||xn||Function("return this")(),wn=Object.prototype.toString,On=Math.max,_n=Math.min,Sn=function(){return En.Date.now()};function An(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function kn(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&wn.call(t)==dn}(t))return hn;if(An(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=An(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(pn,"");var r=gn.test(t);return r||yn.test(t)?bn(t.slice(2),r?2:8):vn.test(t)?hn:+t}var Ln=function(t,e,r){var n,i,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(fn);function d(e){var r=n,o=i;return n=i=void 0,l=e,s=t.apply(o,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=Sn();if(p(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?_n(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&n?d(t):(n=i=void 0,s)}function y(){var t=Sn(),r=p(t);if(n=arguments,i=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?d(t):s}(c);if(f)return a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=kn(e)||0,An(r)&&(u=!!r.leading,o=(f="maxWait"in r)?On(kn(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=i=a=void 0},y.flush=function(){return void 0===a?s:g(Sn())},y},Mn="Expected a function",jn="__lodash_hash_undefined__",Rn="[object Function]",Tn="[object GeneratorFunction]",Wn=/^\[object .+?Constructor\]$/,zn="object"==typeof g&&g&&g.Object===Object&&g,Cn="object"==typeof self&&self&&self.Object===Object&&self,Nn=zn||Cn||Function("return this")();var In=Array.prototype,Dn=Function.prototype,Pn=Object.prototype,Vn=Nn["__core-js_shared__"],Fn=function(){var t=/[^.]+$/.exec(Vn&&Vn.keys&&Vn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Bn=Dn.toString,Hn=Pn.hasOwnProperty,qn=Pn.toString,$n=RegExp("^"+Bn.call(Hn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Yn=In.splice,Gn=ei(Nn,"Map"),Xn=ei(Object,"create");function Un(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Qn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Kn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Jn(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function Zn(t){return!(!ni(t)||(e=t,Fn&&Fn in e))&&(function(t){var e=ni(t)?qn.call(t):"";return e==Rn||e==Tn}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?$n:Wn).test(function(t){if(null!=t){try{return Bn.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function ti(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function ei(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Zn(r)?r:void 0}function ri(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(Mn);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(ri.Cache||Kn),r}function ni(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}Un.prototype.clear=function(){this.__data__=Xn?Xn(null):{}},Un.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Un.prototype.get=function(t){var e=this.__data__;if(Xn){var r=e[t];return r===jn?void 0:r}return Hn.call(e,t)?e[t]:void 0},Un.prototype.has=function(t){var e=this.__data__;return Xn?void 0!==e[t]:Hn.call(e,t)},Un.prototype.set=function(t,e){return this.__data__[t]=Xn&&void 0===e?jn:e,this},Qn.prototype.clear=function(){this.__data__=[]},Qn.prototype.delete=function(t){var e=this.__data__,r=Jn(e,t);return!(r<0||(r==e.length-1?e.pop():Yn.call(e,r,1),0))},Qn.prototype.get=function(t){var e=this.__data__,r=Jn(e,t);return r<0?void 0:e[r][1]},Qn.prototype.has=function(t){return Jn(this.__data__,t)>-1},Qn.prototype.set=function(t,e){var r=this.__data__,n=Jn(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Kn.prototype.clear=function(){this.__data__={hash:new Un,map:new(Gn||Qn),string:new Un}},Kn.prototype.delete=function(t){return ti(this,t).delete(t)},Kn.prototype.get=function(t){return ti(this,t).get(t)},Kn.prototype.has=function(t){return ti(this,t).has(t)},Kn.prototype.set=function(t,e){return ti(this,t).set(t,e),this},ri.Cache=Kn;var ii=ri,oi=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var r=-1;return t.some(function(t,n){return t[0]===e&&(r=n,!0)}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var r=t(this.__entries__,e),n=this.__entries__[r];return n&&n[1]},e.prototype.set=function(e,r){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=r:this.__entries__.push([e,r])},e.prototype.delete=function(e){var r=this.__entries__,n=t(r,e);~n&&r.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var r=0,n=this.__entries__;r<n.length;r++){var i=n[r];t.call(e,i[1],i[0])}},e}()}(),si="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,ai="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),ci="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(ai):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)},li=2;var ui=20,fi=["top","right","bottom","left","width","height","size","weight"],hi="undefined"!=typeof MutationObserver,di=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var r=!1,n=!1,i=0;function o(){r&&(r=!1,t()),n&&a()}function s(){ci(o)}function a(){var t=Date.now();if(r){if(t-i<li)return;n=!0}else r=!0,n=!1,setTimeout(s,e);i=t}return a}(this.refresh.bind(this),ui)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,r=e.indexOf(t);~r&&e.splice(r,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){si&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),hi?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){si&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,r=void 0===e?"":e;fi.some(function(t){return!!~r.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),pi=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},vi=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||ai},gi=wi(0,0,0,0);function yi(t){return parseFloat(t)||0}function bi(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(e,r){return e+yi(t["border-"+r+"-width"])},0)}function mi(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return gi;var n=vi(t).getComputedStyle(t),i=function(t){for(var e={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var i=n[r],o=t["padding-"+i];e[i]=yi(o)}return e}(n),o=i.left+i.right,s=i.top+i.bottom,a=yi(n.width),c=yi(n.height);if("border-box"===n.boxSizing&&(Math.round(a+o)!==e&&(a-=bi(n,"left","right")+o),Math.round(c+s)!==r&&(c-=bi(n,"top","bottom")+s)),!function(t){return t===vi(t).document.documentElement}(t)){var l=Math.round(a+o)-e,u=Math.round(c+s)-r;1!==Math.abs(l)&&(a-=l),1!==Math.abs(u)&&(c-=u)}return wi(i.left,i.top,a,c)}var xi="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof vi(t).SVGGraphicsElement}:function(t){return t instanceof vi(t).SVGElement&&"function"==typeof t.getBBox};function Ei(t){return si?xi(t)?function(t){var e=t.getBBox();return wi(0,0,e.width,e.height)}(t):mi(t):gi}function wi(t,e,r,n){return{x:t,y:e,width:r,height:n}}var Oi=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=wi(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Ei(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),_i=function(){return function(t,e){var r,n,i,o,s,a,c,l=(n=(r=e).x,i=r.y,o=r.width,s=r.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),pi(c,{x:n,y:i,width:o,height:s,top:i,right:n+o,bottom:s+i,left:n}),c);pi(this,{target:t,contentRect:l})}}(),Si=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new oi,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof vi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Oi(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof vi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new _i(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Ai="undefined"!=typeof WeakMap?new WeakMap:new oi,ki=function(){return function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=di.getInstance(),n=new Si(e,r,this);Ai.set(this,n)}}();["observe","unobserve","disconnect"].forEach(function(t){ki.prototype[t]=function(){var e;return(e=Ai.get(this))[t].apply(e,arguments)}});var Li=void 0!==ai.ResizeObserver?ai.ResizeObserver:ki,Mi=!("undefined"==typeof window||!window.document||!window.document.createElement);function ji(){if("undefined"==typeof document)return 0;var t=document.body,e=document.createElement("div"),r=e.style;r.position="fixed",r.left=0,r.visibility="hidden",r.overflowY="scroll",t.appendChild(e);var n=e.getBoundingClientRect().right;return t.removeChild(e),n}var Ri=function(){function t(e,r){var n=this;this.onScroll=function(){n.scrollXTicking||(window.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(window.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0)},this.scrollX=function(){n.axis.x.isOverflowing&&(n.showScrollbar("x"),n.positionScrollbar("x")),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&(n.showScrollbar("y"),n.positionScrollbar("y")),n.scrollYTicking=!1},this.onMouseEnter=function(){n.showScrollbar("x"),n.showScrollbar("y")},this.onMouseMove=function(t){n.mouseX=t.clientX,n.mouseY=t.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this.onWindowResize=function(){n.scrollbarWidth=ji(),n.hideNativeScrollbar()},this.hideScrollbars=function(){n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.track.rect)||(n.axis.y.scrollbar.el.classList.remove(n.classNames.visible),n.axis.y.isVisible=!1),n.isWithinBounds(n.axis.x.track.rect)||(n.axis.x.scrollbar.el.classList.remove(n.classNames.visible),n.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,r;n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(r=n.isWithinBounds(n.axis.x.scrollbar.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(e=n.isWithinBounds(n.axis.y.scrollbar.rect)),(e||r)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&n.onDragStart(t,"y"),r&&n.onDragStart(t,"x")))},this.drag=function(e){var r=n.axis[n.draggedAxis].track,i=r.rect[n.axis[n.draggedAxis].sizeAttr],o=n.axis[n.draggedAxis].scrollbar;e.preventDefault(),e.stopPropagation();var s=(("y"===n.draggedAxis?e.pageY:e.pageX)-r.rect[n.axis[n.draggedAxis].offsetAttr]-n.axis[n.draggedAxis].dragOffset)/r.rect[n.axis[n.draggedAxis].sizeAttr]*n.contentWrapperEl[n.axis[n.draggedAxis].scrollSizeAttr];"x"===n.draggedAxis&&(s=n.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?s-(i+o.size):s,s=n.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-s:s),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=s},this.onEndDrag=function(t){t.preventDefault(),t.stopPropagation(),n.el.classList.remove(n.classNames.dragging),document.removeEventListener("mousemove",n.drag,!0),document.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=window.setTimeout(function(){document.removeEventListener("click",n.preventClick,!0),document.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null})},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.flashTimeout,this.contentEl,this.contentWrapperEl,this.offsetEl,this.maskEl,this.globalObserver,this.mutationObserver,this.resizeObserver,this.scrollbarWidth,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,r),this.classNames=Object.assign({},t.defaultOptions.classNames,this.options.classNames),this.isRtl,this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=un(this.recalculate.bind(this),64),this.onMouseMove=un(this.onMouseMove.bind(this),64),this.hideScrollbars=Ln(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Ln(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=ii(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var r=e.firstElementChild;document.body.appendChild(r);var n=r.firstElementChild;r.scrollLeft=0;var i=t.getOffset(r),o=t.getOffset(n);r.scrollLeft=999;var s=t.getOffset(n);return{isRtlScrollingInverted:i.left!==o.left&&o.left-s.left!=0,isRtlScrollbarInverted:i.left!==o.left}},t.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(function(e){e.forEach(function(e){Array.prototype.forEach.call(e.addedNodes,function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!t.instances.has(e)&&new t(e,t.getElOptions(e)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),function(e){!t.instances.has(e)&&new t(e,t.getElOptions(e))}))}),Array.prototype.forEach.call(e.removedNodes,function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?t.instances.has(e)&&t.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),function(e){t.instances.has(e)&&t.instances.get(e).unMount()}))})})}),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},t.getElOptions=function(t){return Array.prototype.reduce.call(t.attributes,function(t,e){var r=e.name.match(/data-simplebar-(.+)/);if(r){var n=r[1].replace(/\W+(.)/g,function(t,e){return e.toUpperCase()});switch(e.value){case"true":t[n]=!0;break;case"false":t[n]=!1;break;case void 0:t[n]=!0;break;default:t[n]=e.value}}return t},{})},t.removeObserver=function(){this.globalObserver.disconnect()},t.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(e){t.instances.has(e)||new t(e,t.getElOptions(e))})},t.getOffset=function(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),Mi&&(this.initDOM(),this.scrollbarWidth=ji(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,function(e){return e.classList.contains(t.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.el.querySelector("."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.el.querySelector("."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.el.querySelector("."+this.classNames.track+"."+this.classNames.vertical);else{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"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(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)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),r=document.createElement("div");e.classList.add(this.classNames.track),r.classList.add(this.classNames.scrollbar),e.appendChild(r),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var t=this;this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(e){t.el.addEventListener(e,t.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.onWindowResize),this.resizeObserver=new Li(this.recalculate),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl)},e.recalculate=function(){var t=this.heightAutoObserverEl.offsetHeight<=1,e=this.heightAutoObserverEl.offsetWidth<=1;this.elStyles=window.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction,this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft,this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=e?this.contentEl.offsetWidth+"px":"auto",this.placeholderEl.style.height=this.contentEl.scrollHeight+"px",this.axis.x.isOverflowing=this.contentWrapperEl.scrollWidth>this.contentWrapperEl.offsetWidth,this.axis.y.isOverflowing=this.contentWrapperEl.scrollHeight>this.contentWrapperEl.offsetHeight,this.axis.x.isOverflowing="hidden"!==this.elStyles.overflowX&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==this.elStyles.overflowY&&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(),this.axis.x.track.rect=this.axis.x.track.el.getBoundingClientRect(),this.axis.y.track.rect=this.axis.y.track.el.getBoundingClientRect(),this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){void 0===t&&(t="y");var e,r=this.scrollbarWidth?this.contentWrapperEl[this.axis[t].scrollSizeAttr]:this.contentWrapperEl[this.axis[t].scrollSizeAttr]-this.minScrollbarWidth,n=this.axis[t].track.rect[this.axis[t].sizeAttr];if(this.axis[t].isOverflowing){var i=n/r;return e=Math.max(~~(i*n),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e}},e.positionScrollbar=function(e){void 0===e&&(e="y");var r=this.contentWrapperEl[this.axis[e].scrollSizeAttr],n=this.axis[e].track.rect[this.axis[e].sizeAttr],i=parseInt(this.elStyles[this.axis[e].sizeAttr],10),o=this.axis[e].scrollbar,s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=(s="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-s:s)/(r-i),c=~~((n-o.size)*a);c="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c+(n-o.size):c,o.el.style.transform="x"===e?"translate3d("+c+"px, 0, 0)":"translate3d(0, "+c+"px, 0)"},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,r=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none"},e.hideNativeScrollbar=function(){if(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+(this.scrollbarWidth||this.minScrollbarWidth)+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+(this.scrollbarWidth||this.minScrollbarWidth)+"px":0,!this.scrollbarWidth){var t=[this.isRtl?"paddingLeft":"paddingRight"];this.contentWrapperEl.style[t]=this.axis.y.isOverflowing||this.axis.y.forceVisible?this.minScrollbarWidth+"px":0,this.contentWrapperEl.style.paddingBottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?this.minScrollbarWidth+"px":0}},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var r=this.axis[e].scrollbar.el,n="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=n-r.getBoundingClientRect()[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),document.addEventListener("mousemove",this.drag,!0),document.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(document.addEventListener("click",this.preventClick,!0),document.addEventListener("dblclick",this.preventClick,!0)):(window.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.removeListeners=function(){var t=this;this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})}),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isChildNode=function(t){return null!==t&&(t===this.el||this.isChildNode(t.parentNode))},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},t}();return Ri.defaultOptions={autoHide:!0,forceVisible:!1,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"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},Ri.instances=new WeakMap,Mi&&Ri.initHtmlApi(),Ri});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).SimpleBar=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r,n,i,o="object",s=function(t){return t&&t.Math==Math&&t},a=s(typeof globalThis==o&&globalThis)||s(typeof window==o&&window)||s(typeof self==o&&self)||s(typeof t==o&&t)||Function("return this")(),c=function(t){try{return!!t()}catch(t){return!0}},l=!c((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),u={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,h={f:f&&!u.call({1:2},1)?function(t){var e=f(this,t);return!!e&&e.enumerable}:u},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},p={}.toString,v=function(t){return p.call(t).slice(8,-1)},g="".split,y=c((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==v(t)?g.call(t,""):Object(t)}:Object,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=function(t){return y(b(t))},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},E=function(t,e){if(!x(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!x(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!x(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!x(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,O=function(t,e){return w.call(t,e)},_=a.document,S=x(_)&&x(_.createElement),A=function(t){return S?_.createElement(t):{}},L=!l&&!c((function(){return 7!=Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a})),k=Object.getOwnPropertyDescriptor,M={f:l?k:function(t,e){if(t=m(t),e=E(e,!0),L)try{return k(t,e)}catch(t){}if(O(t,e))return d(!h.f.call(t,e),t[e])}},j=function(t){if(!x(t))throw TypeError(String(t)+" is not an object");return t},T=Object.defineProperty,R={f:l?T:function(t,e,r){if(j(t),e=E(e,!0),j(r),L)try{return T(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},z=l?function(t,e,r){return R.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},W=function(t,e){try{z(a,t,e)}catch(r){a[t]=e}return e},C=e((function(t){var e=a["__core-js_shared__"]||W("__core-js_shared__",{});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),N=C("native-function-to-string",Function.toString),I=a.WeakMap,D="function"==typeof I&&/native code/.test(N.call(I)),P=0,V=Math.random(),F=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++P+V).toString(36)},H=C("keys"),B=function(t){return H[t]||(H[t]=F(t))},q={},$=a.WeakMap;if(D){var G=new $,X=G.get,Y=G.has,U=G.set;r=function(t,e){return U.call(G,t,e),e},n=function(t){return X.call(G,t)||{}},i=function(t){return Y.call(G,t)}}else{var Q=B("state");q[Q]=!0,r=function(t,e){return z(t,Q,e),e},n=function(t){return O(t,Q)?t[Q]:{}},i=function(t){return O(t,Q)}}var K={set:r,get:n,has:i,enforce:function(t){return i(t)?n(t):r(t,{})},getterFor:function(t){return function(e){var r;if(!x(e)||(r=n(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},J=e((function(t){var e=K.get,r=K.enforce,n=String(N).split("toString");C("inspectSource",(function(t){return N.call(t)})),(t.exports=function(t,e,i,o){var s=!!o&&!!o.unsafe,c=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof e||O(i,"name")||z(i,"name",e),r(i).source=n.join("string"==typeof e?e:"")),t!==a?(s?!l&&t[e]&&(c=!0):delete t[e],c?t[e]=i:z(t,e,i)):c?t[e]=i:W(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||N.call(this)}))})),Z=a,tt=function(t){return"function"==typeof t?t:void 0},et=function(t,e){return arguments.length<2?tt(Z[t])||tt(a[t]):Z[t]&&Z[t][e]||a[t]&&a[t][e]},rt=Math.ceil,nt=Math.floor,it=function(t){return isNaN(t=+t)?0:(t>0?nt:rt)(t)},ot=Math.min,st=function(t){return t>0?ot(it(t),9007199254740991):0},at=Math.max,ct=Math.min,lt=function(t){return function(e,r,n){var i,o=m(e),s=st(o.length),a=function(t,e){var r=it(t);return r<0?at(r+e,0):ct(r,e)}(n,s);if(t&&r!=r){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},ut={includes:lt(!0),indexOf:lt(!1)}.indexOf,ft=function(t,e){var r,n=m(t),i=0,o=[];for(r in n)!O(q,r)&&O(n,r)&&o.push(r);for(;e.length>i;)O(n,r=e[i++])&&(~ut(o,r)||o.push(r));return o},ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],dt=ht.concat("length","prototype"),pt={f:Object.getOwnPropertyNames||function(t){return ft(t,dt)}},vt={f:Object.getOwnPropertySymbols},gt=et("Reflect","ownKeys")||function(t){var e=pt.f(j(t)),r=vt.f;return r?e.concat(r(t)):e},yt=function(t,e){for(var r=gt(e),n=R.f,i=M.f,o=0;o<r.length;o++){var s=r[o];O(t,s)||n(t,s,i(e,s))}},bt=/#|\.prototype\./,mt=function(t,e){var r=Et[xt(t)];return r==Ot||r!=wt&&("function"==typeof e?c(e):!!e)},xt=mt.normalize=function(t){return String(t).replace(bt,".").toLowerCase()},Et=mt.data={},wt=mt.NATIVE="N",Ot=mt.POLYFILL="P",_t=mt,St=M.f,At=function(t,e){var r,n,i,o,s,c=t.target,l=t.global,u=t.stat;if(r=l?a:u?a[c]||W(c,{}):(a[c]||{}).prototype)for(n in e){if(o=e[n],i=t.noTargetGet?(s=St(r,n))&&s.value:r[n],!_t(l?n:c+(u?".":"#")+n,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;yt(o,i)}(t.sham||i&&i.sham)&&z(o,"sham",!0),J(r,n,o,t)}},Lt=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},kt=function(t,e,r){if(Lt(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}},Mt=function(t){return Object(b(t))},jt=Array.isArray||function(t){return"Array"==v(t)},Tt=!!Object.getOwnPropertySymbols&&!c((function(){return!String(Symbol())})),Rt=a.Symbol,zt=C("wks"),Wt=function(t){return zt[t]||(zt[t]=Tt&&Rt[t]||(Tt?Rt:F)("Symbol."+t))},Ct=Wt("species"),Nt=function(t,e){var r;return jt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!jt(r.prototype)?x(r)&&null===(r=r[Ct])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},It=[].push,Dt=function(t){var e=1==t,r=2==t,n=3==t,i=4==t,o=6==t,s=5==t||o;return function(a,c,l,u){for(var f,h,d=Mt(a),p=y(d),v=kt(c,l,3),g=st(p.length),b=0,m=u||Nt,x=e?m(a,g):r?m(a,0):void 0;g>b;b++)if((s||b in p)&&(h=v(f=p[b],b,d),t))if(e)x[b]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return b;case 2:It.call(x,f)}else if(i)return!1;return o?-1:n||i?i:x}},Pt={forEach:Dt(0),map:Dt(1),filter:Dt(2),some:Dt(3),every:Dt(4),find:Dt(5),findIndex:Dt(6)},Vt=function(t,e){var r=[][t];return!r||!c((function(){r.call(null,e||function(){throw 1},1)}))},Ft=Pt.forEach,Ht=Vt("forEach")?function(t){return Ft(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach;At({target:"Array",proto:!0,forced:[].forEach!=Ht},{forEach:Ht});var Bt={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var qt in Bt){var $t=a[qt],Gt=$t&&$t.prototype;if(Gt&&Gt.forEach!==Ht)try{z(Gt,"forEach",Ht)}catch(t){Gt.forEach=Ht}}var Xt=!("undefined"==typeof window||!window.document||!window.document.createElement),Yt=Wt("species"),Ut=Pt.filter;At({target:"Array",proto:!0,forced:!function(t){return!c((function(){var e=[];return(e.constructor={})[Yt]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("filter")},{filter:function(t){return Ut(this,t,arguments.length>1?arguments[1]:void 0)}});var Qt=Object.keys||function(t){return ft(t,ht)},Kt=l?Object.defineProperties:function(t,e){j(t);for(var r,n=Qt(e),i=n.length,o=0;i>o;)R.f(t,r=n[o++],e[r]);return t},Jt=et("document","documentElement"),Zt=B("IE_PROTO"),te=function(){},ee=function(){var t,e=A("iframe"),r=ht.length;for(e.style.display="none",Jt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),ee=t.F;r--;)delete ee.prototype[ht[r]];return ee()},re=Object.create||function(t,e){var r;return null!==t?(te.prototype=j(t),r=new te,te.prototype=null,r[Zt]=t):r=ee(),void 0===e?r:Kt(r,e)};q[Zt]=!0;var ne=Wt("unscopables"),ie=Array.prototype;null==ie[ne]&&z(ie,ne,re(null));var oe,se,ae,ce=function(t){ie[ne][t]=!0},le={},ue=!c((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),fe=B("IE_PROTO"),he=Object.prototype,de=ue?Object.getPrototypeOf:function(t){return t=Mt(t),O(t,fe)?t[fe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?he:null},pe=Wt("iterator"),ve=!1;[].keys&&("next"in(ae=[].keys())?(se=de(de(ae)))!==Object.prototype&&(oe=se):ve=!0),null==oe&&(oe={}),O(oe,pe)||z(oe,pe,(function(){return this}));var ge={IteratorPrototype:oe,BUGGY_SAFARI_ITERATORS:ve},ye=R.f,be=Wt("toStringTag"),me=function(t,e,r){t&&!O(t=r?t:t.prototype,be)&&ye(t,be,{configurable:!0,value:e})},xe=ge.IteratorPrototype,Ee=function(){return this},we=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return j(r),function(t){if(!x(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Oe=ge.IteratorPrototype,_e=ge.BUGGY_SAFARI_ITERATORS,Se=Wt("iterator"),Ae=function(){return this},Le=function(t,e,r,n,i,o,s){!function(t,e,r){var n=e+" Iterator";t.prototype=re(xe,{next:d(1,r)}),me(t,n,!1),le[n]=Ee}(r,e,n);var a,c,l,u=function(t){if(t===i&&g)return g;if(!_e&&t in p)return p[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",h=!1,p=t.prototype,v=p[Se]||p["@@iterator"]||i&&p[i],g=!_e&&v||u(i),y="Array"==e&&p.entries||v;if(y&&(a=de(y.call(new t)),Oe!==Object.prototype&&a.next&&(de(a)!==Oe&&(we?we(a,Oe):"function"!=typeof a[Se]&&z(a,Se,Ae)),me(a,f,!0))),"values"==i&&v&&"values"!==v.name&&(h=!0,g=function(){return v.call(this)}),p[Se]!==g&&z(p,Se,g),le[e]=g,i)if(c={values:u("values"),keys:o?g:u("keys"),entries:u("entries")},s)for(l in c)!_e&&!h&&l in p||J(p,l,c[l]);else At({target:e,proto:!0,forced:_e||h},c);return c},ke=K.set,Me=K.getterFor("Array Iterator"),je=Le(Array,"Array",(function(t,e){ke(this,{type:"Array Iterator",target:m(t),index:0,kind:e})}),(function(){var t=Me(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");le.Arguments=le.Array,ce("keys"),ce("values"),ce("entries");var Te=Object.assign,Re=!Te||c((function(){var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=Te({},t)[r]||"abcdefghijklmnopqrst"!=Qt(Te({},e)).join("")}))?function(t,e){for(var r=Mt(t),n=arguments.length,i=1,o=vt.f,s=h.f;n>i;)for(var a,c=y(arguments[i++]),u=o?Qt(c).concat(o(c)):Qt(c),f=u.length,d=0;f>d;)a=u[d++],l&&!s.call(c,a)||(r[a]=c[a]);return r}:Te;At({target:"Object",stat:!0,forced:Object.assign!==Re},{assign:Re});var ze=Wt("toStringTag"),We="Arguments"==v(function(){return arguments}()),Ce=function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),ze))?r:We?v(e):"Object"==(n=v(e))&&"function"==typeof e.callee?"Arguments":n},Ne={};Ne[Wt("toStringTag")]="z";var Ie="[object z]"!==String(Ne)?function(){return"[object "+Ce(this)+"]"}:Ne.toString,De=Object.prototype;Ie!==De.toString&&J(De,"toString",Ie,{unsafe:!0});var Pe="\t\n\v\f\r                 \u2028\u2029\ufeff",Ve="["+Pe+"]",Fe=RegExp("^"+Ve+Ve+"*"),He=RegExp(Ve+Ve+"*$"),Be=function(t){return function(e){var r=String(b(e));return 1&t&&(r=r.replace(Fe,"")),2&t&&(r=r.replace(He,"")),r}},qe={start:Be(1),end:Be(2),trim:Be(3)}.trim,$e=a.parseInt,Ge=/^[+-]?0[Xx]/,Xe=8!==$e(Pe+"08")||22!==$e(Pe+"0x16")?function(t,e){var r=qe(String(t));return $e(r,e>>>0||(Ge.test(r)?16:10))}:$e;At({global:!0,forced:parseInt!=Xe},{parseInt:Xe});var Ye=function(t){return function(e,r){var n,i,o=String(b(e)),s=it(r),a=o.length;return s<0||s>=a?t?"":void 0:(n=o.charCodeAt(s))<55296||n>56319||s+1===a||(i=o.charCodeAt(s+1))<56320||i>57343?t?o.charAt(s):n:t?o.slice(s,s+2):i-56320+(n-55296<<10)+65536}},Ue={codeAt:Ye(!1),charAt:Ye(!0)},Qe=Ue.charAt,Ke=K.set,Je=K.getterFor("String Iterator");Le(String,"String",(function(t){Ke(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=Je(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Qe(r,n),e.index+=t.length,{value:t,done:!1})}));var Ze=function(t,e,r){for(var n in e)J(t,n,e[n],r);return t},tr=!c((function(){return Object.isExtensible(Object.preventExtensions({}))})),er=e((function(t){var e=R.f,r=F("meta"),n=0,i=Object.isExtensible||function(){return!0},o=function(t){e(t,r,{value:{objectID:"O"+ ++n,weakData:{}}})},s=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!x(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!O(t,r)){if(!i(t))return"F";if(!e)return"E";o(t)}return t[r].objectID},getWeakData:function(t,e){if(!O(t,r)){if(!i(t))return!0;if(!e)return!1;o(t)}return t[r].weakData},onFreeze:function(t){return tr&&s.REQUIRED&&i(t)&&!O(t,r)&&o(t),t}};q[r]=!0})),rr=(er.REQUIRED,er.fastKey,er.getWeakData,er.onFreeze,Wt("iterator")),nr=Array.prototype,ir=Wt("iterator"),or=function(t,e,r,n){try{return n?e(j(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&j(i.call(t)),e}},sr=e((function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,r,n,i,o){var s,a,c,l,u,f,h,d=kt(r,n,i?2:1);if(o)s=t;else{if("function"!=typeof(a=function(t){if(null!=t)return t[ir]||t["@@iterator"]||le[Ce(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(h=a)&&(le.Array===h||nr[rr]===h)){for(c=0,l=st(t.length);l>c;c++)if((u=i?d(j(f=t[c])[0],f[1]):d(t[c]))&&u instanceof e)return u;return new e(!1)}s=a.call(t)}for(;!(f=s.next()).done;)if((u=or(s,d,f.value,i))&&u instanceof e)return u;return new e(!1)}).stop=function(t){return new e(!0,t)}})),ar=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},cr=Wt("iterator"),lr=!1;try{var ur=0,fr={next:function(){return{done:!!ur++}},return:function(){lr=!0}};fr[cr]=function(){return this},Array.from(fr,(function(){throw 2}))}catch(t){}var hr=function(t,e,r,n,i){var o=a[t],s=o&&o.prototype,l=o,u=n?"set":"add",f={},h=function(t){var e=s[t];J(s,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(i&&!x(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return i&&!x(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!x(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(_t(t,"function"!=typeof o||!(i||s.forEach&&!c((function(){(new o).entries().next()})))))l=r.getConstructor(e,t,n,u),er.REQUIRED=!0;else if(_t(t,!0)){var d=new l,p=d[u](i?{}:-0,1)!=d,v=c((function(){d.has(1)})),g=function(t,e){if(!e&&!lr)return!1;var r=!1;try{var n={};n[cr]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new o(t)})),y=!i&&c((function(){for(var t=new o,e=5;e--;)t[u](e,e);return!t.has(-0)}));g||((l=e((function(e,r){ar(e,l,t);var i=function(t,e,r){var n,i;return we&&"function"==typeof(n=e.constructor)&&n!==r&&x(i=n.prototype)&&i!==r.prototype&&we(t,i),t}(new o,e,l);return null!=r&&sr(r,i[u],i,n),i}))).prototype=s,s.constructor=l),(v||y)&&(h("delete"),h("has"),n&&h("get")),(y||p)&&h(u),i&&s.clear&&delete s.clear}return f[t]=l,At({global:!0,forced:l!=o},f),me(l,t),i||r.setStrong(l,t,n),l},dr=er.getWeakData,pr=K.set,vr=K.getterFor,gr=Pt.find,yr=Pt.findIndex,br=0,mr=function(t){return t.frozen||(t.frozen=new xr)},xr=function(){this.entries=[]},Er=function(t,e){return gr(t.entries,(function(t){return t[0]===e}))};xr.prototype={get:function(t){var e=Er(this,t);if(e)return e[1]},has:function(t){return!!Er(this,t)},set:function(t,e){var r=Er(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=yr(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}};var wr={getConstructor:function(t,e,r,n){var i=t((function(t,o){ar(t,i,e),pr(t,{type:e,id:br++,frozen:void 0}),null!=o&&sr(o,t[n],t,r)})),o=vr(e),s=function(t,e,r){var n=o(t),i=dr(j(e),!0);return!0===i?mr(n).set(e,r):i[n.id]=r,t};return Ze(i.prototype,{delete:function(t){var e=o(this);if(!x(t))return!1;var r=dr(t);return!0===r?mr(e).delete(t):r&&O(r,e.id)&&delete r[e.id]},has:function(t){var e=o(this);if(!x(t))return!1;var r=dr(t);return!0===r?mr(e).has(t):r&&O(r,e.id)}}),Ze(i.prototype,r?{get:function(t){var e=o(this);if(x(t)){var r=dr(t);return!0===r?mr(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),i}},Or=(e((function(t){var e,r=K.enforce,n=!a.ActiveXObject&&"ActiveXObject"in a,i=Object.isExtensible,o=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},s=t.exports=hr("WeakMap",o,wr,!0,!0);if(D&&n){e=wr.getConstructor(o,"WeakMap",!0),er.REQUIRED=!0;var c=s.prototype,l=c.delete,u=c.has,f=c.get,h=c.set;Ze(c,{delete:function(t){if(x(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),l.call(this,t)||n.frozen.delete(t)}return l.call(this,t)},has:function(t){if(x(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),u.call(this,t)||n.frozen.has(t)}return u.call(this,t)},get:function(t){if(x(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),u.call(this,t)?f.call(this,t):n.frozen.get(t)}return f.call(this,t)},set:function(t,n){if(x(t)&&!i(t)){var o=r(this);o.frozen||(o.frozen=new e),u.call(this,t)?h.call(this,t,n):o.frozen.set(t,n)}else h.call(this,t,n);return this}})}})),Wt("iterator")),_r=Wt("toStringTag"),Sr=je.values;for(var Ar in Bt){var Lr=a[Ar],kr=Lr&&Lr.prototype;if(kr){if(kr[Or]!==Sr)try{z(kr,Or,Sr)}catch(t){kr[Or]=Sr}if(kr[_r]||z(kr,_r,Ar),Bt[Ar])for(var Mr in je)if(kr[Mr]!==je[Mr])try{z(kr,Mr,je[Mr])}catch(t){kr[Mr]=je[Mr]}}}var jr="Expected a function",Tr=NaN,Rr="[object Symbol]",zr=/^\s+|\s+$/g,Wr=/^[-+]0x[0-9a-f]+$/i,Cr=/^0b[01]+$/i,Nr=/^0o[0-7]+$/i,Ir=parseInt,Dr="object"==typeof t&&t&&t.Object===Object&&t,Pr="object"==typeof self&&self&&self.Object===Object&&self,Vr=Dr||Pr||Function("return this")(),Fr=Object.prototype.toString,Hr=Math.max,Br=Math.min,qr=function(){return Vr.Date.now()};function $r(t,e,r){var n,i,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(jr);function d(e){var r=n,o=i;return n=i=void 0,l=e,s=t.apply(o,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=qr();if(p(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?Br(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&n?d(t):(n=i=void 0,s)}function y(){var t=qr(),r=p(t);if(n=arguments,i=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?d(t):s}(c);if(f)return a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=Xr(e)||0,Gr(r)&&(u=!!r.leading,o=(f="maxWait"in r)?Hr(Xr(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=i=a=void 0},y.flush=function(){return void 0===a?s:g(qr())},y}function Gr(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Xr(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&Fr.call(t)==Rr}(t))return Tr;if(Gr(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Gr(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(zr,"");var r=Cr.test(t);return r||Nr.test(t)?Ir(t.slice(2),r?2:8):Wr.test(t)?Tr:+t}var Yr=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new TypeError(jr);return Gr(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),$r(t,e,{leading:n,maxWait:e,trailing:i})},Ur="Expected a function",Qr=NaN,Kr="[object Symbol]",Jr=/^\s+|\s+$/g,Zr=/^[-+]0x[0-9a-f]+$/i,tn=/^0b[01]+$/i,en=/^0o[0-7]+$/i,rn=parseInt,nn="object"==typeof t&&t&&t.Object===Object&&t,on="object"==typeof self&&self&&self.Object===Object&&self,sn=nn||on||Function("return this")(),an=Object.prototype.toString,cn=Math.max,ln=Math.min,un=function(){return sn.Date.now()};function fn(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function hn(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&an.call(t)==Kr}(t))return Qr;if(fn(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=fn(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Jr,"");var r=tn.test(t);return r||en.test(t)?rn(t.slice(2),r?2:8):Zr.test(t)?Qr:+t}var dn=function(t,e,r){var n,i,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Ur);function d(e){var r=n,o=i;return n=i=void 0,l=e,s=t.apply(o,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=un();if(p(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?ln(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&n?d(t):(n=i=void 0,s)}function y(){var t=un(),r=p(t);if(n=arguments,i=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?d(t):s}(c);if(f)return a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=hn(e)||0,fn(r)&&(u=!!r.leading,o=(f="maxWait"in r)?cn(hn(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=i=a=void 0},y.flush=function(){return void 0===a?s:g(un())},y},pn="Expected a function",vn="__lodash_hash_undefined__",gn="[object Function]",yn="[object GeneratorFunction]",bn=/^\[object .+?Constructor\]$/,mn="object"==typeof t&&t&&t.Object===Object&&t,xn="object"==typeof self&&self&&self.Object===Object&&self,En=mn||xn||Function("return this")();var wn=Array.prototype,On=Function.prototype,_n=Object.prototype,Sn=En["__core-js_shared__"],An=function(){var t=/[^.]+$/.exec(Sn&&Sn.keys&&Sn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ln=On.toString,kn=_n.hasOwnProperty,Mn=_n.toString,jn=RegExp("^"+Ln.call(kn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tn=wn.splice,Rn=Vn(En,"Map"),zn=Vn(Object,"create");function Wn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Cn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Nn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function In(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function Dn(t){return!(!Hn(t)||(e=t,An&&An in e))&&(function(t){var e=Hn(t)?Mn.call(t):"";return e==gn||e==yn}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?jn:bn).test(function(t){if(null!=t){try{return Ln.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Pn(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function Vn(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Dn(r)?r:void 0}function Fn(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(pn);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(Fn.Cache||Nn),r}function Hn(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}Wn.prototype.clear=function(){this.__data__=zn?zn(null):{}},Wn.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Wn.prototype.get=function(t){var e=this.__data__;if(zn){var r=e[t];return r===vn?void 0:r}return kn.call(e,t)?e[t]:void 0},Wn.prototype.has=function(t){var e=this.__data__;return zn?void 0!==e[t]:kn.call(e,t)},Wn.prototype.set=function(t,e){return this.__data__[t]=zn&&void 0===e?vn:e,this},Cn.prototype.clear=function(){this.__data__=[]},Cn.prototype.delete=function(t){var e=this.__data__,r=In(e,t);return!(r<0)&&(r==e.length-1?e.pop():Tn.call(e,r,1),!0)},Cn.prototype.get=function(t){var e=this.__data__,r=In(e,t);return r<0?void 0:e[r][1]},Cn.prototype.has=function(t){return In(this.__data__,t)>-1},Cn.prototype.set=function(t,e){var r=this.__data__,n=In(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Nn.prototype.clear=function(){this.__data__={hash:new Wn,map:new(Rn||Cn),string:new Wn}},Nn.prototype.delete=function(t){return Pn(this,t).delete(t)},Nn.prototype.get=function(t){return Pn(this,t).get(t)},Nn.prototype.has=function(t){return Pn(this,t).has(t)},Nn.prototype.set=function(t,e){return Pn(this,t).set(t,e),this},Fn.Cache=Nn;var Bn=Fn,qn=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var r=-1;return t.some((function(t,n){return t[0]===e&&(r=n,!0)})),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var r=t(this.__entries__,e),n=this.__entries__[r];return n&&n[1]},e.prototype.set=function(e,r){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=r:this.__entries__.push([e,r])},e.prototype.delete=function(e){var r=this.__entries__,n=t(r,e);~n&&r.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var r=0,n=this.__entries__;r<n.length;r++){var i=n[r];t.call(e,i[1],i[0])}},e}()}(),$n="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Gn="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Xn="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Gn):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Yn=2;var Un=20,Qn=["top","right","bottom","left","width","height","size","weight"],Kn="undefined"!=typeof MutationObserver,Jn=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var r=!1,n=!1,i=0;function o(){r&&(r=!1,t()),n&&a()}function s(){Xn(o)}function a(){var t=Date.now();if(r){if(t-i<Yn)return;n=!0}else r=!0,n=!1,setTimeout(s,e);i=t}return a}(this.refresh.bind(this),Un)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,r=e.indexOf(t);~r&&e.splice(r,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){$n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Kn?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){$n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,r=void 0===e?"":e;Qn.some((function(t){return!!~r.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Zn=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},ti=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Gn},ei=ai(0,0,0,0);function ri(t){return parseFloat(t)||0}function ni(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce((function(e,r){return e+ri(t["border-"+r+"-width"])}),0)}function ii(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return ei;var n=ti(t).getComputedStyle(t),i=function(t){for(var e={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var i=n[r],o=t["padding-"+i];e[i]=ri(o)}return e}(n),o=i.left+i.right,s=i.top+i.bottom,a=ri(n.width),c=ri(n.height);if("border-box"===n.boxSizing&&(Math.round(a+o)!==e&&(a-=ni(n,"left","right")+o),Math.round(c+s)!==r&&(c-=ni(n,"top","bottom")+s)),!function(t){return t===ti(t).document.documentElement}(t)){var l=Math.round(a+o)-e,u=Math.round(c+s)-r;1!==Math.abs(l)&&(a-=l),1!==Math.abs(u)&&(c-=u)}return ai(i.left,i.top,a,c)}var oi="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof ti(t).SVGGraphicsElement}:function(t){return t instanceof ti(t).SVGElement&&"function"==typeof t.getBBox};function si(t){return $n?oi(t)?function(t){var e=t.getBBox();return ai(0,0,e.width,e.height)}(t):ii(t):ei}function ai(t,e,r,n){return{x:t,y:e,width:r,height:n}}var ci=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ai(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=si(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),li=function(t,e){var r,n,i,o,s,a,c,l=(n=(r=e).x,i=r.y,o=r.width,s=r.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),Zn(c,{x:n,y:i,width:o,height:s,top:i,right:n+o,bottom:s+i,left:n}),c);Zn(this,{target:t,contentRect:l})},ui=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new qn,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof ti(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new ci(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof ti(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new li(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),fi="undefined"!=typeof WeakMap?new WeakMap:new qn,hi=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Jn.getInstance(),n=new ui(e,r,this);fi.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){hi.prototype[t]=function(){var e;return(e=fi.get(this))[t].apply(e,arguments)}}));var di=void 0!==Gn.ResizeObserver?Gn.ResizeObserver:hi,pi=null,vi=null;function gi(){if(null===pi){if("undefined"==typeof document||/AppleWebKit/.test(navigator.userAgent)||"scrollbarWidth"in document.documentElement.style)return pi=0;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var r=e.getBoundingClientRect().right;t.removeChild(e),pi=r}return pi}window.addEventListener("resize",(function(){vi!==window.devicePixelRatio&&(vi=window.devicePixelRatio,pi=null)}));var yi=function(){function t(e,r){var n=this;this.onScroll=function(){n.scrollXTicking||(window.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(window.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0)},this.scrollX=function(){n.axis.x.isOverflowing&&(n.showScrollbar("x"),n.positionScrollbar("x")),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&(n.showScrollbar("y"),n.positionScrollbar("y")),n.scrollYTicking=!1},this.onMouseEnter=function(){n.showScrollbar("x"),n.showScrollbar("y")},this.onMouseMove=function(t){n.mouseX=t.clientX,n.mouseY=t.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this.onWindowResize=function(){n.scrollbarWidth=gi(),n.hideNativeScrollbar()},this.hideScrollbars=function(){n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.track.rect)||(n.axis.y.scrollbar.el.classList.remove(n.classNames.visible),n.axis.y.isVisible=!1),n.isWithinBounds(n.axis.x.track.rect)||(n.axis.x.scrollbar.el.classList.remove(n.classNames.visible),n.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,r;n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(r=n.isWithinBounds(n.axis.x.scrollbar.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(e=n.isWithinBounds(n.axis.y.scrollbar.rect)),(e||r)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&n.onDragStart(t,"y"),r&&n.onDragStart(t,"x")))},this.drag=function(e){var r=n.axis[n.draggedAxis].track,i=r.rect[n.axis[n.draggedAxis].sizeAttr],o=n.axis[n.draggedAxis].scrollbar,s=n.contentWrapperEl[n.axis[n.draggedAxis].scrollSizeAttr],a=parseInt(n.elStyles[n.axis[n.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var c=(("y"===n.draggedAxis?e.pageY:e.pageX)-r.rect[n.axis[n.draggedAxis].offsetAttr]-n.axis[n.draggedAxis].dragOffset)/(i-o.size)*(s-a);"x"===n.draggedAxis&&(c=n.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c-(i+o.size):c,c=n.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-c:c),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=c},this.onEndDrag=function(t){t.preventDefault(),t.stopPropagation(),n.el.classList.remove(n.classNames.dragging),document.removeEventListener("mousemove",n.drag,!0),document.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=window.setTimeout((function(){document.removeEventListener("click",n.preventClick,!0),document.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},r),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=Yr(this.recalculate.bind(this),64),this.onMouseMove=Yr(this.onMouseMove.bind(this),64),this.hideScrollbars=dn(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=dn(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=Bn(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var r=e.firstElementChild;document.body.appendChild(r);var n=r.firstElementChild;r.scrollLeft=0;var i=t.getOffset(r),o=t.getOffset(n);r.scrollLeft=999;var s=t.getOffset(n);return{isRtlScrollingInverted:i.left!==o.left&&o.left-s.left!=0,isRtlScrollbarInverted:i.left!==o.left}},t.getOffset=function(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),Xt&&(this.initDOM(),this.scrollbarWidth=gi(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.el.querySelector("."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{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"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(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)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),r=document.createElement("div");e.classList.add(this.classNames.track),r.classList.add(this.classNames.scrollbar),e.appendChild(r),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var t=this;this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.onWindowResize);var e=0;this.resizeObserver=new di((function(){1!==++e&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),this.mutationObserver=new MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){this.elStyles=window.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,e=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,n=this.contentWrapperEl.offsetWidth,i=this.elStyles.overflowX,o=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,a=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=e?r+"px":"auto",this.placeholderEl.style.height=s+"px";var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=a>r,this.axis.y.isOverflowing=s>c,this.axis.x.isOverflowing="hidden"!==i&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==o&&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 l=this.axis.x.isOverflowing?this.scrollbarWidth:0,u=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&a>n-u,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>c-l,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,r=this.contentEl[this.axis[t].scrollSizeAttr],n=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=n/r;return e=Math.max(~~(i*n),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var r=this.contentWrapperEl[this.axis[e].scrollSizeAttr],n=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[e].sizeAttr],10),o=this.axis[e].scrollbar,s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=(s="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-s:s)/(r-i),c=~~((n-o.size)*a);c="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c+(n-o.size):c,o.el.style.transform="x"===e?"translate3d("+c+"px, 0, 0)":"translate3d(0, "+c+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,r=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var r=this.axis[e].scrollbar,n="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=n-r.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),document.addEventListener("mousemove",this.drag,!0),document.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(document.addEventListener("click",this.preventClick,!0),document.addEventListener("dblclick",this.preventClick,!0)):(window.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.removeListeners=function(){var t=this;this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onWindowResize),this.mutationObserver.disconnect(),this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return r.call(t,e)}))[0]},t}();yi.defaultOptions={autoHide:!0,forceVisible:!1,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"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},yi.instances=new WeakMap;var bi=function(t){return function(e,r,n,i){Lt(r);var o=Mt(e),s=y(o),a=st(o.length),c=t?a-1:0,l=t?-1:1;if(n<2)for(;;){if(c in s){i=s[c],c+=l;break}if(c+=l,t?c<0:a<=c)throw TypeError("Reduce of empty array with no initial value")}for(;t?c>=0:a>c;c+=l)c in s&&(i=r(i,s[c],c,o));return i}},mi={left:bi(!1),right:bi(!0)}.left;At({target:"Array",proto:!0,forced:Vt("reduce")},{reduce:function(t){return mi(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var xi=R.f,Ei=Function.prototype,wi=Ei.toString,Oi=/^\s*function ([^ (]*)/;!l||"name"in Ei||xi(Ei,"name",{configurable:!0,get:function(){try{return wi.call(this).match(Oi)[1]}catch(t){return""}}});var _i,Si,Ai=function(){var t=j(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Li=RegExp.prototype.exec,ki=String.prototype.replace,Mi=Li,ji=(_i=/a/,Si=/b*/g,Li.call(_i,"a"),Li.call(Si,"a"),0!==_i.lastIndex||0!==Si.lastIndex),Ti=void 0!==/()??/.exec("")[1];(ji||Ti)&&(Mi=function(t){var e,r,n,i,o=this;return Ti&&(r=new RegExp("^"+o.source+"$(?!\\s)",Ai.call(o))),ji&&(e=o.lastIndex),n=Li.call(o,t),ji&&n&&(o.lastIndex=o.global?n.index+n[0].length:e),Ti&&n&&n.length>1&&ki.call(n[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(n[i]=void 0)})),n});var Ri=Mi;At({target:"RegExp",proto:!0,forced:/./.exec!==Ri},{exec:Ri});var zi=Wt("species"),Wi=!c((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Ci=!c((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),Ni=function(t,e,r,n){var i=Wt(t),o=!c((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),s=o&&!c((function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===t&&(r.constructor={},r.constructor[zi]=function(){return r}),r[i](""),!e}));if(!o||!s||"replace"===t&&!Wi||"split"===t&&!Ci){var a=/./[i],l=r(i,""[t],(function(t,e,r,n,i){return e.exec===Ri?o&&!i?{done:!0,value:a.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}})),u=l[0],f=l[1];J(String.prototype,t,u),J(RegExp.prototype,i,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}),n&&z(RegExp.prototype[i],"sham",!0)}},Ii=Ue.charAt,Di=function(t,e,r){return e+(r?Ii(t,e).length:1)},Pi=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==v(t))throw TypeError("RegExp#exec called on incompatible receiver");return Ri.call(t,e)};Ni("match",1,(function(t,e,r){return[function(e){var r=b(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var i=j(t),o=String(this);if(!i.global)return Pi(i,o);var s=i.unicode;i.lastIndex=0;for(var a,c=[],l=0;null!==(a=Pi(i,o));){var u=String(a[0]);c[l]=u,""===u&&(i.lastIndex=Di(o,st(i.lastIndex),s)),l++}return 0===l?null:c}]}));var Vi=Math.max,Fi=Math.min,Hi=Math.floor,Bi=/\$([$&'`]|\d\d?|<[^>]*>)/g,qi=/\$([$&'`]|\d\d?)/g;Ni("replace",2,(function(t,e,r){return[function(r,n){var i=b(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i,n):e.call(String(i),r,n)},function(t,i){var o=r(e,t,this,i);if(o.done)return o.value;var s=j(t),a=String(this),c="function"==typeof i;c||(i=String(i));var l=s.global;if(l){var u=s.unicode;s.lastIndex=0}for(var f=[];;){var h=Pi(s,a);if(null===h)break;if(f.push(h),!l)break;""===String(h[0])&&(s.lastIndex=Di(a,st(s.lastIndex),u))}for(var d,p="",v=0,g=0;g<f.length;g++){h=f[g];for(var y=String(h[0]),b=Vi(Fi(it(h.index),a.length),0),m=[],x=1;x<h.length;x++)m.push(void 0===(d=h[x])?d:String(d));var E=h.groups;if(c){var w=[y].concat(m,b,a);void 0!==E&&w.push(E);var O=String(i.apply(void 0,w))}else O=n(y,a,b,m,E,i);b>=v&&(p+=a.slice(v,b)+O,v=b+y.length)}return p+a.slice(v)}];function n(t,r,n,i,o,s){var a=n+t.length,c=i.length,l=qi;return void 0!==o&&(o=Mt(o),l=Bi),e.call(s,l,(function(e,s){var l;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(a);case"<":l=o[s.slice(1,-1)];break;default:var u=+s;if(0===u)return e;if(u>c){var f=Hi(u/10);return 0===f?e:f<=c?void 0===i[f-1]?s.charAt(1):i[f-1]+s.charAt(1):e}l=i[u-1]}return void 0===l?"":l}))}}));var $i=function(t){return Array.prototype.reduce.call(t,(function(t,e){var r=e.name.match(/data-simplebar-(.+)/);if(r){var n=r[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[n]=!0;break;case"false":t[n]=!1;break;case void 0:t[n]=!0;break;default:t[n]=e.value}}return t}),{})};return yi.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll('[data-simplebar]:not([data-simplebar="init"])'),(function(t){yi.instances.has(t)||new yi(t,$i(t.attributes))}))},yi.removeObserver=function(){this.globalObserver.disconnect()},yi.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver((function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!yi.instances.has(t)&&new yi(t,$i(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar]:not([data-simplebar="init"])'),(function(t){!yi.instances.has(t)&&new yi(t,$i(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&(t.hasAttribute('[data-simplebar]:not([data-simplebar="init"])')?yi.instances.has(t)&&yi.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar]:not([data-simplebar="init"])'),(function(t){yi.instances.has(t)&&yi.instances.get(t).unMount()})))}))}))})),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},yi.getOptions=$i,Xt&&yi.initHtmlApi(),yi}));
{
"version": "4.3.0-alpha.0",
"version": "4.3.0-alpha.1",
"name": "simplebar",

@@ -29,4 +29,5 @@ "title": "SimpleBar.js",

"test:unit": "jest -c jest-unit.config.js",
"test:e2e": "yarn start --port 8091 & intern",
"version": "yarn build"
"test:e2e": "env-cmd intern",
"version": "yarn build",
"precommit": "lint-staged"
},

@@ -50,3 +51,9 @@ "dependencies": {

},
"gitHead": "ff2e4ddab7e2b26dea09de9938f7c9f9e244a5e3"
"lint-staged": {
"*.{js,jsx,json}": [
"prettier-eslint --write",
"git add"
]
},
"gitHead": "19d281e901bd911dbdd6d5d52122e757fe6b7866"
}

@@ -1,22 +0,37 @@

export default function scrollbarWidth() {
if (typeof document === 'undefined') {
return 0;
let cachedScrollbarWidth = null;
let cachedDevicePixelRatio = null;
window.addEventListener('resize', () => {
if (cachedDevicePixelRatio !== window.devicePixelRatio) {
cachedDevicePixelRatio = window.devicePixelRatio;
cachedScrollbarWidth = null;
}
});
const body = document.body;
const box = document.createElement('div');
const boxStyle = box.style;
export default function scrollbarWidth() {
if (cachedScrollbarWidth === null) {
if (
typeof document === 'undefined' ||
/AppleWebKit/.test(navigator.userAgent) ||
'scrollbarWidth' in document.documentElement.style
) {
cachedScrollbarWidth = 0;
return cachedScrollbarWidth;
}
boxStyle.position = 'fixed';
boxStyle.left = 0;
boxStyle.visibility = 'hidden';
boxStyle.overflowY = 'scroll';
const body = document.body;
const box = document.createElement('div');
body.appendChild(box);
box.classList.add('simplebar-hide-scrollbar');
const width = box.getBoundingClientRect().right;
body.appendChild(box);
body.removeChild(box);
const width = box.getBoundingClientRect().right;
return width;
body.removeChild(box);
cachedScrollbarWidth = width;
}
return cachedScrollbarWidth;
}

@@ -11,11 +11,2 @@ import throttle from 'lodash.throttle';

this.el = element;
this.flashTimeout;
this.contentEl;
this.contentWrapperEl;
this.offsetEl;
this.maskEl;
this.globalObserver;
this.mutationObserver;
this.resizeObserver;
this.scrollbarWidth;
this.minScrollbarWidth = 20;

@@ -27,3 +18,2 @@ this.options = { ...SimpleBar.defaultOptions, ...options };

};
this.isRtl;
this.axis = {

@@ -34,2 +24,3 @@ x: {

scrollSizeAttr: 'scrollWidth',
offsetSizeAttr: 'offsetWidth',
offsetAttr: 'left',

@@ -48,2 +39,3 @@ overflowAttr: 'overflowX',

scrollSizeAttr: 'scrollHeight',
offsetSizeAttr: 'offsetHeight',
offsetAttr: 'top',

@@ -144,114 +136,2 @@ overflowAttr: 'overflowY',

static initHtmlApi() {
this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this);
// MutationObserver is IE11+
if (typeof MutationObserver !== 'undefined') {
// Mutation observer to observe dynamically added elements
this.globalObserver = new MutationObserver(mutations => {
mutations.forEach(mutation => {
Array.prototype.forEach.call(mutation.addedNodes, addedNode => {
if (addedNode.nodeType === 1) {
if (addedNode.hasAttribute('data-simplebar')) {
!SimpleBar.instances.has(addedNode) &&
new SimpleBar(addedNode, SimpleBar.getElOptions(addedNode));
} else {
Array.prototype.forEach.call(
addedNode.querySelectorAll('[data-simplebar]'),
el => {
!SimpleBar.instances.has(el) &&
new SimpleBar(el, SimpleBar.getElOptions(el));
}
);
}
}
});
Array.prototype.forEach.call(mutation.removedNodes, removedNode => {
if (removedNode.nodeType === 1) {
if (removedNode.hasAttribute('data-simplebar')) {
SimpleBar.instances.has(removedNode) &&
SimpleBar.instances.get(removedNode).unMount();
} else {
Array.prototype.forEach.call(
removedNode.querySelectorAll('[data-simplebar]'),
el => {
SimpleBar.instances.has(el) &&
SimpleBar.instances.get(el).unMount();
}
);
}
}
});
});
});
this.globalObserver.observe(document, { childList: true, subtree: true });
}
// Taken from jQuery `ready` function
// Instantiate elements already present on the page
if (
document.readyState === 'complete' ||
(document.readyState !== 'loading' && !document.documentElement.doScroll)
) {
// Handle it asynchronously to allow scripts the opportunity to delay init
window.setTimeout(this.initDOMLoadedElements);
} else {
document.addEventListener('DOMContentLoaded', this.initDOMLoadedElements);
window.addEventListener('load', this.initDOMLoadedElements);
}
}
// Helper function to retrieve options from element attributes
static getElOptions(el) {
const options = Array.prototype.reduce.call(
el.attributes,
(acc, attribute) => {
const option = attribute.name.match(/data-simplebar-(.+)/);
if (option) {
const key = option[1].replace(/\W+(.)/g, (x, chr) =>
chr.toUpperCase()
);
switch (attribute.value) {
case 'true':
acc[key] = true;
break;
case 'false':
acc[key] = false;
break;
case undefined:
acc[key] = true;
break;
default:
acc[key] = attribute.value;
}
}
return acc;
},
{}
);
return options;
}
static removeObserver() {
this.globalObserver.disconnect();
}
static initDOMLoadedElements() {
document.removeEventListener(
'DOMContentLoaded',
this.initDOMLoadedElements
);
window.removeEventListener('load', this.initDOMLoadedElements);
Array.prototype.forEach.call(
document.querySelectorAll('[data-simplebar]'),
el => {
if (!SimpleBar.instances.has(el))
new SimpleBar(el, SimpleBar.getElOptions(el));
}
);
}
static getOffset(el) {

@@ -301,2 +181,3 @@ const rect = el.getBoundingClientRect();

this.el.querySelector(`.${this.classNames.contentEl}`);
this.offsetEl = this.el.querySelector(`.${this.classNames.offset}`);

@@ -314,6 +195,8 @@ this.maskEl = this.el.querySelector(`.${this.classNames.mask}`);

);
this.axis.x.track.el = this.el.querySelector(
this.axis.x.track.el = this.findChild(
this.el,
`.${this.classNames.track}.${this.classNames.horizontal}`
);
this.axis.y.track.el = this.el.querySelector(
this.axis.y.track.el = this.findChild(
this.el,
`.${this.classNames.track}.${this.classNames.vertical}`

@@ -418,22 +301,44 @@ );

this.resizeObserver = new ResizeObserver(this.recalculate);
// Hack for https://github.com/WICG/ResizeObserver/issues/38
let ignoredCallbacks = 0;
this.resizeObserver = new ResizeObserver(() => {
ignoredCallbacks++;
if (ignoredCallbacks === 1) return;
this.recalculate();
});
this.resizeObserver.observe(this.el);
this.resizeObserver.observe(this.contentEl);
// This is required to detect horizontal scroll. Vertical scroll only needs the resizeObserver.
this.mutationObserver = new MutationObserver(this.recalculate);
this.mutationObserver.observe(this.contentEl, {
childList: true,
subtree: true,
characterData: true
});
}
recalculate() {
this.elStyles = window.getComputedStyle(this.el);
this.isRtl = this.elStyles.direction === 'rtl';
const isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
const isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1;
this.elStyles = window.getComputedStyle(this.el);
this.isRtl = this.elStyles.direction === 'rtl';
const contentElOffsetWidth = this.contentEl.offsetWidth;
this.contentEl.style.padding = `${this.elStyles.paddingTop} ${
this.elStyles.paddingRight
} ${this.elStyles.paddingBottom} ${this.elStyles.paddingLeft}`;
const contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;
this.wrapperEl.style.margin = `-${this.elStyles.paddingTop} -${
this.elStyles.paddingRight
} -${this.elStyles.paddingBottom} -${this.elStyles.paddingLeft}`;
const elOverflowX = this.elStyles.overflowX;
const elOverflowY = this.elStyles.overflowY;
this.contentEl.style.padding = `${this.elStyles.paddingTop} ${this.elStyles.paddingRight} ${this.elStyles.paddingBottom} ${this.elStyles.paddingLeft}`;
this.wrapperEl.style.margin = `-${this.elStyles.paddingTop} -${this.elStyles.paddingRight} -${this.elStyles.paddingBottom} -${this.elStyles.paddingLeft}`;
const contentElScrollHeight = this.contentEl.scrollHeight;
const contentElScrollWidth = this.contentEl.scrollWidth;
this.contentWrapperEl.style.height = isHeightAuto ? 'auto' : '100%';

@@ -443,17 +348,17 @@

this.placeholderEl.style.width = isWidthAuto
? `${this.contentEl.offsetWidth}px`
? `${contentElOffsetWidth}px`
: 'auto';
this.placeholderEl.style.height = `${this.contentEl.scrollHeight}px`;
this.placeholderEl.style.height = `${contentElScrollHeight}px`;
// Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
this.axis.x.isOverflowing =
this.contentWrapperEl.scrollWidth > this.contentWrapperEl.offsetWidth;
const contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;
this.axis.x.isOverflowing = contentElScrollWidth > contentElOffsetWidth;
this.axis.y.isOverflowing =
this.contentWrapperEl.scrollHeight > this.contentWrapperEl.offsetHeight;
contentElScrollHeight > contentWrapperElOffsetHeight;
// Set isOverflowing to false if user explicitely set hidden overflow
this.axis.x.isOverflowing =
this.elStyles.overflowX === 'hidden' ? false : this.axis.x.isOverflowing;
elOverflowX === 'hidden' ? false : this.axis.x.isOverflowing;
this.axis.y.isOverflowing =
this.elStyles.overflowY === 'hidden' ? false : this.axis.y.isOverflowing;
elOverflowY === 'hidden' ? false : this.axis.y.isOverflowing;

@@ -467,5 +372,18 @@ this.axis.x.forceVisible =

this.axis.x.track.rect = this.axis.x.track.el.getBoundingClientRect();
this.axis.y.track.rect = this.axis.y.track.el.getBoundingClientRect();
// Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
let offsetForXScrollbar = this.axis.x.isOverflowing
? this.scrollbarWidth
: 0;
let offsetForYScrollbar = this.axis.y.isOverflowing
? this.scrollbarWidth
: 0;
this.axis.x.isOverflowing =
this.axis.x.isOverflowing &&
contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;
this.axis.y.isOverflowing =
this.axis.y.isOverflowing &&
contentElScrollHeight >
contentWrapperElOffsetHeight - offsetForXScrollbar;
this.axis.x.scrollbar.size = this.getScrollbarSize('x');

@@ -488,13 +406,10 @@ this.axis.y.scrollbar.size = this.getScrollbarSize('y');

getScrollbarSize(axis = 'y') {
const contentSize = this.scrollbarWidth
? this.contentWrapperEl[this.axis[axis].scrollSizeAttr]
: this.contentWrapperEl[this.axis[axis].scrollSizeAttr] -
this.minScrollbarWidth;
const trackSize = this.axis[axis].track.rect[this.axis[axis].sizeAttr];
let scrollbarSize;
if (!this.axis[axis].isOverflowing) {
return;
return 0;
}
const contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];
const trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
let scrollbarSize;
let scrollbarRatio = trackSize / contentSize;

@@ -516,4 +431,8 @@

positionScrollbar(axis = 'y') {
if (!this.axis[axis].isOverflowing) {
return;
}
const contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
const trackSize = this.axis[axis].track.rect[this.axis[axis].sizeAttr];
const trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
const hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);

@@ -568,21 +487,8 @@ const scrollbar = this.axis[axis].scrollbar;

this.axis.y.isOverflowing || this.axis.y.forceVisible
? `-${this.scrollbarWidth || this.minScrollbarWidth}px`
? `-${this.scrollbarWidth}px`
: 0;
this.offsetEl.style.bottom =
this.axis.x.isOverflowing || this.axis.x.forceVisible
? `-${this.scrollbarWidth || this.minScrollbarWidth}px`
? `-${this.scrollbarWidth}px`
: 0;
// If floating scrollbar
if (!this.scrollbarWidth) {
const paddingDirection = [this.isRtl ? 'paddingLeft' : 'paddingRight'];
this.contentWrapperEl.style[paddingDirection] =
this.axis.y.isOverflowing || this.axis.y.forceVisible
? `${this.minScrollbarWidth}px`
: 0;
this.contentWrapperEl.style.paddingBottom =
this.axis.x.isOverflowing || this.axis.x.forceVisible
? `${this.minScrollbarWidth}px`
: 0;
}
}

@@ -765,3 +671,3 @@

onDragStart(e, axis = 'y') {
const scrollbar = this.axis[axis].scrollbar.el;
const scrollbar = this.axis[axis].scrollbar;

@@ -771,4 +677,3 @@ // Measure how far the user's mouse is from the top of the scrollbar drag handle.

this.axis[axis].dragOffset =
eventOffset -
scrollbar.getBoundingClientRect()[this.axis[axis].offsetAttr];
eventOffset - scrollbar.rect[this.axis[axis].offsetAttr];
this.draggedAxis = axis;

@@ -797,2 +702,9 @@

const scrollbar = this.axis[this.draggedAxis].scrollbar;
const contentSize = this.contentWrapperEl[
this.axis[this.draggedAxis].scrollSizeAttr
];
const hostSize = parseInt(
this.elStyles[this.axis[this.draggedAxis].sizeAttr],
10
);

@@ -814,8 +726,6 @@ e.preventDefault();

// Convert the mouse position into a percentage of the scrollbar height/width.
let dragPerc = dragPos / track.rect[this.axis[this.draggedAxis].sizeAttr];
let dragPerc = dragPos / (trackSize - scrollbar.size);
// Scroll the content by the same percentage.
let scrollPos =
dragPerc *
this.contentWrapperEl[this.axis[this.draggedAxis].scrollSizeAttr];
let scrollPos = dragPerc * (contentSize - hostSize);

@@ -904,3 +814,3 @@ // Fix browsers inconsistency on RTL

this.mutationObserver && this.mutationObserver.disconnect();
this.mutationObserver.disconnect();
this.resizeObserver.disconnect();

@@ -924,12 +834,2 @@

/**
* Recursively walks up the parent nodes looking for this.el
*/
isChildNode(el) {
if (el === null) return false;
if (el === this.el) return true;
return this.isChildNode(el.parentNode);
}
/**
* Check if mouse is within bounds

@@ -945,10 +845,16 @@ */

}
}
/**
* HTML API
* Called only in a browser env.
*/
if (canUseDOM) {
SimpleBar.initHtmlApi();
/**
* Find element children matches query
*/
findChild(el, query) {
const matches =
el.matches ||
el.webkitMatchesSelector ||
el.mozMatchesSelector ||
el.msMatchesSelector;
return Array.prototype.filter.call(el.children, child =>
matches.call(child, query)
)[0];
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc