var getActiveElement = __webpack_require__("z222");
// CONCATENATED MODULE: ./node_modules/reakit/node_modules/reakit-utils/es/tabbable.js
var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), " + "textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], " + "iframe, object, embed, area[href], audio[controls], video[controls], " + "[contenteditable]:not([contenteditable='false'])";
function isVisible(element) {
var htmlElement = element;
return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0;
function hasNegativeTabIndex(element) {
var tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10);
* Checks whether `element` is focusable or not.
* import { isFocusable } from "reakit-utils";
* isFocusable(document.querySelector("input")); // true
* isFocusable(document.querySelector("input[tabindex='-1']")); // true
* isFocusable(document.querySelector("input[hidden]")); // false
* isFocusable(document.querySelector("input:disabled")); // false
function isFocusable(element) {
return matches(element, selector) && isVisible(element);
* Checks whether `element` is tabbable or not.
* import { isTabbable } from "reakit-utils";
* isTabbable(document.querySelector("input")); // true
* isTabbable(document.querySelector("input[tabindex='-1']")); // false
* isTabbable(document.querySelector("input[hidden]")); // false
* isTabbable(document.querySelector("input:disabled")); // false
function isTabbable(element) {
return isFocusable(element) && !hasNegativeTabIndex(element);
* Returns all the focusable elements in `container`.
* @param {Element} container
function getAllFocusableIn(container) {
var allFocusable = Array.from(container.querySelectorAll(selector));
allFocusable.unshift(container);
return allFocusable.filter(isFocusable);
* Returns the first focusable element in `container`.
* @param {Element} container
* @returns {Element|null}
function getFirstFocusableIn(container) {
var _getAllFocusableIn = getAllFocusableIn(container),
first = _getAllFocusableIn[0];
* Returns all the tabbable elements in `container`, including the container
* @param {Element} container
* @param fallbackToFocusable If `true`, it'll return focusable elements if there are no tabbable ones.
function getAllTabbableIn(container, fallbackToFocusable) {
var allFocusable = Array.from(container.querySelectorAll(selector));
var allTabbable = allFocusable.filter(isTabbable);
if (isTabbable(container)) {
allTabbable.unshift(container);
if (!allTabbable.length && fallbackToFocusable) {
* Returns the first tabbable element in `container`, including the container
* itself if it's tabbable.
* @param {Element} container
* @param fallbackToFocusable If `true`, it'll return the first focusable element if there are no tabbable ones.
* @returns {Element|null}
function getFirstTabbableIn(container, fallbackToFocusable) {
var _getAllTabbableIn = getAllTabbableIn(container, fallbackToFocusable),
first = _getAllTabbableIn[0];
* Returns the last tabbable element in `container`, including the container
* itself if it's tabbable.
* @param {Element} container
* @param fallbackToFocusable If `true`, it'll return the last focusable element if there are no tabbable ones.
* @returns {Element|null}
function getLastTabbableIn(container, fallbackToFocusable) {
var allTabbable = getAllTabbableIn(container, fallbackToFocusable);
return allTabbable[allTabbable.length - 1] || null;
* Returns the next tabbable element in `container`.
* @param {Element} container
* @param fallbackToFocusable If `true`, it'll return the next focusable element if there are no tabbable ones.
* @returns {Element|null}
function getNextTabbableIn(container, fallbackToFocusable) {
var activeElement = Object(getActiveElement["a" /* getActiveElement */])(container);
var allFocusable = getAllFocusableIn(container);
var index = allFocusable.indexOf(activeElement);
var slice = allFocusable.slice(index + 1);
return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);
* Returns the previous tabbable element in `container`.
* @param {Element} container
* @param fallbackToFocusable If `true`, it'll return the previous focusable element if there are no tabbable ones.
* @returns {Element|null}
function getPreviousTabbableIn(container, fallbackToFocusable) {
var activeElement = Object(getActiveElement["a" /* getActiveElement */])(container);
var allFocusable = getAllFocusableIn(container).reverse();
var index = allFocusable.indexOf(activeElement);
var slice = allFocusable.slice(index + 1);
return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);
* Returns the closest focusable element.
* @param {Element} container
* @returns {Element|null}
function getClosestFocusable(element) {
while (element && !isFocusable(element)) {
element = closest(element, selector);
/***/ (function(module, exports, __webpack_require__) {
var keys = __webpack_require__("1seS");
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
var toStr = Object.prototype.toString;
var concat = Array.prototype.concat;
var origDefineProperty = Object.defineProperty;
var isFunction = function (fn) {
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
var arePropertyDescriptorsSupported = function () {
origDefineProperty(obj, 'x', { enumerable: false, value: obj });
// eslint-disable-next-line no-unused-vars, no-restricted-syntax
for (var _ in obj) { // jscs:ignore disallowUnusedVariables
} catch (e) { /* this is IE 8. */
var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
var defineProperty = function (object, name, value, predicate) {
if (name in object && (!isFunction(predicate) || !predicate())) {
if (supportsDescriptors) {
origDefineProperty(object, name, {
var defineProperties = function (object, map) {
var predicates = arguments.length > 2 ? arguments[2] : {};
props = concat.call(props, Object.getOwnPropertySymbols(map));
for (var i = 0; i < props.length; i += 1) {
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
defineProperties.supportsDescriptors = !!supportsDescriptors;
module.exports = defineProperties;
/***/ (function(module, exports) {
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var sourceKeys = Object.keys(source);
for (i = 0; i < sourceKeys.length; i++) {
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
module.exports = _objectWithoutPropertiesLoose;
/***/ (function(module, exports, __webpack_require__) {
var define = __webpack_require__("82c2");
var getPolyfill = __webpack_require__("yLpt");
module.exports = function shimAssign() {
var polyfill = getPolyfill();
{ assign: function () { return Object.assign !== polyfill; } }
/***/ (function(module, exports) {
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
function defaultClearTimeout () {
throw new Error('clearTimeout has not been defined');
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
cachedSetTimeout = defaultSetTimout;
cachedSetTimeout = defaultSetTimout;
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
cachedClearTimeout = defaultClearTimeout;
cachedClearTimeout = defaultClearTimeout;
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
function cleanUpNextTick() {
if (!draining || !currentQueue) {
if (currentQueue.length) {
queue = currentQueue.concat(queue);
var timeout = runTimeout(cleanUpNextTick);
while (++queueIndex < len) {
currentQueue[queueIndex].run();
runClearTimeout(timeout);
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
// v8 likes predictible objects
function Item(fun, array) {
Item.prototype.run = function () {
this.fun.apply(null, this.array);
process.title = 'browser';
process.version = ''; // empty string to avoid regexp issues
process.addListener = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) { return [] }
process.binding = function (name) {
throw new Error('process.binding is not supported');
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');