diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 843f18d3e..000000000 --- a/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["@babel/preset-react", "@babel/preset-env"] -} \ No newline at end of file diff --git a/bin/externals.js b/bin/externals.js deleted file mode 100644 index e227939e5..000000000 --- a/bin/externals.js +++ /dev/null @@ -1,8 +0,0 @@ -import react from 'react' -import reactDom from 'react-dom' -import redux from 'redux' -import reactRedux from 'react-redux' -import reactRouter from 'react-router' -import reactRouterDom from 'react-router-dom' -import propTypes from 'prop-types' -import axios from 'axios' \ No newline at end of file diff --git a/bin/watch.js b/bin/watch.js new file mode 100644 index 000000000..b36361bde --- /dev/null +++ b/bin/watch.js @@ -0,0 +1,17 @@ +const runtime = require('@babel/plugin-transform-runtime') +const bundler = require('../src/backend/bundler/bundler') + +async function build() { + bundler({ + name: 'AdminBro', + input: __dirname + '/../src/frontend/bundle-entry.jsx', + file: __dirname + '/../src/frontend/assets/scripts/app-bundle.js', + babelConfig: { + plugins: [runtime], + runtimeHelpers: true, + include: __dirname + '/../src/frontend/**', + }, + }) +} + +build() diff --git a/package.json b/package.json index 937b85dfb..dc8e70e71 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,8 @@ "@babel/preset-react": "^7.0.0", "@babel/register": "^7.4.0", "axios": "^0.18.0", + "babel-plugin-react-css-modules": "^5.2.4", + "classnames": "^2.2.6", "flat": "^4.1.0", "jw-paginate": "^1.0.2", "lodash": "^4.17.11", @@ -55,6 +57,7 @@ "rollup-plugin-commonjs": "^9.2.2", "rollup-plugin-node-resolve": "^4.0.1", "rollup-plugin-replace": "^2.1.1", + "styled-components": "^4.2.0", "xss": "^1.0.3" }, "devDependencies": { diff --git a/src/backend/bundler/app-bundler.js b/src/backend/bundler/app-bundler.js index 785a4c398..9f018a720 100644 --- a/src/backend/bundler/app-bundler.js +++ b/src/backend/bundler/app-bundler.js @@ -1,7 +1,15 @@ const bundler = require('./bundler') const runtime = require('@babel/plugin-transform-runtime') +const fs = require('fs') +const util = require('util') + +const OUTPUT_FILE = __dirname + '/../../frontend/assets/scripts/app-bundle.js' async function build() { + const exists = await util.promisify(fs.exists)(OUTPUT_FILE) + if (exists) { + return util.promisify(fs.readFile)(OUTPUT_FILE) + } return bundler({ name: 'AdminBro', input: __dirname + '/../../frontend/bundle-entry.jsx', @@ -9,7 +17,7 @@ async function build() { plugins: [runtime], runtimeHelpers: true, include: __dirname + '/../../frontend/**', - } + }, }) } diff --git a/src/backend/bundler/bundler.js b/src/backend/bundler/bundler.js index 9b9986d69..f7e13fee8 100644 --- a/src/backend/bundler/bundler.js +++ b/src/backend/bundler/bundler.js @@ -1,13 +1,28 @@ const rollup = require('rollup') const { external, globals, plugins } = require('./config') -async function build({ name, input, babelConfig = {} }) { +async function build({ name, input, babelConfig = {}, file }) { const inputOptions = { input, plugins: plugins(babelConfig), external, } + if (file) { + const watcher = rollup.watch({ + ...inputOptions, + output: { + format: 'iife', name, globals, file, + }, + }) + watcher.on('event', (event) => { + console.log(event.code) + if (event.code === 'ERROR') { + console.log(event) + } + }) + return watcher + } const bundle = await rollup.rollup(inputOptions) const bundled = await bundle.generate({ diff --git a/src/backend/bundler/components-bundler.js b/src/backend/bundler/components-bundler.js index 7406a22e0..57711b975 100644 --- a/src/backend/bundler/components-bundler.js +++ b/src/backend/bundler/components-bundler.js @@ -1,17 +1,20 @@ -const bundler = require('./bundler') const fs = require('fs') const path = require('path') const util = require('util') +const bundler = require('./bundler') const tmpPath = '.adminbro' const entryPath = path.join(tmpPath, '.entry.js') async function build(admin) { const { Components } = admin.constructor - const entryFile = Object.keys(Components).map(c => { - return [`import ${c} from '${Components[c]}'`, - `AdminBro.Components.${c} = ${c}`].join('\n') - }).join('\n\n') + const entryFile = Object.keys(Components).map(c => ( + [ + `import ${c} from '${Components[c]}'`, + `AdminBro.Components.${c} = ${c}` + ].join('\n') + )).join('\n\n') + try { await util.promisify(fs.mkdir)(tmpPath, { recursive: true }) } catch (error) { diff --git a/src/backend/bundler/config.js b/src/backend/bundler/config.js index d2a0e5503..2089b89f7 100644 --- a/src/backend/bundler/config.js +++ b/src/backend/bundler/config.js @@ -11,14 +11,18 @@ module.exports = { 'react-redux', 'react-router', 'react-router-dom', + 'styled-components', 'prop-types', 'admin-bro', 'axios', + 'bloomer', ], globals: { react: 'React', redux: 'Redux', axios: 'axios', + bloomer: 'Bloomer', + 'styled-components': 'styled', 'react-dom': 'ReactDOM', 'prop-types': 'PropTypes', 'react-redux': 'ReactRedux', diff --git a/src/backend/decorators/property-decorator.js b/src/backend/decorators/property-decorator.js index d97436cf6..505033473 100644 --- a/src/backend/decorators/property-decorator.js +++ b/src/backend/decorators/property-decorator.js @@ -185,9 +185,9 @@ class PropertyDecorator { */ isId() { if (typeof this.options.isId === 'undefined') { - return this._property.isId() + return !!this._property.isId() } - return this.options.isId + return !!this.options.isId } /** diff --git a/src/frontend/assets/scripts/app-bundle.js b/src/frontend/assets/scripts/app-bundle.js new file mode 100644 index 000000000..43798cfb9 --- /dev/null +++ b/src/frontend/assets/scripts/app-bundle.js @@ -0,0 +1,19130 @@ +var AdminBro = (function (AdminBro$1, React, reactRedux, reactRouterDom, styled, PropTypes$1, axios, reactDom, redux) { + 'use strict'; + + AdminBro$1 = AdminBro$1 && AdminBro$1.hasOwnProperty('default') ? AdminBro$1['default'] : AdminBro$1; + var React__default = 'default' in React ? React['default'] : React; + styled = styled && styled.hasOwnProperty('default') ? styled['default'] : styled; + PropTypes$1 = PropTypes$1 && PropTypes$1.hasOwnProperty('default') ? PropTypes$1['default'] : PropTypes$1; + axios = axios && axios.hasOwnProperty('default') ? axios['default'] : axios; + var reactDom__default = 'default' in reactDom ? reactDom['default'] : reactDom; + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + } + + var defineProperty = _defineProperty; + + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + })); + } + + ownKeys.forEach(function (key) { + defineProperty(target, key, source[key]); + }); + } + + return target; + } + + var objectSpread = _objectSpread; + + function _taggedTemplateLiteral(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + return Object.freeze(Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw) + } + })); + } + + var taggedTemplateLiteral = _taggedTemplateLiteral; + + /** + * Collection of helper methods available in the views + */ + class ViewHelpers { + constructor({ options } = {} ) { + const opts = options || (window && window.REDUX_STATE.paths); + + // when ViewHelpers are used on the frontend, paths are taken from global Redux State + this.options = opts; + } + + /** + * To each related path adds rootPath passed by the user, as well as a query string + * @param {String[]} paths list of parts of the url + * @return {String} path + */ + urlBuilder(paths) { + const { rootPath } = this.options; + let url = `${rootPath}/${paths.join('/')}`; + return url + } + + /** + * Returns login URL + * @return {String} + */ + loginUrl() { + return this.options.loginPath + } + + /** + * Returns logout URL + * @return {String} + */ + logoutUrl() { + return this.options.logoutPath + } + + /** + * Returns URL for the dashboard + * @return {String} + */ + dashboardUrl() { + return this.options.rootPath + } + + /** + * Returns URL for the list view for a given resource + * @param {BaseResource} resource + * @param {Object} [query] + * @return {String} + */ + listUrl({ resourceId }) { + return this.urlBuilder(['resources', resourceId]) + } + + resourceActionUrl({ resourceId, actionName }) { + return this.urlBuilder(['resources', resourceId, 'actions', actionName]) + } + + recordActionUrl({ resourceId, recordId, actionName }) { + return this.urlBuilder(['resources', resourceId, 'records', recordId, actionName]) + } + + /** + * Returns absolute path to a given asset + * @param {String} asset + * @return {String} + */ + assetPath(asset) { + return this.urlBuilder(['frontend', 'assets', asset]) + } + } + + var viewHelpers = ViewHelpers; + + // sorted alphabetically + var colors = { + defaultText: '#111114', + lightText: '#a9aabc', + lightBck: '#F8F8FA', + love: '#e6282b', + primary: '#718af4', + 'alizarin-crimson': '#e6282b', + 'athens-gray-2': '#F8F8FA', + 'athens-gray-dark': '#eeeeef', + 'athens-gray-darker': '#F1F1F5', + 'athens-gray': '#f7f7Fa', + 'blue-bayoux': '#4e5779', + 'cornflower-blue': '#718af4', + 'froly': '#f0616f', + 'ghost': '#cbccd7', + 'mako': '#454655', + 'red': '#e6282zb;', + 'rhino': '#303b62', + 'silver-tree': '#5abe99', + 'spun-pearl': '#a9aabc', + 'storm-gray': '#757687', + 'sunglo': '#e06a72', + 'waikawa-gray': '#545B8C', + 'waterloo': '#7f8296', + 'white': '#ffffff', + 'wild-sand': '#f7f7f7', + 'woodsmoke': '#111114' + }; + var sizes = { + navbarHeight: '64px', + sidebarWidth: '300px', + sidebarMobileWidth: '98px', + paddingLayout: '30px', + padding: '15px', + paddingMin: '5px' + }; + var fonts = { + base: '14px', + min: '11px' + }; + + var pathsType = PropTypes$1.shape({ + loginPath: PropTypes$1.string.isRequired, + rootPath: PropTypes$1.string.isRequired, + logoutPath: PropTypes$1.string.isRequired + }); + var brandingType = PropTypes$1.shape({ + logo: PropTypes$1.string.isRequired, + companyName: PropTypes$1.string.isRequired, + softwareBrothers: PropTypes$1.bool.isRequired + }); + var propertyType = PropTypes$1.shape({ + isId: PropTypes$1.bool.isRequired, + isSortable: PropTypes$1.bool.isRequired, + isTitle: PropTypes$1.bool.isRequired, + isVisible: PropTypes$1.bool.isRequired, + label: PropTypes$1.string.isRequired, + name: PropTypes$1.string.isRequired, + position: PropTypes$1.number.isRequired, + type: PropTypes$1.string.isRequired + }); + var actionType = PropTypes$1.shape({ + actionType: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.arrayOf(PropTypes$1.string)]).isRequired, + icon: PropTypes$1.string.isRequired, + isVisible: PropTypes$1.bool.isRequired, + label: PropTypes$1.string.isRequired, + name: PropTypes$1.string.isRequired + }); + var resourceParentType = PropTypes$1.shape({ + name: PropTypes$1.string.isRequired, + icon: PropTypes$1.string.isRequired + }); + var resourceType = PropTypes$1.shape({ + editProperties: PropTypes$1.arrayOf(propertyType).isRequired, + filterProperties: PropTypes$1.arrayOf(propertyType).isRequired, + href: PropTypes$1.string.isRequired, + id: PropTypes$1.string.isRequired, + listProperties: PropTypes$1.arrayOf(propertyType).isRequired, + name: PropTypes$1.string.isRequired, + parent: resourceParentType.isRequired, + recordActions: PropTypes$1.arrayOf(actionType).isRequired, + resourceActions: PropTypes$1.arrayOf(actionType).isRequired, + showProperties: PropTypes$1.arrayOf(propertyType).isRequired, + titleProperty: propertyType.isRequired + }); + var resourceParentWithResourcesType = PropTypes$1.shape({ + name: PropTypes$1.string.isRequired, + icon: PropTypes$1.string.isRequired, + resources: PropTypes$1.arrayOf(resourceType).isRequired + }); + + function _templateObject3() { + var data = taggedTemplateLiteral(["\n margin-right: ", ";\n"]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; + } + + function _templateObject2() { + var data = taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n color: ", ";\n font-weight: bold;\n"]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; + } + + function _templateObject() { + var data = taggedTemplateLiteral(["\n margin-bottom: ", ";\n"]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; + } + var BrandingBox = styled.div(_templateObject(), sizes.paddingLayout); + var LogoLink = styled(reactRouterDom.Link)(_templateObject2(), colors.defaultText); + var LogoImage = styled.img(_templateObject3(), sizes.padding); + + var SidebarBranding = function SidebarBranding(props) { + var paths = props.paths, + branding = props.branding; + var logo = branding.logo, + companyName = branding.companyName; + var h = new viewHelpers({ + options: paths + }); + return React__default.createElement(BrandingBox, null, React__default.createElement(LogoLink, { + to: h.dashboardUrl() + }, React__default.createElement(LogoImage, { + src: logo, + alt: companyName, + height: "35px", + width: "35px" + }), React__default.createElement("span", null, companyName))); + }; + + SidebarBranding.propTypes = { + paths: pathsType.isRequired, + branding: brandingType.isRequired + }; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var classCallCheck = _classCallCheck; + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + var createClass = _createClass; + + var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x.default : x; + } + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var _typeof_1 = createCommonjsModule(function (module) { + function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + + function _typeof(obj) { + if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return _typeof2(obj); + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; + }); + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + var assertThisInitialized = _assertThisInitialized; + + function _possibleConstructorReturn(self, call) { + if (call && (_typeof_1(call) === "object" || typeof call === "function")) { + return call; + } + + return assertThisInitialized(self); + } + + var possibleConstructorReturn = _possibleConstructorReturn; + + var getPrototypeOf = createCommonjsModule(function (module) { + function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + module.exports = _getPrototypeOf; + }); + + var setPrototypeOf = createCommonjsModule(function (module) { + function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + module.exports = _setPrototypeOf; + }); + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf(subClass, superClass); + } + + var inherits = _inherits; + + function _templateObject$1() { + var data = taggedTemplateLiteral(["\n color: ", ";\n padding: ", ";\n display: block;\n\n &:hover {\n color: ", ";\n }\n\n &.active {\n color: ", ";\n }\n"]); + + _templateObject$1 = function _templateObject() { + return data; + }; + + return data; + } + var ResourceLink = styled(reactRouterDom.NavLink)(_templateObject$1(), colors.defaultText, sizes.paddingMin, colors.primary, colors.primary); + + var SidebarResource = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(SidebarResource, _React$PureComponent); + + function SidebarResource() { + classCallCheck(this, SidebarResource); + + return possibleConstructorReturn(this, getPrototypeOf(SidebarResource).apply(this, arguments)); + } + + createClass(SidebarResource, [{ + key: "render", + value: function render() { + var _this$props = this.props, + resource = _this$props.resource, + match = _this$props.match; + return React__default.createElement("li", null, React__default.createElement(ResourceLink, { + to: resource.href + }, resource.name)); + } + }]); + + return SidebarResource; + }(React__default.PureComponent); + + SidebarResource.propTypes = { + resource: resourceType.isRequired + }; + var SidebarResource$1 = reactRouterDom.withRouter(SidebarResource); + + function _templateObject2$1() { + var data = taggedTemplateLiteral(["\n margin: ", " 0;\n padding-left: 40px;\n"]); + + _templateObject2$1 = function _templateObject2() { + return data; + }; + + return data; + } + + function _templateObject$2() { + var data = taggedTemplateLiteral(["\n background: ", ";\n padding-left: ", ";\n padding-right: ", ";\n line-height: 40px;\n border-radius: ", ";\n display: flex;\n align-items: baseline;\n color: ", ";\n position: relative;\n\n & > i, & > svg {\n margin-right: ", ";\n color: ", ";\n margin-right: ", ";\n }\n"]); + + _templateObject$2 = function _templateObject() { + return data; + }; + + return data; + } + var Title = styled.span(_templateObject$2(), colors.lightBck, sizes.padding, sizes.padding, sizes.paddingLayout, colors.defaultText, sizes.paddingMin, colors.lightText, sizes.padding); + var ResourcesList = styled.ul(_templateObject2$1(), sizes.padding); + + var SidebarParent = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(SidebarParent, _React$PureComponent); + + function SidebarParent() { + classCallCheck(this, SidebarParent); + + return possibleConstructorReturn(this, getPrototypeOf(SidebarParent).apply(this, arguments)); + } + + createClass(SidebarParent, [{ + key: "render", + value: function render() { + var parent = this.props.parent; + var icon = parent.icon, + name = parent.name, + resources = parent.resources; + return React__default.createElement("li", null, React__default.createElement(Title, null, React__default.createElement("i", { + className: icon + }), name), React__default.createElement(ResourcesList, null, resources.map(function (resource) { + return React__default.createElement(SidebarResource$1, { + resource: resource, + key: resource.id + }); + }))); + } + }]); + + return SidebarParent; + }(React__default.PureComponent); + + SidebarParent.propTypes = { + parent: resourceParentWithResourcesType.isRequired + }; + + function _templateObject$3() { + var data = taggedTemplateLiteral(["\n font-size: ", ";\n text-align: center;\n color: ", ";\n\n & > svg, & > a {\n color: ", ";\n margin: 0 ", ";\n }\n"]); + + _templateObject$3 = function _templateObject() { + return data; + }; + + return data; + } + var StyledFooter = styled.p(_templateObject$3(), fonts.min, colors.lightText, colors.love, sizes.paddingMin); + + var SidebarFooter = function SidebarFooter(props) { + return React__default.createElement(StyledFooter, null, "With", React__default.createElement("i", { + className: "fas fa-heart" + }), "by", React__default.createElement("a", { + href: "http://softwarebrothers.co", + target: "_blank", + rel: "noopener noreferrer" + }, "SoftwareBrothers")); + }; + + /* eslint-disable no-param-reassign */ + var groupResources = (function (resources) { + var map = resources.reduce(function (memo, resource) { + if (memo[resource.parent.name]) { + memo[resource.parent.name].push(resource); + } else { + memo[resource.parent.name] = [resource]; + } + + memo[resource.parent.name].icon = resource.parent.icon; + return memo; + }, {}); + return Object.keys(map).map(function (parentName) { + return { + name: parentName, + icon: map[parentName].icon, + resources: map[parentName] + }; + }); + }); + + function _templateObject$4() { + var data = taggedTemplateLiteral(["\n cursor: pointer;\n display: block;\n float: left;\n margin: ", ";\n"]); + + _templateObject$4 = function _templateObject() { + return data; + }; + + return data; + } + var Hamburger = styled.i.attrs({ + className: 'fas fa-bars fa-2x' + })(_templateObject$4(), sizes.paddingMin); + + function _templateObject2$2() { + var data = taggedTemplateLiteral(["\n margin-top: ", ";\n margin-left: ", ";\n margin-bottom: ", ";\n color: ", ";\n font-size: ", ";\n text-transform: uppercase;\n letter-spacing: .1em;\n"]); + + _templateObject2$2 = function _templateObject2() { + return data; + }; + + return data; + } + + function _templateObject$5() { + var data = taggedTemplateLiteral(["\n padding: ", ";\n width: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: 100vh;\n overflow-y: auto;\n"]); + + _templateObject$5 = function _templateObject() { + return data; + }; + + return data; + } + var SidebarWrapper = styled.aside(_templateObject$5(), sizes.paddingLayout, sizes.sidebarWidth); + var SidebarLabel = styled.h2(_templateObject2$2(), sizes.padding, sizes.padding, sizes.padding, colors.lightText, fonts.min); + + var Sidebar = function Sidebar(props) { + var branding = props.branding, + paths = props.paths, + resources = props.resources; + return React__default.createElement(SidebarWrapper, null, React__default.createElement("section", null, React__default.createElement(SidebarBranding, { + branding: branding, + paths: paths + }), React__default.createElement(SidebarLabel, null, "Navigation"), React__default.createElement("ul", null, groupResources(resources).map(function (parent) { + return React__default.createElement(SidebarParent, { + parent: parent, + key: parent.name + }); + }))), branding.softwareBrothers && React__default.createElement(SidebarFooter, null)); + }; + + Sidebar.propTypes = { + paths: pathsType.isRequired, + branding: brandingType.isRequired, + resources: PropTypes$1.arrayOf(resourceType).isRequired + }; + + var mapStateToProps = function mapStateToProps(state) { + return { + resources: state.resources, + branding: state.branding, + paths: state.paths + }; + }; + + var Sidebar$1 = reactRedux.connect(mapStateToProps)(Sidebar); + + var Topbar = + /*#__PURE__*/ + function (_React$Component) { + inherits(Topbar, _React$Component); + + function Topbar() { + classCallCheck(this, Topbar); + + return possibleConstructorReturn(this, getPrototypeOf(Topbar).apply(this, arguments)); + } + + createClass(Topbar, [{ + key: "render", + value: function render() { + var _this = this; + + var LoggedIn = function LoggedIn(session) { + return React__default.createElement("div", { + className: "navbar-item has-dropdown is-hoverable navbar-user" + }, React__default.createElement("a", { + className: "navbar-link" + }, session.email, React__default.createElement("img", { + src: "https://api.adorable.io/avatars/24/softwarebrothers.png" + })), React__default.createElement("div", { + className: "navbar-dropdown" + }, React__default.createElement("a", { + className: "navbar-item", + href: _this.props.paths.logoutPath + }, React__default.createElement("span", { + className: "fas fa-sign-out-alt" + }), "Sign out"))); + }; + + return React__default.createElement("nav", { + className: "navbar" + }, React__default.createElement("div", { + className: "hamburger hidden" + }, React__default.createElement("i", { + className: "hamburger-icon fas fa-bars fa-2x" + })), React__default.createElement("div", { + className: "navbar-menu" + }, React__default.createElement("div", { + className: "navbar-start" + }), React__default.createElement("div", { + className: "navbar-end" + }, this.props.session && this.props.session.email && LoggedIn(this.props.session)))); + } + }]); + + return Topbar; + }(React__default.Component); + + var mapStateToProps$1 = function mapStateToProps(state) { + return { + session: state.session, + paths: state.paths + }; + }; + + var Topbar$1 = reactRedux.connect(mapStateToProps$1)(Topbar); + + var Breadcrumbs = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Breadcrumbs, _React$PureComponent); + + function Breadcrumbs() { + classCallCheck(this, Breadcrumbs); + + return possibleConstructorReturn(this, getPrototypeOf(Breadcrumbs).apply(this, arguments)); + } + + createClass(Breadcrumbs, [{ + key: "renderResource", + value: function renderResource() { + var _this$props = this.props, + resource = _this$props.resource, + record = _this$props.record; + return React__default.createElement("li", null, React__default.createElement(reactRouterDom.Link, { + to: resource.href, + className: record && 'is-active' + }, resource.name)); + } + }, { + key: "renderAction", + value: function renderAction() { + var actionName = this.props.actionName; + return actionName && React__default.createElement("li", { + className: "is-active" + }, React__default.createElement("a", null, actionName)); + } + }, { + key: "render", + value: function render() { + return React__default.createElement("nav", { + className: "breadcrumb", + "aria-label": "breadcrumbs" + }, React__default.createElement("ul", null, this.renderResource(), this.renderAction())); + } + }]); + + return Breadcrumbs; + }(React__default.PureComponent); + + var runtime_1 = createCommonjsModule(function (module) { + /** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var runtime = (function (exports) { + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined$1; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + exports.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + exports.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + exports.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + exports.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. + result.value = unwrapped; + resolve(result); + }, function(error) { + // If a rejected Promise was yielded, throw the rejection back + // into the async generator function so it can be handled there. + return invoke("throw", error, resolve, reject); + }); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + exports.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + exports.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return exports.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined$1) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + // Note: ["return"] must be used for ES3 parsing compatibility. + if (delegate.iterator["return"]) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined$1; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined$1; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + exports.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined$1; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + exports.values = values; + + function doneResult() { + return { value: undefined$1, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined$1; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined$1; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined$1; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined$1; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined$1; + } + + return ContinueSentinel; + } + }; + + // Regardless of whether this script is executing as a CommonJS module + // or not, return the runtime object so that we can declare the variable + // regeneratorRuntime in the outer scope, which allows this module to be + // injected easily by `bin/regenerator --include-runtime script.js`. + return exports; + + }( + // If this script is executing as a CommonJS module, use module.exports + // as the regeneratorRuntime namespace. Otherwise create a new empty + // object. Either way, the resulting object will be used to initialize + // the regeneratorRuntime variable at the top of this file. + module.exports + )); + + try { + regeneratorRuntime = runtime; + } catch (accidentalStrictMode) { + // This module should not be running in strict mode, so the above + // assignment should always work unless something is misconfigured. Just + // in case runtime.js accidentally runs in strict mode, we can escape + // strict mode using a global Function call. This could conceivably fail + // if a Content Security Policy forbids using Function, but in that case + // the proper solution is to fix the accidental strict mode problem. If + // you've misconfigured your bundler to force strict mode and applied a + // CSP to forbid Function, and you're not willing to fix either of those + // problems, please detail your unique predicament in a GitHub issue. + Function("r", "regeneratorRuntime = r")(runtime); + } + }); + + var regenerator = runtime_1; + + function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + + function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; + } + + var asyncToGenerator = _asyncToGenerator; + + var ApiClient = + /*#__PURE__*/ + function () { + function ApiClient() { + classCallCheck(this, ApiClient); + + var baseURL = [window.location.origin, window.REDUX_STATE.paths.rootPath].join(''); + this.client = axios.create({ + baseURL: baseURL + }); + } + + createClass(ApiClient, [{ + key: "getRecords", + value: function () { + var _getRecords = asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee(_ref) { + var resourceId, query; + return regenerator.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + resourceId = _ref.resourceId, query = _ref.query; + return _context.abrupt("return", this.client.get("/api/resources/".concat(resourceId), { + params: query + })); + + case 2: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function getRecords(_x) { + return _getRecords.apply(this, arguments); + } + + return getRecords; + }() + }, { + key: "searchRecords", + value: function () { + var _searchRecords = asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee2(_ref2) { + var resourceId, query, q, response; + return regenerator.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + resourceId = _ref2.resourceId, query = _ref2.query; + q = encodeURIComponent(query); + _context2.next = 4; + return this.client.get("/api/resources/".concat(resourceId, "/search/").concat(q)); + + case 4: + response = _context2.sent; + return _context2.abrupt("return", response.data.records); + + case 6: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function searchRecords(_x2) { + return _searchRecords.apply(this, arguments); + } + + return searchRecords; + }() + }, { + key: "resourceAction", + value: function () { + var _resourceAction = asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee3(_ref3) { + var resourceId, actionName, payload, method; + return regenerator.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + resourceId = _ref3.resourceId, actionName = _ref3.actionName, payload = _ref3.payload, method = _ref3.method; + return _context3.abrupt("return", this.client.request({ + url: "/api/resources/".concat(resourceId, "/actions/").concat(actionName), + method: method || payload ? 'POST' : 'GET', + data: payload + })); + + case 2: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function resourceAction(_x3) { + return _resourceAction.apply(this, arguments); + } + + return resourceAction; + }() + }, { + key: "recordAction", + value: function () { + var _recordAction = asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee4(_ref4) { + var resourceId, recordId, actionName, payload, method; + return regenerator.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + resourceId = _ref4.resourceId, recordId = _ref4.recordId, actionName = _ref4.actionName, payload = _ref4.payload, method = _ref4.method; + return _context4.abrupt("return", this.client.request({ + url: "/api/resources/".concat(resourceId, "/records/").concat(recordId, "/").concat(actionName), + method: method || payload ? 'POST' : 'GET', + data: payload + })); + + case 2: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function recordAction(_x4) { + return _recordAction.apply(this, arguments); + } + + return recordAction; + }() + }, { + key: "getDashboard", + value: function () { + var _getDashboard = asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee5(_ref5) { + var params; + return regenerator.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + params = _ref5.params; + return _context5.abrupt("return", this.client.get("/api/dashboard", { + params: params + })); + + case 2: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function getDashboard(_x5) { + return _getDashboard.apply(this, arguments); + } + + return getDashboard; + }() + }]); + + return ApiClient; + }(); + + var ActionBtn = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(ActionBtn, _React$PureComponent); + + function ActionBtn() { + classCallCheck(this, ActionBtn); + + return possibleConstructorReturn(this, getPrototypeOf(ActionBtn).apply(this, arguments)); + } + + createClass(ActionBtn, [{ + key: "handleClick", + value: function handleClick(event) { + var _this = this; + + if (this.props.action.guard && !confirm(this.props.action.guard)) { + event.preventDefault(); + return; + } + + if (typeof this.props.action.component !== 'undefined' && this.props.action.component === false) { + event.preventDefault(); + var api = new ApiClient(); + api.recordAction({ + resourceId: this.props.resourceId, + actionName: this.props.action.name, + recordId: this.props.recordId + }).then(function (response) { + if (_this.props.location.pathname !== response.data.redirectUrl) { + _this.props.history.push(response.data.redirectUrl); + } + + if (_this.props.actionPerformed) { + _this.props.actionPerformed(); + } + }); + } + } + }, { + key: "render", + value: function render() { + var h = new viewHelpers(); + var _this$props = this.props, + resourceId = _this$props.resourceId, + recordId = _this$props.recordId; + var actionName = this.props.action.name; + var href = this.props.recordId ? h.recordActionUrl({ + resourceId: resourceId, + recordId: recordId, + actionName: actionName + }) : h.resourceActionUrl({ + resourceId: resourceId, + actionName: actionName + }); + return React__default.createElement("div", { + className: "control" + }, React__default.createElement(reactRouterDom.Link, { + to: href, + className: "button " + this.props.className, + onClick: this.handleClick.bind(this) + }, React__default.createElement("span", { + className: "icon" + }, React__default.createElement("i", { + className: this.props.action.icon + })), React__default.createElement("div", { + className: "btn-text" + }, this.props.action.label))); + } + }]); + + return ActionBtn; + }(React__default.PureComponent); + + var ActionBtn$1 = reactRouterDom.withRouter(ActionBtn); + + var Loader = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Loader, _React$PureComponent); + + function Loader() { + classCallCheck(this, Loader); + + return possibleConstructorReturn(this, getPrototypeOf(Loader).apply(this, arguments)); + } + + createClass(Loader, [{ + key: "render", + value: function render() { + return React__default.createElement("div", null, "Loading..."); + } + }]); + + return Loader; + }(React__default.PureComponent); + + var Show = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Show, _React$PureComponent); + + function Show() { + classCallCheck(this, Show); + + return possibleConstructorReturn(this, getPrototypeOf(Show).apply(this, arguments)); + } + + createClass(Show, [{ + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record; + var value = record.params[property.name]; + var label = property.label; + return React__default.createElement("div", { + className: "property" + }, React__default.createElement("div", { + className: "card-content" + }, React__default.createElement("div", { + className: "text-small" + }, label), React__default.createElement("div", null, value))); + } + }]); + + return Show; + }(React__default.PureComponent); + + var Edit = + /*#__PURE__*/ + function (_React$Component) { + inherits(Edit, _React$Component); + + function Edit() { + classCallCheck(this, Edit); + + return possibleConstructorReturn(this, getPrototypeOf(Edit).apply(this, arguments)); + } + + createClass(Edit, [{ + key: "handleChange", + value: function handleChange(event) { + this.props.onChange(this.props.property.name, event.target.value); + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + resource = _this$props.resource, + record = _this$props.record; + var value = record.params && record.params[property.name] || ''; + var error = record.errors && record.errors[property.name]; + return React__default.createElement("div", { + className: "field" + }, React__default.createElement("label", { + htmlFor: property.name, + className: "label" + }, property.label), React__default.createElement("div", { + className: "control" + }, React__default.createElement("input", { + type: "text", + className: "input", + id: property.name, + name: property.name, + onChange: this.handleChange.bind(this), + value: value + })), error && React__default.createElement("div", { + className: "help is-danger" + }, error.message)); + } + }]); + + return Edit; + }(React__default.Component); + + var Filter = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Filter, _React$PureComponent); + + function Filter() { + classCallCheck(this, Filter); + + return possibleConstructorReturn(this, getPrototypeOf(Filter).apply(this, arguments)); + } + + createClass(Filter, [{ + key: "handleChange", + value: function handleChange(event) { + this.props.onChange(this.props.property.name, event.target.value); + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + filter = _this$props.filter; + var filterKey = "filter-".concat(property.name); + var value = filter[property.name] || ''; + return React__default.createElement("div", { + className: "filter" + }, React__default.createElement("label", { + htmlFor: filterKey, + className: "label" + }, property.label, " contains:"), React__default.createElement("div", { + className: "control" + }, React__default.createElement("i", { + className: "search-icon fas fa-search" + }), React__default.createElement("input", { + type: "text", + className: "input filter", + name: filterKey, + onChange: this.handleChange.bind(this), + value: value + }))); + } + }]); + + return Filter; + }(React__default.PureComponent); + + var List = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(List, _React$PureComponent); + + function List() { + classCallCheck(this, List); + + return possibleConstructorReturn(this, getPrototypeOf(List).apply(this, arguments)); + } + + createClass(List, [{ + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record, + resource = _this$props.resource; + var showAction = resource.recordActions.find(function (a) { + return a.name === 'show'; + }); + var value = record.params[property.name]; + + if (resource.titleProperty.name === property.name && showAction) { + var h = new viewHelpers(); + var href = h.recordActionUrl({ + resourceId: resource.id, + recordId: record.id, + actionName: 'show' + }); + return React__default.createElement(reactRouterDom.Link, { + to: href + }, value); + } + + return React__default.createElement("span", null, value); + } + }]); + + return List; + }(React__default.PureComponent); + + var defaultType = { + show: Show, + edit: Edit, + filter: Filter, + list: List + }; + + var Edit$1 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Edit, _React$PureComponent); + + function Edit() { + classCallCheck(this, Edit); + + return possibleConstructorReturn(this, getPrototypeOf(Edit).apply(this, arguments)); + } + + createClass(Edit, [{ + key: "handleChange", + value: function handleChange(event) { + this.props.onChange(this.props.property.name, event.target.checked); + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + resource = _this$props.resource, + record = _this$props.record; + var value = record.params && record.params[property.name] || ''; + var error = record.errors && record.errors[property.name]; + return React__default.createElement("div", { + className: "field" + }, React__default.createElement("label", { + htmlFor: property.name, + className: "label" + }, property.label), React__default.createElement("div", { + className: "control" + }, React__default.createElement("input", { + type: "checkbox", + className: "checkbox", + id: property.name, + name: property.name, + onChange: this.handleChange.bind(this), + checked: value + })), error && React__default.createElement("div", { + className: "help is-danger" + }, error.message)); + } + }]); + + return Edit; + }(React__default.PureComponent); + + var mapValue = (function (value) { + return value ? 'Yes' : 'No'; + }); + + var Show$1 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Show, _React$PureComponent); + + function Show() { + classCallCheck(this, Show); + + return possibleConstructorReturn(this, getPrototypeOf(Show).apply(this, arguments)); + } + + createClass(Show, [{ + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record; + var value = mapValue(record.params[property.name]); + var label = property.label; + return React__default.createElement("div", { + className: "property" + }, React__default.createElement("div", { + className: "card-content" + }, React__default.createElement("div", { + className: "text-small" + }, label), React__default.createElement("div", null, value))); + } + }]); + + return Show; + }(React__default.PureComponent); + + var List$1 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(List, _React$PureComponent); + + function List() { + classCallCheck(this, List); + + return possibleConstructorReturn(this, getPrototypeOf(List).apply(this, arguments)); + } + + createClass(List, [{ + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record, + resource = _this$props.resource; + var showAction = resource.recordActions.find(function (a) { + return a.name === 'show'; + }); + var value = mapValue(record.params[property.name]); + + if (resource.titleProperty.name === property.name && showAction) { + var h = new viewHelpers(); + var href = h.recordActionUrl({ + resourceId: resource.id, + recordId: record.id, + actionName: 'show' + }); + return React__default.createElement(reactRouterDom.Link, { + to: href + }, value); + } + + return React__default.createElement("span", null, value); + } + }]); + + return List; + }(React__default.PureComponent); + + var shallowEqual = function shallowEqual(newValue, oldValue) { + return newValue === oldValue; + }; + + var simpleIsEqual = function simpleIsEqual(newArgs, lastArgs) { + return newArgs.length === lastArgs.length && newArgs.every(function (newArg, index) { + return shallowEqual(newArg, lastArgs[index]); + }); + }; + + function index (resultFn, isEqual) { + if (isEqual === void 0) { + isEqual = simpleIsEqual; + } + + var lastThis; + var lastArgs = []; + var lastResult; + var calledOnce = false; + + var result = function result() { + for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) { + newArgs[_key] = arguments[_key]; + } + + if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) { + return lastResult; + } + + lastResult = resultFn.apply(this, newArgs); + calledOnce = true; + lastThis = this; + lastArgs = newArgs; + return lastResult; + }; + + return result; + } + + function memoize(fn) { + var cache = {}; + return function (arg) { + if (cache[arg] === undefined) cache[arg] = fn(arg); + return cache[arg]; + }; + } + + var unitlessKeys = { + animationIterationCount: 1, + borderImageOutset: 1, + borderImageSlice: 1, + borderImageWidth: 1, + boxFlex: 1, + boxFlexGroup: 1, + boxOrdinalGroup: 1, + columnCount: 1, + columns: 1, + flex: 1, + flexGrow: 1, + flexPositive: 1, + flexShrink: 1, + flexNegative: 1, + flexOrder: 1, + gridRow: 1, + gridRowEnd: 1, + gridRowSpan: 1, + gridRowStart: 1, + gridColumn: 1, + gridColumnEnd: 1, + gridColumnSpan: 1, + gridColumnStart: 1, + fontWeight: 1, + lineHeight: 1, + opacity: 1, + order: 1, + orphans: 1, + tabSize: 1, + widows: 1, + zIndex: 1, + zoom: 1, + WebkitLineClamp: 1, + // SVG-related properties + fillOpacity: 1, + floodOpacity: 1, + stopOpacity: 1, + strokeDasharray: 1, + strokeDashoffset: 1, + strokeMiterlimit: 1, + strokeOpacity: 1, + strokeWidth: 1 + }; + + /* eslint-disable */ + // murmurhash2 via https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js + function murmurhash2_32_gc(str) { + var l = str.length, + h = l ^ l, + i = 0, + k; + + while (l >= 4) { + k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; + k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16); + k ^= k >>> 24; + k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16); + h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k; + l -= 4; + ++i; + } + + switch (l) { + case 3: + h ^= (str.charCodeAt(i + 2) & 0xff) << 16; + + case 2: + h ^= (str.charCodeAt(i + 1) & 0xff) << 8; + + case 1: + h ^= str.charCodeAt(i) & 0xff; + h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16); + } + + h ^= h >>> 13; + h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16); + h ^= h >>> 15; + return (h >>> 0).toString(36); + } + + function stylis_min (W) { + function M(d, c, e, h, a) { + for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) { + g = e.charCodeAt(l); + l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++); + + if (0 === b + n + v + m) { + if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) { + switch (g) { + case 32: + case 9: + case 59: + case 13: + case 10: + break; + + default: + f += e.charAt(l); + } + + g = 59; + } + + switch (g) { + case 123: + f = f.trim(); + q = f.charCodeAt(0); + k = 1; + + for (t = ++l; l < B;) { + switch (g = e.charCodeAt(l)) { + case 123: + k++; + break; + + case 125: + k--; + break; + + case 47: + switch (g = e.charCodeAt(l + 1)) { + case 42: + case 47: + a: { + for (u = l + 1; u < J; ++u) { + switch (e.charCodeAt(u)) { + case 47: + if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) { + l = u + 1; + break a; + } + + break; + + case 10: + if (47 === g) { + l = u + 1; + break a; + } + + } + } + + l = u; + } + + } + + break; + + case 91: + g++; + + case 40: + g++; + + case 34: + case 39: + for (; l++ < J && e.charCodeAt(l) !== g;) { + } + + } + + if (0 === k) break; + l++; + } + + k = e.substring(t, l); + 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0)); + + switch (q) { + case 64: + 0 < r && (f = f.replace(N, '')); + g = f.charCodeAt(1); + + switch (g) { + case 100: + case 109: + case 115: + case 45: + r = c; + break; + + default: + r = O; + } + + k = M(c, r, k, g, a + 1); + t = k.length; + 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = '')); + if (0 < t) switch (g) { + case 115: + f = f.replace(da, ea); + + case 100: + case 109: + case 45: + k = f + '{' + k + '}'; + break; + + case 107: + f = f.replace(fa, '$1 $2'); + k = f + '{' + k + '}'; + k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k; + break; + + default: + k = f + k, 112 === h && (k = (p += k, '')); + } else k = ''; + break; + + default: + k = M(c, X(c, f, I), k, h, a + 1); + } + + F += k; + k = I = r = u = q = 0; + f = ''; + g = e.charCodeAt(++l); + break; + + case 125: + case 59: + f = (0 < r ? f.replace(N, '') : f).trim(); + if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) { + case 0: + break; + + case 64: + if (105 === g || 99 === g) { + G += f + e.charAt(l); + break; + } + + default: + 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2))); + } + I = r = u = q = 0; + f = ''; + g = e.charCodeAt(++l); + } + } + + switch (g) { + case 13: + case 10: + 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00'); + 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h); + z = 1; + D++; + break; + + case 59: + case 125: + if (0 === b + n + v + m) { + z++; + break; + } + + default: + z++; + y = e.charAt(l); + + switch (g) { + case 9: + case 32: + if (0 === n + m + b) switch (x) { + case 44: + case 58: + case 9: + case 32: + y = ''; + break; + + default: + 32 !== g && (y = ' '); + } + break; + + case 0: + y = '\\0'; + break; + + case 12: + y = '\\f'; + break; + + case 11: + y = '\\v'; + break; + + case 38: + 0 === n + b + m && (r = I = 1, y = '\f' + y); + break; + + case 108: + if (0 === n + b + m + E && 0 < u) switch (l - u) { + case 2: + 112 === x && 58 === e.charCodeAt(l - 3) && (E = x); + + case 8: + 111 === K && (E = K); + } + break; + + case 58: + 0 === n + b + m && (u = l); + break; + + case 44: + 0 === b + v + n + m && (r = 1, y += '\r'); + break; + + case 34: + case 39: + 0 === b && (n = n === g ? 0 : 0 === n ? g : n); + break; + + case 91: + 0 === n + b + v && m++; + break; + + case 93: + 0 === n + b + v && m--; + break; + + case 41: + 0 === n + b + m && v--; + break; + + case 40: + if (0 === n + b + m) { + if (0 === q) switch (2 * x + 3 * K) { + case 533: + break; + + default: + q = 1; + } + v++; + } + + break; + + case 64: + 0 === b + v + n + m + u + k && (k = 1); + break; + + case 42: + case 47: + if (!(0 < n + m + v)) switch (b) { + case 0: + switch (2 * g + 3 * e.charCodeAt(l + 1)) { + case 235: + b = 47; + break; + + case 220: + t = l, b = 42; + } + + break; + + case 42: + 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0); + } + } + + 0 === b && (f += y); + } + + K = x; + x = g; + l++; + } + + t = p.length; + + if (0 < t) { + r = c; + if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F; + p = r.join(',') + '{' + p + '}'; + + if (0 !== w * E) { + 2 !== w || L(p, 2) || (E = 0); + + switch (E) { + case 111: + p = p.replace(ha, ':-moz-$1') + p; + break; + + case 112: + p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p; + } + + E = 0; + } + } + + return G + p + F; + } + + function X(d, c, e) { + var h = c.trim().split(ia); + c = h; + var a = h.length, + m = d.length; + + switch (m) { + case 0: + case 1: + var b = 0; + + for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) { + c[b] = Z(d, c[b], e, m).trim(); + } + + break; + + default: + var v = b = 0; + + for (c = []; b < a; ++b) { + for (var n = 0; n < m; ++n) { + c[v++] = Z(d[n] + ' ', h[b], e, m).trim(); + } + } + + } + + return c; + } + + function Z(d, c, e) { + var h = c.charCodeAt(0); + 33 > h && (h = (c = c.trim()).charCodeAt(0)); + + switch (h) { + case 38: + return c.replace(F, '$1' + d.trim()); + + case 58: + return d.trim() + c.replace(F, '$1' + d.trim()); + + default: + if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim()); + } + + return d + c; + } + + function P(d, c, e, h) { + var a = d + ';', + m = 2 * c + 3 * e + 4 * h; + + if (944 === m) { + d = a.indexOf(':', 9) + 1; + var b = a.substring(d, a.length - 1).trim(); + b = a.substring(0, d).trim() + b + ';'; + return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b; + } + + if (0 === w || 2 === w && !L(a, 1)) return a; + + switch (m) { + case 1015: + return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a; + + case 951: + return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a; + + case 963: + return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a; + + case 1009: + if (100 !== a.charCodeAt(4)) break; + + case 969: + case 942: + return '-webkit-' + a + a; + + case 978: + return '-webkit-' + a + '-moz-' + a + a; + + case 1019: + case 983: + return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a; + + case 883: + if (45 === a.charCodeAt(8)) return '-webkit-' + a + a; + if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a; + break; + + case 932: + if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) { + case 103: + return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a; + + case 115: + return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a; + + case 98: + return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a; + } + return '-webkit-' + a + '-ms-' + a + a; + + case 964: + return '-webkit-' + a + '-ms-flex-' + a + a; + + case 1023: + if (99 !== a.charCodeAt(8)) break; + b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify'); + return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a; + + case 1005: + return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a; + + case 1e3: + b = a.substring(13).trim(); + c = b.indexOf('-') + 1; + + switch (b.charCodeAt(0) + b.charCodeAt(c)) { + case 226: + b = a.replace(G, 'tb'); + break; + + case 232: + b = a.replace(G, 'tb-rl'); + break; + + case 220: + b = a.replace(G, 'lr'); + break; + + default: + return a; + } + + return '-webkit-' + a + '-ms-' + b + a; + + case 1017: + if (-1 === a.indexOf('sticky', 9)) break; + + case 975: + c = (a = d).length - 10; + b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim(); + + switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) { + case 203: + if (111 > b.charCodeAt(8)) break; + + case 115: + a = a.replace(b, '-webkit-' + b) + ';' + a; + break; + + case 207: + case 102: + a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a; + } + + return a + ';'; + + case 938: + if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) { + case 105: + return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a; + + case 115: + return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a; + + default: + return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a; + } + break; + + case 973: + case 989: + if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break; + + case 931: + case 953: + if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a; + break; + + case 962: + if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a; + } + + return a; + } + + function L(d, c) { + var e = d.indexOf(1 === c ? ':' : '{'), + h = d.substring(0, 3 !== c ? e : 10); + e = d.substring(e + 1, d.length - 1); + return R(2 !== c ? h : h.replace(na, '$1'), e, c); + } + + function ea(d, c) { + var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2)); + return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')'; + } + + function H(d, c, e, h, a, m, b, v, n, q) { + for (var g = 0, x = c, w; g < A; ++g) { + switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) { + case void 0: + case !1: + case !0: + case null: + break; + + default: + x = w; + } + } + + if (x !== c) return x; + } + + function T(d) { + switch (d) { + case void 0: + case null: + A = S.length = 0; + break; + + default: + switch (d.constructor) { + case Array: + for (var c = 0, e = d.length; c < e; ++c) { + T(d[c]); + } + + break; + + case Function: + S[A++] = d; + break; + + case Boolean: + Y = !!d | 0; + } + + } + + return T; + } + + function U(d) { + d = d.prefix; + void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0); + return U; + } + + function B(d, c) { + var e = d; + 33 > e.charCodeAt(0) && (e = e.trim()); + V = e; + e = [V]; + + if (0 < A) { + var h = H(-1, c, e, e, D, z, 0, 0, 0, 0); + void 0 !== h && 'string' === typeof h && (c = h); + } + + var a = M(O, e, c, 0, 0); + 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h)); + V = ''; + E = 0; + z = D = 1; + return a; + } + + var ca = /^\0+/g, + N = /[\0\r\f]/g, + aa = /: */g, + ka = /zoo|gra/, + ma = /([,: ])(transform)/g, + ia = /,\r+?/g, + F = /([\t\r\n ])*\f?&/g, + fa = /@(k\w+)\s*(\S*)\s*/, + Q = /::(place)/g, + ha = /:(read-only)/g, + G = /[svh]\w+-[tblr]{2}/, + da = /\(\s*(.*)\s*\)/g, + oa = /([\s\S]*?);/g, + ba = /-self|flex-/g, + na = /[^]*?(:[rp][el]a[\w-]+)[^]*/, + la = /stretch|:\s*\w+\-(?:conte|avail)/, + ja = /([^-])(image-set\()/, + z = 1, + D = 1, + E = 0, + w = 1, + O = [], + S = [], + A = 0, + R = null, + Y = 0, + V = ''; + B.use = T; + B.set = U; + void 0 !== W && U(W); + return B; + } + + var stylisRuleSheet = createCommonjsModule(function (module, exports) { + (function (factory) { + module['exports'] = factory(); + }(function () { + + return function (insertRule) { + var delimiter = '/*|*/'; + var needle = delimiter+'}'; + + function toSheet (block) { + if (block) + try { + insertRule(block + '}'); + } catch (e) {} + } + + return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) { + switch (context) { + // property + case 1: + // @import + if (depth === 0 && content.charCodeAt(0) === 64) + return insertRule(content+';'), '' + break + // selector + case 2: + if (ns === 0) + return content + delimiter + break + // at-rule + case 3: + switch (ns) { + // @font-face, @page + case 102: + case 112: + return insertRule(selectors[0]+content), '' + default: + return content + (at === 0 ? delimiter : '') + } + case -2: + content.split(needle).forEach(toSheet); + } + } + } + })); + }); + + var hyphenateRegex = /[A-Z]|^ms/g; + var processStyleName = memoize(function (styleName) { + return styleName.replace(hyphenateRegex, '-$&').toLowerCase(); + }); + var processStyleValue = function processStyleValue(key, value) { + if (value == null || typeof value === 'boolean') { + return ''; + } + + if (unitlessKeys[key] !== 1 && key.charCodeAt(1) !== 45 && // custom properties + !isNaN(value) && value !== 0) { + return value + 'px'; + } + + return value; + }; + + { + var contentValuePattern = /(attr|calc|counters?|url)\(/; + var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset']; + var oldProcessStyleValue = processStyleValue; + + processStyleValue = function processStyleValue(key, value) { + if (key === 'content') { + if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) { + console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`"); + } + } + + return oldProcessStyleValue(key, value); + }; + } + + var classnames = function classnames(args) { + var len = args.length; + var i = 0; + var cls = ''; + + for (; i < len; i++) { + var arg = args[i]; + if (arg == null) continue; + var toAdd = void 0; + + switch (typeof arg) { + case 'boolean': + break; + + case 'function': + { + console.error('Passing functions to cx is deprecated and will be removed in the next major version of Emotion.\n' + 'Please call the function before passing it to cx.'); + } + + toAdd = classnames([arg()]); + break; + + case 'object': + { + if (Array.isArray(arg)) { + toAdd = classnames(arg); + } else { + toAdd = ''; + + for (var k in arg) { + if (arg[k] && k) { + toAdd && (toAdd += ' '); + toAdd += k; + } + } + } + + break; + } + + default: + { + toAdd = arg; + } + } + + if (toAdd) { + cls && (cls += ' '); + cls += toAdd; + } + } + + return cls; + }; + var isBrowser = typeof document !== 'undefined'; + + /* + + high performance StyleSheet for css-in-js systems + + - uses multiple style tags behind the scenes for millions of rules + - uses `insertRule` for appending in production for *much* faster performance + - 'polyfills' on server side + + // usage + + import StyleSheet from 'glamor/lib/sheet' + let styleSheet = new StyleSheet() + + styleSheet.inject() + - 'injects' the stylesheet into the page (or into memory if on server) + + styleSheet.insert('#box { border: 1px solid red; }') + - appends a css rule into the stylesheet + + styleSheet.flush() + - empties the stylesheet of all its contents + + */ + // $FlowFixMe + function sheetForTag(tag) { + if (tag.sheet) { + // $FlowFixMe + return tag.sheet; + } // this weirdness brought to you by firefox + + + for (var i = 0; i < document.styleSheets.length; i++) { + if (document.styleSheets[i].ownerNode === tag) { + // $FlowFixMe + return document.styleSheets[i]; + } + } + } + + function makeStyleTag(opts) { + var tag = document.createElement('style'); + tag.setAttribute('data-emotion', opts.key || ''); + + if (opts.nonce !== undefined) { + tag.setAttribute('nonce', opts.nonce); + } + + tag.appendChild(document.createTextNode('')) // $FlowFixMe + ; + (opts.container !== undefined ? opts.container : document.head).appendChild(tag); + return tag; + } + + var StyleSheet = + /*#__PURE__*/ + function () { + function StyleSheet(options) { + this.isSpeedy = "development" === 'production'; // the big drawback here is that the css won't be editable in devtools + + this.tags = []; + this.ctr = 0; + this.opts = options; + } + + var _proto = StyleSheet.prototype; + + _proto.inject = function inject() { + if (this.injected) { + throw new Error('already injected!'); + } + + this.tags[0] = makeStyleTag(this.opts); + this.injected = true; + }; + + _proto.speedy = function speedy(bool) { + if (this.ctr !== 0) { + // cannot change speedy mode after inserting any rule to sheet. Either call speedy(${bool}) earlier in your app, or call flush() before speedy(${bool}) + throw new Error("cannot change speedy now"); + } + + this.isSpeedy = !!bool; + }; + + _proto.insert = function insert(rule, sourceMap) { + // this is the ultrafast version, works across browsers + if (this.isSpeedy) { + var tag = this.tags[this.tags.length - 1]; + var sheet = sheetForTag(tag); + + try { + sheet.insertRule(rule, sheet.cssRules.length); + } catch (e) { + { + console.warn('illegal rule', rule); // eslint-disable-line no-console + } + } + } else { + var _tag = makeStyleTag(this.opts); + + this.tags.push(_tag); + + _tag.appendChild(document.createTextNode(rule + (sourceMap || ''))); + } + + this.ctr++; + + if (this.ctr % 65000 === 0) { + this.tags.push(makeStyleTag(this.opts)); + } + }; + + _proto.flush = function flush() { + // $FlowFixMe + this.tags.forEach(function (tag) { + return tag.parentNode.removeChild(tag); + }); + this.tags = []; + this.ctr = 0; // todo - look for remnants in document.styleSheets + + this.injected = false; + }; + + return StyleSheet; + }(); + + function createEmotion(context, options) { + if (context.__SECRET_EMOTION__ !== undefined) { + return context.__SECRET_EMOTION__; + } + + if (options === undefined) options = {}; + var key = options.key || 'css'; + + { + if (/[^a-z-]/.test(key)) { + throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed"); + } + } + + var current; + + function insertRule(rule) { + current += rule; + + if (isBrowser) { + sheet.insert(rule, currentSourceMap); + } + } + + var insertionPlugin = stylisRuleSheet(insertRule); + var stylisOptions; + + if (options.prefix !== undefined) { + stylisOptions = { + prefix: options.prefix + }; + } + + var caches = { + registered: {}, + inserted: {}, + nonce: options.nonce, + key: key + }; + var sheet = new StyleSheet(options); + + if (isBrowser) { + // 🚀 + sheet.inject(); + } + + var stylis = new stylis_min(stylisOptions); + stylis.use(options.stylisPlugins)(insertionPlugin); + var currentSourceMap = ''; + + function handleInterpolation(interpolation, couldBeSelectorInterpolation) { + if (interpolation == null) { + return ''; + } + + switch (typeof interpolation) { + case 'boolean': + return ''; + + case 'function': + if (interpolation.__emotion_styles !== undefined) { + var selector = interpolation.toString(); + + if (selector === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') { + throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.'); + } + + return selector; + } + + if (this === undefined && "development" !== 'production') { + console.error('Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`"); + } + + return handleInterpolation.call(this, this === undefined ? interpolation() : // $FlowFixMe + interpolation(this.mergedProps, this.context), couldBeSelectorInterpolation); + + case 'object': + return createStringFromObject.call(this, interpolation); + + default: + var cached = caches.registered[interpolation]; + return couldBeSelectorInterpolation === false && cached !== undefined ? cached : interpolation; + } + } + + var objectToStringCache = new WeakMap(); + + function createStringFromObject(obj) { + if (objectToStringCache.has(obj)) { + // $FlowFixMe + return objectToStringCache.get(obj); + } + + var string = ''; + + if (Array.isArray(obj)) { + obj.forEach(function (interpolation) { + string += handleInterpolation.call(this, interpolation, false); + }, this); + } else { + Object.keys(obj).forEach(function (key) { + if (typeof obj[key] !== 'object') { + if (caches.registered[obj[key]] !== undefined) { + string += key + "{" + caches.registered[obj[key]] + "}"; + } else { + string += processStyleName(key) + ":" + processStyleValue(key, obj[key]) + ";"; + } + } else { + if (key === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') { + throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.'); + } + + if (Array.isArray(obj[key]) && typeof obj[key][0] === 'string' && caches.registered[obj[key][0]] === undefined) { + obj[key].forEach(function (value) { + string += processStyleName(key) + ":" + processStyleValue(key, value) + ";"; + }); + } else { + string += key + "{" + handleInterpolation.call(this, obj[key], false) + "}"; + } + } + }, this); + } + + objectToStringCache.set(obj, string); + return string; + } + + var name; + var stylesWithLabel; + var labelPattern = /label:\s*([^\s;\n{]+)\s*;/g; + + var createClassName = function createClassName(styles, identifierName) { + return murmurhash2_32_gc(styles + identifierName) + identifierName; + }; + + { + var oldCreateClassName = createClassName; + var sourceMappingUrlPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g; + + createClassName = function createClassName(styles, identifierName) { + return oldCreateClassName(styles.replace(sourceMappingUrlPattern, function (sourceMap) { + currentSourceMap = sourceMap; + return ''; + }), identifierName); + }; + } + + var createStyles = function createStyles(strings) { + var stringMode = true; + var styles = ''; + var identifierName = ''; + + if (strings == null || strings.raw === undefined) { + stringMode = false; + styles += handleInterpolation.call(this, strings, false); + } else { + styles += strings[0]; + } + + for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + interpolations[_key - 1] = arguments[_key]; + } + + interpolations.forEach(function (interpolation, i) { + styles += handleInterpolation.call(this, interpolation, styles.charCodeAt(styles.length - 1) === 46 // . + ); + + if (stringMode === true && strings[i + 1] !== undefined) { + styles += strings[i + 1]; + } + }, this); + stylesWithLabel = styles; + styles = styles.replace(labelPattern, function (match, p1) { + identifierName += "-" + p1; + return ''; + }); + name = createClassName(styles, identifierName); + return styles; + }; + + { + var oldStylis = stylis; + + stylis = function stylis(selector, styles) { + oldStylis(selector, styles); + currentSourceMap = ''; + }; + } + + function insert(scope, styles) { + if (caches.inserted[name] === undefined) { + current = ''; + stylis(scope, styles); + caches.inserted[name] = current; + } + } + + var css = function css() { + var styles = createStyles.apply(this, arguments); + var selector = key + "-" + name; + + if (caches.registered[selector] === undefined) { + caches.registered[selector] = stylesWithLabel; + } + + insert("." + selector, styles); + return selector; + }; + + var keyframes = function keyframes() { + var styles = createStyles.apply(this, arguments); + var animation = "animation-" + name; + insert('', "@keyframes " + animation + "{" + styles + "}"); + return animation; + }; + + var injectGlobal = function injectGlobal() { + var styles = createStyles.apply(this, arguments); + insert('', styles); + }; + + function getRegisteredStyles(registeredStyles, classNames) { + var rawClassName = ''; + classNames.split(' ').forEach(function (className) { + if (caches.registered[className] !== undefined) { + registeredStyles.push(className); + } else { + rawClassName += className + " "; + } + }); + return rawClassName; + } + + function merge(className, sourceMap) { + var registeredStyles = []; + var rawClassName = getRegisteredStyles(registeredStyles, className); + + if (registeredStyles.length < 2) { + return className; + } + + return rawClassName + css(registeredStyles, sourceMap); + } + + function cx() { + for (var _len2 = arguments.length, classNames = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + classNames[_key2] = arguments[_key2]; + } + + return merge(classnames(classNames)); + } + + function hydrateSingleId(id) { + caches.inserted[id] = true; + } + + function hydrate(ids) { + ids.forEach(hydrateSingleId); + } + + function flush() { + if (isBrowser) { + sheet.flush(); + sheet.inject(); + } + + caches.inserted = {}; + caches.registered = {}; + } + + if (isBrowser) { + var chunks = document.querySelectorAll("[data-emotion-" + key + "]"); + Array.prototype.forEach.call(chunks, function (node) { + // $FlowFixMe + sheet.tags[0].parentNode.insertBefore(node, sheet.tags[0]); // $FlowFixMe + + node.getAttribute("data-emotion-" + key).split(' ').forEach(hydrateSingleId); + }); + } + + var emotion = { + flush: flush, + hydrate: hydrate, + cx: cx, + merge: merge, + getRegisteredStyles: getRegisteredStyles, + injectGlobal: injectGlobal, + keyframes: keyframes, + css: css, + sheet: sheet, + caches: caches + }; + context.__SECRET_EMOTION__ = emotion; + return emotion; + } + + var context = typeof global !== 'undefined' ? global : {}; + + var _createEmotion = createEmotion(context), + flush = _createEmotion.flush, + hydrate = _createEmotion.hydrate, + cx = _createEmotion.cx, + merge = _createEmotion.merge, + getRegisteredStyles = _createEmotion.getRegisteredStyles, + injectGlobal = _createEmotion.injectGlobal, + keyframes = _createEmotion.keyframes, + css = _createEmotion.css, + sheet = _createEmotion.sheet, + caches = _createEmotion.caches; + + var index_esm = /*#__PURE__*/Object.freeze({ + flush: flush, + hydrate: hydrate, + cx: cx, + merge: merge, + getRegisteredStyles: getRegisteredStyles, + injectGlobal: injectGlobal, + keyframes: keyframes, + css: css, + sheet: sheet, + caches: caches + }); + + var performanceNow = createCommonjsModule(function (module) { + // Generated by CoffeeScript 1.12.2 + (function() { + var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; + + if ((typeof performance !== "undefined" && performance !== null) && performance.now) { + module.exports = function() { + return performance.now(); + }; + } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { + module.exports = function() { + return (getNanoSeconds() - nodeLoadTime) / 1e6; + }; + hrtime = process.hrtime; + getNanoSeconds = function() { + var hr; + hr = hrtime(); + return hr[0] * 1e9 + hr[1]; + }; + moduleLoadTime = getNanoSeconds(); + upTime = process.uptime() * 1e9; + nodeLoadTime = moduleLoadTime - upTime; + } else if (Date.now) { + module.exports = function() { + return Date.now() - loadTime; + }; + loadTime = Date.now(); + } else { + module.exports = function() { + return new Date().getTime() - loadTime; + }; + loadTime = new Date().getTime(); + } + + }).call(commonjsGlobal); + + //# sourceMappingURL=performance-now.js.map + }); + + var root = typeof window === 'undefined' ? commonjsGlobal : window + , vendors = ['moz', 'webkit'] + , suffix = 'AnimationFrame' + , raf = root['request' + suffix] + , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]; + + for(var i = 0; !raf && i < vendors.length; i++) { + raf = root[vendors[i] + 'Request' + suffix]; + caf = root[vendors[i] + 'Cancel' + suffix] + || root[vendors[i] + 'CancelRequest' + suffix]; + } + + // Some versions of FF have rAF but not cAF + if(!raf || !caf) { + var last = 0 + , id = 0 + , queue = [] + , frameDuration = 1000 / 60; + + raf = function(callback) { + if(queue.length === 0) { + var _now = performanceNow() + , next = Math.max(0, frameDuration - (_now - last)); + last = next + _now; + setTimeout(function() { + var cp = queue.slice(0); + // Clear queue here to prevent + // callbacks from appending listeners + // to the current frame's queue + queue.length = 0; + for(var i = 0; i < cp.length; i++) { + if(!cp[i].cancelled) { + try{ + cp[i].callback(last); + } catch(e) { + setTimeout(function() { throw e }, 0); + } + } + } + }, Math.round(next)); + } + queue.push({ + handle: ++id, + callback: callback, + cancelled: false + }); + return id + }; + + caf = function(handle) { + for(var i = 0; i < queue.length; i++) { + if(queue[i].handle === handle) { + queue[i].cancelled = true; + } + } + }; + } + + var raf_1 = function(fn) { + // Wrap in a new function to prevent + // `cancel` potentially being assigned + // to the native rAF function + return raf.call(root, fn) + }; + var cancel = function() { + caf.apply(root, arguments); + }; + var polyfill = function(object) { + if (!object) { + object = root; + } + object.requestAnimationFrame = raf; + object.cancelAnimationFrame = caf; + }; + raf_1.cancel = cancel; + raf_1.polyfill = polyfill; + + var AutosizeInput_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + + + var _react2 = _interopRequireDefault(React__default); + + + + var _propTypes2 = _interopRequireDefault(PropTypes$1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var sizerStyle = { + position: 'absolute', + top: 0, + left: 0, + visibility: 'hidden', + height: 0, + overflow: 'scroll', + whiteSpace: 'pre' + }; + + var INPUT_PROPS_BLACKLIST = ['extraWidth', 'injectStyles', 'inputClassName', 'inputRef', 'inputStyle', 'minWidth', 'onAutosize', 'placeholderIsMinWidth']; + + var cleanInputProps = function cleanInputProps(inputProps) { + INPUT_PROPS_BLACKLIST.forEach(function (field) { + return delete inputProps[field]; + }); + return inputProps; + }; + + var copyStyles = function copyStyles(styles, node) { + node.style.fontSize = styles.fontSize; + node.style.fontFamily = styles.fontFamily; + node.style.fontWeight = styles.fontWeight; + node.style.fontStyle = styles.fontStyle; + node.style.letterSpacing = styles.letterSpacing; + node.style.textTransform = styles.textTransform; + }; + + var isIE = typeof window !== 'undefined' && window.navigator ? /MSIE |Trident\/|Edge\//.test(window.navigator.userAgent) : false; + + var generateId = function generateId() { + // we only need an auto-generated ID for stylesheet injection, which is only + // used for IE. so if the browser is not IE, this should return undefined. + return isIE ? '_' + Math.random().toString(36).substr(2, 12) : undefined; + }; + + var AutosizeInput = function (_Component) { + _inherits(AutosizeInput, _Component); + + function AutosizeInput(props) { + _classCallCheck(this, AutosizeInput); + + var _this = _possibleConstructorReturn(this, (AutosizeInput.__proto__ || Object.getPrototypeOf(AutosizeInput)).call(this, props)); + + _this.inputRef = function (el) { + _this.input = el; + if (typeof _this.props.inputRef === 'function') { + _this.props.inputRef(el); + } + }; + + _this.placeHolderSizerRef = function (el) { + _this.placeHolderSizer = el; + }; + + _this.sizerRef = function (el) { + _this.sizer = el; + }; + + _this.state = { + inputWidth: props.minWidth, + inputId: props.id || generateId() + }; + return _this; + } + + _createClass(AutosizeInput, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.mounted = true; + this.copyInputStyles(); + this.updateInputWidth(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var id = nextProps.id; + + if (id !== this.props.id) { + this.setState({ inputId: id || generateId() }); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps, prevState) { + if (prevState.inputWidth !== this.state.inputWidth) { + if (typeof this.props.onAutosize === 'function') { + this.props.onAutosize(this.state.inputWidth); + } + } + this.updateInputWidth(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.mounted = false; + } + }, { + key: 'copyInputStyles', + value: function copyInputStyles() { + if (!this.mounted || !window.getComputedStyle) { + return; + } + var inputStyles = this.input && window.getComputedStyle(this.input); + if (!inputStyles) { + return; + } + copyStyles(inputStyles, this.sizer); + if (this.placeHolderSizer) { + copyStyles(inputStyles, this.placeHolderSizer); + } + } + }, { + key: 'updateInputWidth', + value: function updateInputWidth() { + if (!this.mounted || !this.sizer || typeof this.sizer.scrollWidth === 'undefined') { + return; + } + var newInputWidth = void 0; + if (this.props.placeholder && (!this.props.value || this.props.value && this.props.placeholderIsMinWidth)) { + newInputWidth = Math.max(this.sizer.scrollWidth, this.placeHolderSizer.scrollWidth) + 2; + } else { + newInputWidth = this.sizer.scrollWidth + 2; + } + // add extraWidth to the detected width. for number types, this defaults to 16 to allow for the stepper UI + var extraWidth = this.props.type === 'number' && this.props.extraWidth === undefined ? 16 : parseInt(this.props.extraWidth) || 0; + newInputWidth += extraWidth; + if (newInputWidth < this.props.minWidth) { + newInputWidth = this.props.minWidth; + } + if (newInputWidth !== this.state.inputWidth) { + this.setState({ + inputWidth: newInputWidth + }); + } + } + }, { + key: 'getInput', + value: function getInput() { + return this.input; + } + }, { + key: 'focus', + value: function focus() { + this.input.focus(); + } + }, { + key: 'blur', + value: function blur() { + this.input.blur(); + } + }, { + key: 'select', + value: function select() { + this.input.select(); + } + }, { + key: 'renderStyles', + value: function renderStyles() { + // this method injects styles to hide IE's clear indicator, which messes + // with input size detection. the stylesheet is only injected when the + // browser is IE, and can also be disabled by the `injectStyles` prop. + var injectStyles = this.props.injectStyles; + + return isIE && injectStyles ? _react2.default.createElement('style', { dangerouslySetInnerHTML: { + __html: 'input#' + this.state.inputId + '::-ms-clear {display: none;}' + } }) : null; + } + }, { + key: 'render', + value: function render() { + var sizerValue = [this.props.defaultValue, this.props.value, ''].reduce(function (previousValue, currentValue) { + if (previousValue !== null && previousValue !== undefined) { + return previousValue; + } + return currentValue; + }); + + var wrapperStyle = _extends({}, this.props.style); + if (!wrapperStyle.display) wrapperStyle.display = 'inline-block'; + + var inputStyle = _extends({ + boxSizing: 'content-box', + width: this.state.inputWidth + 'px' + }, this.props.inputStyle); + + var inputProps = _objectWithoutProperties(this.props, []); + + cleanInputProps(inputProps); + inputProps.className = this.props.inputClassName; + inputProps.id = this.state.inputId; + inputProps.style = inputStyle; + + return _react2.default.createElement( + 'div', + { className: this.props.className, style: wrapperStyle }, + this.renderStyles(), + _react2.default.createElement('input', _extends({}, inputProps, { ref: this.inputRef })), + _react2.default.createElement( + 'div', + { ref: this.sizerRef, style: sizerStyle }, + sizerValue + ), + this.props.placeholder ? _react2.default.createElement( + 'div', + { ref: this.placeHolderSizerRef, style: sizerStyle }, + this.props.placeholder + ) : null + ); + } + }]); + + return AutosizeInput; + }(React__default.Component); + + AutosizeInput.propTypes = { + className: _propTypes2.default.string, // className for the outer element + defaultValue: _propTypes2.default.any, // default field value + extraWidth: _propTypes2.default.oneOfType([// additional width for input element + _propTypes2.default.number, _propTypes2.default.string]), + id: _propTypes2.default.string, // id to use for the input, can be set for consistent snapshots + injectStyles: _propTypes2.default.bool, // inject the custom stylesheet to hide clear UI, defaults to true + inputClassName: _propTypes2.default.string, // className for the input element + inputRef: _propTypes2.default.func, // ref callback for the input element + inputStyle: _propTypes2.default.object, // css styles for the input element + minWidth: _propTypes2.default.oneOfType([// minimum width for input element + _propTypes2.default.number, _propTypes2.default.string]), + onAutosize: _propTypes2.default.func, // onAutosize handler: function(newWidth) {} + onChange: _propTypes2.default.func, // onChange handler: function(event) {} + placeholder: _propTypes2.default.string, // placeholder text + placeholderIsMinWidth: _propTypes2.default.bool, // don't collapse size to less than the placeholder + style: _propTypes2.default.object, // css styles for the outer element + value: _propTypes2.default.any // field value + }; + AutosizeInput.defaultProps = { + minWidth: 1, + injectStyles: true + }; + + exports.default = AutosizeInput; + }); + + var AutosizeInput = unwrapExports(AutosizeInput_1); + + var interopRequireDefault = createCommonjsModule(function (module) { + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + + module.exports = _interopRequireDefault; + }); + + unwrapExports(interopRequireDefault); + + var hasClass_1 = createCommonjsModule(function (module, exports) { + + exports.__esModule = true; + exports.default = hasClass; + + function hasClass(element, className) { + if (element.classList) return !!className && element.classList.contains(className);else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1; + } + + module.exports = exports["default"]; + }); + + unwrapExports(hasClass_1); + + var addClass_1 = createCommonjsModule(function (module, exports) { + + + + exports.__esModule = true; + exports.default = addClass; + + var _hasClass = interopRequireDefault(hasClass_1); + + function addClass(element, className) { + if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className); + } + + module.exports = exports["default"]; + }); + + unwrapExports(addClass_1); + + function replaceClassName(origClass, classToRemove) { + return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, ''); + } + + var removeClass = function removeClass(element, className) { + if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className)); + }; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + function componentWillMount() { + // Call this.constructor.gDSFP to support sub-classes. + var state = this.constructor.getDerivedStateFromProps(this.props, this.state); + if (state !== null && state !== undefined) { + this.setState(state); + } + } + + function componentWillReceiveProps(nextProps) { + // Call this.constructor.gDSFP to support sub-classes. + // Use the setState() updater to ensure state isn't stale in certain edge cases. + function updater(prevState) { + var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); + return state !== null && state !== undefined ? state : null; + } + // Binding "this" is important for shallow renderer support. + this.setState(updater.bind(this)); + } + + function componentWillUpdate(nextProps, nextState) { + try { + var prevProps = this.props; + var prevState = this.state; + this.props = nextProps; + this.state = nextState; + this.__reactInternalSnapshotFlag = true; + this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate( + prevProps, + prevState + ); + } finally { + this.props = prevProps; + this.state = prevState; + } + } + + // React may warn about cWM/cWRP/cWU methods being deprecated. + // Add a flag to suppress these warnings for this special case. + componentWillMount.__suppressDeprecationWarning = true; + componentWillReceiveProps.__suppressDeprecationWarning = true; + componentWillUpdate.__suppressDeprecationWarning = true; + + function polyfill$1(Component) { + var prototype = Component.prototype; + + if (!prototype || !prototype.isReactComponent) { + throw new Error('Can only polyfill class components'); + } + + if ( + typeof Component.getDerivedStateFromProps !== 'function' && + typeof prototype.getSnapshotBeforeUpdate !== 'function' + ) { + return Component; + } + + // If new component APIs are defined, "unsafe" lifecycles won't be called. + // Error if any of these lifecycles are present, + // Because they would work differently between older and newer (16.3+) versions of React. + var foundWillMountName = null; + var foundWillReceivePropsName = null; + var foundWillUpdateName = null; + if (typeof prototype.componentWillMount === 'function') { + foundWillMountName = 'componentWillMount'; + } else if (typeof prototype.UNSAFE_componentWillMount === 'function') { + foundWillMountName = 'UNSAFE_componentWillMount'; + } + if (typeof prototype.componentWillReceiveProps === 'function') { + foundWillReceivePropsName = 'componentWillReceiveProps'; + } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') { + foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; + } + if (typeof prototype.componentWillUpdate === 'function') { + foundWillUpdateName = 'componentWillUpdate'; + } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') { + foundWillUpdateName = 'UNSAFE_componentWillUpdate'; + } + if ( + foundWillMountName !== null || + foundWillReceivePropsName !== null || + foundWillUpdateName !== null + ) { + var componentName = Component.displayName || Component.name; + var newApiName = + typeof Component.getDerivedStateFromProps === 'function' + ? 'getDerivedStateFromProps()' + : 'getSnapshotBeforeUpdate()'; + + throw Error( + 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + + componentName + + ' uses ' + + newApiName + + ' but also contains the following legacy lifecycles:' + + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + + (foundWillReceivePropsName !== null + ? '\n ' + foundWillReceivePropsName + : '') + + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + + 'https://fb.me/react-async-component-lifecycle-hooks' + ); + } + + // React <= 16.2 does not support static getDerivedStateFromProps. + // As a workaround, use cWM and cWRP to invoke the new static lifecycle. + // Newer versions of React will ignore these lifecycles if gDSFP exists. + if (typeof Component.getDerivedStateFromProps === 'function') { + prototype.componentWillMount = componentWillMount; + prototype.componentWillReceiveProps = componentWillReceiveProps; + } + + // React <= 16.2 does not support getSnapshotBeforeUpdate. + // As a workaround, use cWU to invoke the new lifecycle. + // Newer versions of React will ignore that lifecycle if gSBU exists. + if (typeof prototype.getSnapshotBeforeUpdate === 'function') { + if (typeof prototype.componentDidUpdate !== 'function') { + throw new Error( + 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype' + ); + } + + prototype.componentWillUpdate = componentWillUpdate; + + var componentDidUpdate = prototype.componentDidUpdate; + + prototype.componentDidUpdate = function componentDidUpdatePolyfill( + prevProps, + prevState, + maybeSnapshot + ) { + // 16.3+ will not execute our will-update method; + // It will pass a snapshot value to did-update though. + // Older versions will require our polyfilled will-update value. + // We need to handle both cases, but can't just check for the presence of "maybeSnapshot", + // Because for <= 15.x versions this might be a "prevContext" object. + // We also can't just check "__reactInternalSnapshot", + // Because get-snapshot might return a falsy value. + // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior. + var snapshot = this.__reactInternalSnapshotFlag + ? this.__reactInternalSnapshot + : maybeSnapshot; + + componentDidUpdate.call(this, prevProps, prevState, snapshot); + }; + } + + return Component; + } + + var reactLifecyclesCompat_es = /*#__PURE__*/Object.freeze({ + polyfill: polyfill$1 + }); + + var PropTypes = createCommonjsModule(function (module, exports) { + + exports.__esModule = true; + exports.classNamesShape = exports.timeoutsShape = void 0; + + var _propTypes = _interopRequireDefault(PropTypes$1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var timeoutsShape = _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({ + enter: _propTypes.default.number, + exit: _propTypes.default.number, + appear: _propTypes.default.number + }).isRequired]); + exports.timeoutsShape = timeoutsShape; + var classNamesShape = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({ + enter: _propTypes.default.string, + exit: _propTypes.default.string, + active: _propTypes.default.string + }), _propTypes.default.shape({ + enter: _propTypes.default.string, + enterDone: _propTypes.default.string, + enterActive: _propTypes.default.string, + exit: _propTypes.default.string, + exitDone: _propTypes.default.string, + exitActive: _propTypes.default.string + })]); + exports.classNamesShape = classNamesShape; + }); + + unwrapExports(PropTypes); + var PropTypes_1 = PropTypes.classNamesShape; + var PropTypes_2 = PropTypes.timeoutsShape; + + var Transition_1 = createCommonjsModule(function (module, exports) { + + exports.__esModule = true; + exports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0; + + var PropTypes$2 = _interopRequireWildcard(PropTypes$1); + + var _react = _interopRequireDefault(React__default); + + var _reactDom = _interopRequireDefault(reactDom__default); + + + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + + var UNMOUNTED = 'unmounted'; + exports.UNMOUNTED = UNMOUNTED; + var EXITED = 'exited'; + exports.EXITED = EXITED; + var ENTERING = 'entering'; + exports.ENTERING = ENTERING; + var ENTERED = 'entered'; + exports.ENTERED = ENTERED; + var EXITING = 'exiting'; + /** + * The Transition component lets you describe a transition from one component + * state to another _over time_ with a simple declarative API. Most commonly + * it's used to animate the mounting and unmounting of a component, but can also + * be used to describe in-place transition states as well. + * + * --- + * + * **Note**: `Transition` is a platform-agnostic base component. If you're using + * transitions in CSS, you'll probably want to use + * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition) + * instead. It inherits all the features of `Transition`, but contains + * additional features necessary to play nice with CSS transitions (hence the + * name of the component). + * + * --- + * + * By default the `Transition` component does not alter the behavior of the + * component it renders, it only tracks "enter" and "exit" states for the + * components. It's up to you to give meaning and effect to those states. For + * example we can add styles to a component when it enters or exits: + * + * ```jsx + * import { Transition } from 'react-transition-group'; + * + * const duration = 300; + * + * const defaultStyle = { + * transition: `opacity ${duration}ms ease-in-out`, + * opacity: 0, + * } + * + * const transitionStyles = { + * entering: { opacity: 0 }, + * entered: { opacity: 1 }, + * }; + * + * const Fade = ({ in: inProp }) => ( + * + * {state => ( + *
+ * I'm a fade Transition! + *
+ * )} + *
+ * ); + * ``` + * + * There are 4 main states a Transition can be in: + * - `'entering'` + * - `'entered'` + * - `'exiting'` + * - `'exited'` + * + * Transition state is toggled via the `in` prop. When `true` the component + * begins the "Enter" stage. During this stage, the component will shift from + * its current transition state, to `'entering'` for the duration of the + * transition and then to the `'entered'` stage once it's complete. Let's take + * the following example (we'll use the + * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook): + * + * ```jsx + * function App() { + * const [inProp, setInProp] = useState(false); + * return ( + *
+ * + * {state => ( + * // ... + * )} + * + * + *
+ * ); + * } + * ``` + * + * When the button is clicked the component will shift to the `'entering'` state + * and stay there for 500ms (the value of `timeout`) before it finally switches + * to `'entered'`. + * + * When `in` is `false` the same thing happens except the state moves from + * `'exiting'` to `'exited'`. + */ + + exports.EXITING = EXITING; + + var Transition = + /*#__PURE__*/ + function (_React$Component) { + _inheritsLoose(Transition, _React$Component); + + function Transition(props, context) { + var _this; + + _this = _React$Component.call(this, props, context) || this; + var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears + + var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear; + var initialStatus; + _this.appearStatus = null; + + if (props.in) { + if (appear) { + initialStatus = EXITED; + _this.appearStatus = ENTERING; + } else { + initialStatus = ENTERED; + } + } else { + if (props.unmountOnExit || props.mountOnEnter) { + initialStatus = UNMOUNTED; + } else { + initialStatus = EXITED; + } + } + + _this.state = { + status: initialStatus + }; + _this.nextCallback = null; + return _this; + } + + var _proto = Transition.prototype; + + _proto.getChildContext = function getChildContext() { + return { + transitionGroup: null // allows for nested Transitions + + }; + }; + + Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) { + var nextIn = _ref.in; + + if (nextIn && prevState.status === UNMOUNTED) { + return { + status: EXITED + }; + } + + return null; + }; // getSnapshotBeforeUpdate(prevProps) { + // let nextStatus = null + // if (prevProps !== this.props) { + // const { status } = this.state + // if (this.props.in) { + // if (status !== ENTERING && status !== ENTERED) { + // nextStatus = ENTERING + // } + // } else { + // if (status === ENTERING || status === ENTERED) { + // nextStatus = EXITING + // } + // } + // } + // return { nextStatus } + // } + + + _proto.componentDidMount = function componentDidMount() { + this.updateStatus(true, this.appearStatus); + }; + + _proto.componentDidUpdate = function componentDidUpdate(prevProps) { + var nextStatus = null; + + if (prevProps !== this.props) { + var status = this.state.status; + + if (this.props.in) { + if (status !== ENTERING && status !== ENTERED) { + nextStatus = ENTERING; + } + } else { + if (status === ENTERING || status === ENTERED) { + nextStatus = EXITING; + } + } + } + + this.updateStatus(false, nextStatus); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + this.cancelNextCallback(); + }; + + _proto.getTimeouts = function getTimeouts() { + var timeout = this.props.timeout; + var exit, enter, appear; + exit = enter = appear = timeout; + + if (timeout != null && typeof timeout !== 'number') { + exit = timeout.exit; + enter = timeout.enter; // TODO: remove fallback for next major + + appear = timeout.appear !== undefined ? timeout.appear : enter; + } + + return { + exit: exit, + enter: enter, + appear: appear + }; + }; + + _proto.updateStatus = function updateStatus(mounting, nextStatus) { + if (mounting === void 0) { + mounting = false; + } + + if (nextStatus !== null) { + // nextStatus will always be ENTERING or EXITING. + this.cancelNextCallback(); + + var node = _reactDom.default.findDOMNode(this); + + if (nextStatus === ENTERING) { + this.performEnter(node, mounting); + } else { + this.performExit(node); + } + } else if (this.props.unmountOnExit && this.state.status === EXITED) { + this.setState({ + status: UNMOUNTED + }); + } + }; + + _proto.performEnter = function performEnter(node, mounting) { + var _this2 = this; + + var enter = this.props.enter; + var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting; + var timeouts = this.getTimeouts(); + var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED + // if we are mounting and running this it means appear _must_ be set + + if (!mounting && !enter) { + this.safeSetState({ + status: ENTERED + }, function () { + _this2.props.onEntered(node); + }); + return; + } + + this.props.onEnter(node, appearing); + this.safeSetState({ + status: ENTERING + }, function () { + _this2.props.onEntering(node, appearing); + + _this2.onTransitionEnd(node, enterTimeout, function () { + _this2.safeSetState({ + status: ENTERED + }, function () { + _this2.props.onEntered(node, appearing); + }); + }); + }); + }; + + _proto.performExit = function performExit(node) { + var _this3 = this; + + var exit = this.props.exit; + var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED + + if (!exit) { + this.safeSetState({ + status: EXITED + }, function () { + _this3.props.onExited(node); + }); + return; + } + + this.props.onExit(node); + this.safeSetState({ + status: EXITING + }, function () { + _this3.props.onExiting(node); + + _this3.onTransitionEnd(node, timeouts.exit, function () { + _this3.safeSetState({ + status: EXITED + }, function () { + _this3.props.onExited(node); + }); + }); + }); + }; + + _proto.cancelNextCallback = function cancelNextCallback() { + if (this.nextCallback !== null) { + this.nextCallback.cancel(); + this.nextCallback = null; + } + }; + + _proto.safeSetState = function safeSetState(nextState, callback) { + // This shouldn't be necessary, but there are weird race conditions with + // setState callbacks and unmounting in testing, so always make sure that + // we can cancel any pending setState callbacks after we unmount. + callback = this.setNextCallback(callback); + this.setState(nextState, callback); + }; + + _proto.setNextCallback = function setNextCallback(callback) { + var _this4 = this; + + var active = true; + + this.nextCallback = function (event) { + if (active) { + active = false; + _this4.nextCallback = null; + callback(event); + } + }; + + this.nextCallback.cancel = function () { + active = false; + }; + + return this.nextCallback; + }; + + _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) { + this.setNextCallback(handler); + var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener; + + if (!node || doesNotHaveTimeoutOrListener) { + setTimeout(this.nextCallback, 0); + return; + } + + if (this.props.addEndListener) { + this.props.addEndListener(node, this.nextCallback); + } + + if (timeout != null) { + setTimeout(this.nextCallback, timeout); + } + }; + + _proto.render = function render() { + var status = this.state.status; + + if (status === UNMOUNTED) { + return null; + } + + var _this$props = this.props, + children = _this$props.children, + childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]); // filter props for Transtition + + + delete childProps.in; + delete childProps.mountOnEnter; + delete childProps.unmountOnExit; + delete childProps.appear; + delete childProps.enter; + delete childProps.exit; + delete childProps.timeout; + delete childProps.addEndListener; + delete childProps.onEnter; + delete childProps.onEntering; + delete childProps.onEntered; + delete childProps.onExit; + delete childProps.onExiting; + delete childProps.onExited; + + if (typeof children === 'function') { + return children(status, childProps); + } + + var child = _react.default.Children.only(children); + + return _react.default.cloneElement(child, childProps); + }; + + return Transition; + }(_react.default.Component); + + Transition.contextTypes = { + transitionGroup: PropTypes$2.object + }; + Transition.childContextTypes = { + transitionGroup: function transitionGroup() {} + }; + Transition.propTypes = { + /** + * A `function` child can be used instead of a React element. This function is + * called with the current transition status (`'entering'`, `'entered'`, + * `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context + * specific props to a component. + * + * ```jsx + * + * {state => ( + * + * )} + * + * ``` + */ + children: PropTypes$2.oneOfType([PropTypes$2.func.isRequired, PropTypes$2.element.isRequired]).isRequired, + + /** + * Show the component; triggers the enter or exit states + */ + in: PropTypes$2.bool, + + /** + * By default the child component is mounted immediately along with + * the parent `Transition` component. If you want to "lazy mount" the component on the + * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay + * mounted, even on "exited", unless you also specify `unmountOnExit`. + */ + mountOnEnter: PropTypes$2.bool, + + /** + * By default the child component stays mounted after it reaches the `'exited'` state. + * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting. + */ + unmountOnExit: PropTypes$2.bool, + + /** + * Normally a component is not transitioned if it is shown when the `` component mounts. + * If you want to transition on the first mount set `appear` to `true`, and the + * component will transition in as soon as the `` mounts. + * + * > Note: there are no specific "appear" states. `appear` only adds an additional `enter` transition. + */ + appear: PropTypes$2.bool, + + /** + * Enable or disable enter transitions. + */ + enter: PropTypes$2.bool, + + /** + * Enable or disable exit transitions. + */ + exit: PropTypes$2.bool, + + /** + * The duration of the transition, in milliseconds. + * Required unless `addEndListener` is provided. + * + * You may specify a single timeout for all transitions: + * + * ```jsx + * timeout={500} + * ``` + * + * or individually: + * + * ```jsx + * timeout={{ + * appear: 500, + * enter: 300, + * exit: 500, + * }} + * ``` + * + * - `appear` defaults to the value of `enter` + * - `enter` defaults to `0` + * - `exit` defaults to `0` + * + * @type {number | { enter?: number, exit?: number, appear?: number }} + */ + timeout: function timeout(props) { + var pt = PropTypes.timeoutsShape; if (!props.addEndListener) pt = pt.isRequired; + + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return pt.apply(void 0, [props].concat(args)); + }, + + /** + * Add a custom transition end trigger. Called with the transitioning + * DOM node and a `done` callback. Allows for more fine grained transition end + * logic. **Note:** Timeouts are still used as a fallback if provided. + * + * ```jsx + * addEndListener={(node, done) => { + * // use the css transitionend event to mark the finish of a transition + * node.addEventListener('transitionend', done, false); + * }} + * ``` + */ + addEndListener: PropTypes$2.func, + + /** + * Callback fired before the "entering" status is applied. An extra parameter + * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount + * + * @type Function(node: HtmlElement, isAppearing: bool) -> void + */ + onEnter: PropTypes$2.func, + + /** + * Callback fired after the "entering" status is applied. An extra parameter + * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount + * + * @type Function(node: HtmlElement, isAppearing: bool) + */ + onEntering: PropTypes$2.func, + + /** + * Callback fired after the "entered" status is applied. An extra parameter + * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount + * + * @type Function(node: HtmlElement, isAppearing: bool) -> void + */ + onEntered: PropTypes$2.func, + + /** + * Callback fired before the "exiting" status is applied. + * + * @type Function(node: HtmlElement) -> void + */ + onExit: PropTypes$2.func, + + /** + * Callback fired after the "exiting" status is applied. + * + * @type Function(node: HtmlElement) -> void + */ + onExiting: PropTypes$2.func, + + /** + * Callback fired after the "exited" status is applied. + * + * @type Function(node: HtmlElement) -> void + */ + onExited: PropTypes$2.func // Name the function so it is clearer in the documentation + + }; + + function noop() {} + + Transition.defaultProps = { + in: false, + mountOnEnter: false, + unmountOnExit: false, + appear: false, + enter: true, + exit: true, + onEnter: noop, + onEntering: noop, + onEntered: noop, + onExit: noop, + onExiting: noop, + onExited: noop + }; + Transition.UNMOUNTED = 0; + Transition.EXITED = 1; + Transition.ENTERING = 2; + Transition.ENTERED = 3; + Transition.EXITING = 4; + + var _default = (0, reactLifecyclesCompat_es.polyfill)(Transition); + + exports.default = _default; + }); + + unwrapExports(Transition_1); + var Transition_2 = Transition_1.EXITING; + var Transition_3 = Transition_1.ENTERED; + var Transition_4 = Transition_1.ENTERING; + var Transition_5 = Transition_1.EXITED; + var Transition_6 = Transition_1.UNMOUNTED; + + var CSSTransition_1 = createCommonjsModule(function (module, exports) { + + exports.__esModule = true; + exports.default = void 0; + + var PropTypes$2 = _interopRequireWildcard(PropTypes$1); + + var _addClass = _interopRequireDefault(addClass_1); + + var _removeClass = _interopRequireDefault(removeClass); + + var _react = _interopRequireDefault(React__default); + + var _Transition = _interopRequireDefault(Transition_1); + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + + var addClass = function addClass(node, classes) { + return node && classes && classes.split(' ').forEach(function (c) { + return (0, _addClass.default)(node, c); + }); + }; + + var removeClass$1 = function removeClass(node, classes) { + return node && classes && classes.split(' ').forEach(function (c) { + return (0, _removeClass.default)(node, c); + }); + }; + /** + * A transition component inspired by the excellent + * [ng-animate](http://www.nganimate.org/) library, you should use it if you're + * using CSS transitions or animations. It's built upon the + * [`Transition`](https://reactcommunity.org/react-transition-group/transition) + * component, so it inherits all of its props. + * + * `CSSTransition` applies a pair of class names during the `appear`, `enter`, + * and `exit` states of the transition. The first class is applied and then a + * second `*-active` class in order to activate the CSSS transition. After the + * transition, matching `*-done` class names are applied to persist the + * transition state. + * + * ```jsx + * function App() { + * const [inProp, setInProp] = useState(false); + * return ( + *
+ * + *
+ * {"I'll receive my-node-* classes"} + *
+ *
+ * + *
+ * ); + * } + * ``` + * + * When the `in` prop is set to `true`, the child component will first receive + * the class `example-enter`, then the `example-enter-active` will be added in + * the next tick. `CSSTransition` [forces a + * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215) + * between before adding the `example-enter-active`. This is an important trick + * because it allows us to transition between `example-enter` and + * `example-enter-active` even though they were added immediately one after + * another. Most notably, this is what makes it possible for us to animate + * _appearance_. + * + * ```css + * .my-node-enter { + * opacity: 0; + * } + * .my-node-enter-active { + * opacity: 1; + * transition: opacity 200ms; + * } + * .my-node-exit { + * opacity: 1; + * } + * .my-node-exit-active { + * opacity: 0; + * transition: opacity: 200ms; + * } + * ``` + * + * `*-active` classes represent which styles you want to animate **to**. + */ + + + var CSSTransition = + /*#__PURE__*/ + function (_React$Component) { + _inheritsLoose(CSSTransition, _React$Component); + + function CSSTransition() { + var _this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; + + _this.onEnter = function (node, appearing) { + var _this$getClassNames = _this.getClassNames(appearing ? 'appear' : 'enter'), + className = _this$getClassNames.className; + + _this.removeClasses(node, 'exit'); + + addClass(node, className); + + if (_this.props.onEnter) { + _this.props.onEnter(node, appearing); + } + }; + + _this.onEntering = function (node, appearing) { + var _this$getClassNames2 = _this.getClassNames(appearing ? 'appear' : 'enter'), + activeClassName = _this$getClassNames2.activeClassName; + + _this.reflowAndAddClass(node, activeClassName); + + if (_this.props.onEntering) { + _this.props.onEntering(node, appearing); + } + }; + + _this.onEntered = function (node, appearing) { + var _this$getClassNames3 = _this.getClassNames('enter'), + doneClassName = _this$getClassNames3.doneClassName; + + _this.removeClasses(node, appearing ? 'appear' : 'enter'); + + addClass(node, doneClassName); + + if (_this.props.onEntered) { + _this.props.onEntered(node, appearing); + } + }; + + _this.onExit = function (node) { + var _this$getClassNames4 = _this.getClassNames('exit'), + className = _this$getClassNames4.className; + + _this.removeClasses(node, 'appear'); + + _this.removeClasses(node, 'enter'); + + addClass(node, className); + + if (_this.props.onExit) { + _this.props.onExit(node); + } + }; + + _this.onExiting = function (node) { + var _this$getClassNames5 = _this.getClassNames('exit'), + activeClassName = _this$getClassNames5.activeClassName; + + _this.reflowAndAddClass(node, activeClassName); + + if (_this.props.onExiting) { + _this.props.onExiting(node); + } + }; + + _this.onExited = function (node) { + var _this$getClassNames6 = _this.getClassNames('exit'), + doneClassName = _this$getClassNames6.doneClassName; + + _this.removeClasses(node, 'exit'); + + addClass(node, doneClassName); + + if (_this.props.onExited) { + _this.props.onExited(node); + } + }; + + _this.getClassNames = function (type) { + var classNames = _this.props.classNames; + var isStringClassNames = typeof classNames === 'string'; + var prefix = isStringClassNames && classNames ? classNames + '-' : ''; + var className = isStringClassNames ? prefix + type : classNames[type]; + var activeClassName = isStringClassNames ? className + '-active' : classNames[type + 'Active']; + var doneClassName = isStringClassNames ? className + '-done' : classNames[type + 'Done']; + return { + className: className, + activeClassName: activeClassName, + doneClassName: doneClassName + }; + }; + + return _this; + } + + var _proto = CSSTransition.prototype; + + _proto.removeClasses = function removeClasses(node, type) { + var _this$getClassNames7 = this.getClassNames(type), + className = _this$getClassNames7.className, + activeClassName = _this$getClassNames7.activeClassName, + doneClassName = _this$getClassNames7.doneClassName; + + className && removeClass$1(node, className); + activeClassName && removeClass$1(node, activeClassName); + doneClassName && removeClass$1(node, doneClassName); + }; + + _proto.reflowAndAddClass = function reflowAndAddClass(node, className) { + // This is for to force a repaint, + // which is necessary in order to transition styles when adding a class name. + if (className) { + /* eslint-disable no-unused-expressions */ + node && node.scrollTop; + /* eslint-enable no-unused-expressions */ + + addClass(node, className); + } + }; + + _proto.render = function render() { + var props = _extends({}, this.props); + + delete props.classNames; + return _react.default.createElement(_Transition.default, _extends({}, props, { + onEnter: this.onEnter, + onEntered: this.onEntered, + onEntering: this.onEntering, + onExit: this.onExit, + onExiting: this.onExiting, + onExited: this.onExited + })); + }; + + return CSSTransition; + }(_react.default.Component); + + CSSTransition.defaultProps = { + classNames: '' + }; + CSSTransition.propTypes = _extends({}, _Transition.default.propTypes, { + /** + * The animation classNames applied to the component as it enters, exits or has finished the transition. + * A single name can be provided and it will be suffixed for each stage: e.g. + * + * `classNames="fade"` applies `fade-enter`, `fade-enter-active`, `fade-enter-done`, + * `fade-exit`, `fade-exit-active`, `fade-exit-done`, `fade-appear`, and `fade-appear-active`. + * Each individual classNames can also be specified independently like: + * + * ```js + * classNames={{ + * appear: 'my-appear', + * appearActive: 'my-active-appear', + * enter: 'my-enter', + * enterActive: 'my-active-enter', + * enterDone: 'my-done-enter', + * exit: 'my-exit', + * exitActive: 'my-active-exit', + * exitDone: 'my-done-exit', + * }} + * ``` + * + * If you want to set these classes using CSS Modules: + * + * ```js + * import styles from './styles.css'; + * ``` + * + * you might want to use camelCase in your CSS file, that way could simply spread + * them instead of listing them one by one: + * + * ```js + * classNames={{ ...styles }} + * ``` + * + * @type {string | { + * appear?: string, + * appearActive?: string, + * enter?: string, + * enterActive?: string, + * enterDone?: string, + * exit?: string, + * exitActive?: string, + * exitDone?: string, + * }} + */ + classNames: PropTypes.classNamesShape, + + /** + * A `` callback fired immediately after the 'enter' or 'appear' class is + * applied. + * + * @type Function(node: HtmlElement, isAppearing: bool) + */ + onEnter: PropTypes$2.func, + + /** + * A `` callback fired immediately after the 'enter-active' or + * 'appear-active' class is applied. + * + * @type Function(node: HtmlElement, isAppearing: bool) + */ + onEntering: PropTypes$2.func, + + /** + * A `` callback fired immediately after the 'enter' or + * 'appear' classes are **removed** and the `done` class is added to the DOM node. + * + * @type Function(node: HtmlElement, isAppearing: bool) + */ + onEntered: PropTypes$2.func, + + /** + * A `` callback fired immediately after the 'exit' class is + * applied. + * + * @type Function(node: HtmlElement) + */ + onExit: PropTypes$2.func, + + /** + * A `` callback fired immediately after the 'exit-active' is applied. + * + * @type Function(node: HtmlElement) + */ + onExiting: PropTypes$2.func, + + /** + * A `` callback fired immediately after the 'exit' classes + * are **removed** and the `exit-done` class is added to the DOM node. + * + * @type Function(node: HtmlElement) + */ + onExited: PropTypes$2.func + }); + var _default = CSSTransition; + exports.default = _default; + module.exports = exports["default"]; + }); + + unwrapExports(CSSTransition_1); + + var ChildMapping = createCommonjsModule(function (module, exports) { + + exports.__esModule = true; + exports.getChildMapping = getChildMapping; + exports.mergeChildMappings = mergeChildMappings; + exports.getInitialChildMapping = getInitialChildMapping; + exports.getNextChildMapping = getNextChildMapping; + + + + /** + * Given `this.props.children`, return an object mapping key to child. + * + * @param {*} children `this.props.children` + * @return {object} Mapping of key to child + */ + function getChildMapping(children, mapFn) { + var mapper = function mapper(child) { + return mapFn && (0, React__default.isValidElement)(child) ? mapFn(child) : child; + }; + + var result = Object.create(null); + if (children) React__default.Children.map(children, function (c) { + return c; + }).forEach(function (child) { + // run the map function here instead so that the key is the computed one + result[child.key] = mapper(child); + }); + return result; + } + /** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ + + + function mergeChildMappings(prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + return key in next ? next[key] : prev[key]; + } // For each key of `next`, the list of keys to insert before that key in + // the combined list + + + var nextKeysPending = Object.create(null); + var pendingKeys = []; + + for (var prevKey in prev) { + if (prevKey in next) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } + } + + var i; + var childMapping = {}; + + for (var nextKey in next) { + if (nextKeysPending[nextKey]) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } + } + + childMapping[nextKey] = getValueForKey(nextKey); + } // Finally, add the keys which didn't appear before any key in `next` + + + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; + } + + function getProp(child, prop, props) { + return props[prop] != null ? props[prop] : child.props[prop]; + } + + function getInitialChildMapping(props, onExited) { + return getChildMapping(props.children, function (child) { + return (0, React__default.cloneElement)(child, { + onExited: onExited.bind(null, child), + in: true, + appear: getProp(child, 'appear', props), + enter: getProp(child, 'enter', props), + exit: getProp(child, 'exit', props) + }); + }); + } + + function getNextChildMapping(nextProps, prevChildMapping, onExited) { + var nextChildMapping = getChildMapping(nextProps.children); + var children = mergeChildMappings(prevChildMapping, nextChildMapping); + Object.keys(children).forEach(function (key) { + var child = children[key]; + if (!(0, React__default.isValidElement)(child)) return; + var hasPrev = key in prevChildMapping; + var hasNext = key in nextChildMapping; + var prevChild = prevChildMapping[key]; + var isLeaving = (0, React__default.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering) + + if (hasNext && (!hasPrev || isLeaving)) { + // console.log('entering', key) + children[key] = (0, React__default.cloneElement)(child, { + onExited: onExited.bind(null, child), + in: true, + exit: getProp(child, 'exit', nextProps), + enter: getProp(child, 'enter', nextProps) + }); + } else if (!hasNext && hasPrev && !isLeaving) { + // item is old (exiting) + // console.log('leaving', key) + children[key] = (0, React__default.cloneElement)(child, { + in: false + }); + } else if (hasNext && hasPrev && (0, React__default.isValidElement)(prevChild)) { + // item hasn't changed transition states + // copy over the last transition props; + // console.log('unchanged', key) + children[key] = (0, React__default.cloneElement)(child, { + onExited: onExited.bind(null, child), + in: prevChild.props.in, + exit: getProp(child, 'exit', nextProps), + enter: getProp(child, 'enter', nextProps) + }); + } + }); + return children; + } + }); + + unwrapExports(ChildMapping); + var ChildMapping_1 = ChildMapping.getChildMapping; + var ChildMapping_2 = ChildMapping.mergeChildMappings; + var ChildMapping_3 = ChildMapping.getInitialChildMapping; + var ChildMapping_4 = ChildMapping.getNextChildMapping; + + var TransitionGroup_1 = createCommonjsModule(function (module, exports) { + + exports.__esModule = true; + exports.default = void 0; + + var _propTypes = _interopRequireDefault(PropTypes$1); + + var _react = _interopRequireDefault(React__default); + + + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + var values = Object.values || function (obj) { + return Object.keys(obj).map(function (k) { + return obj[k]; + }); + }; + + var defaultProps = { + component: 'div', + childFactory: function childFactory(child) { + return child; + } + /** + * The `` component manages a set of transition components + * (`` and ``) in a list. Like with the transition + * components, `` is a state machine for managing the mounting + * and unmounting of components over time. + * + * Consider the example below. As items are removed or added to the TodoList the + * `in` prop is toggled automatically by the ``. + * + * Note that `` does not define any animation behavior! + * Exactly _how_ a list item animates is up to the individual transition + * component. This means you can mix and match animations across different list + * items. + */ + + }; + + var TransitionGroup = + /*#__PURE__*/ + function (_React$Component) { + _inheritsLoose(TransitionGroup, _React$Component); + + function TransitionGroup(props, context) { + var _this; + + _this = _React$Component.call(this, props, context) || this; + + var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear + + + _this.state = { + handleExited: handleExited, + firstRender: true + }; + return _this; + } + + var _proto = TransitionGroup.prototype; + + _proto.getChildContext = function getChildContext() { + return { + transitionGroup: { + isMounting: !this.appeared + } + }; + }; + + _proto.componentDidMount = function componentDidMount() { + this.appeared = true; + this.mounted = true; + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + this.mounted = false; + }; + + TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) { + var prevChildMapping = _ref.children, + handleExited = _ref.handleExited, + firstRender = _ref.firstRender; + return { + children: firstRender ? (0, ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited), + firstRender: false + }; + }; + + _proto.handleExited = function handleExited(child, node) { + var currentChildMapping = (0, ChildMapping.getChildMapping)(this.props.children); + if (child.key in currentChildMapping) return; + + if (child.props.onExited) { + child.props.onExited(node); + } + + if (this.mounted) { + this.setState(function (state) { + var children = _extends({}, state.children); + + delete children[child.key]; + return { + children: children + }; + }); + } + }; + + _proto.render = function render() { + var _this$props = this.props, + Component = _this$props.component, + childFactory = _this$props.childFactory, + props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]); + + var children = values(this.state.children).map(childFactory); + delete props.appear; + delete props.enter; + delete props.exit; + + if (Component === null) { + return children; + } + + return _react.default.createElement(Component, props, children); + }; + + return TransitionGroup; + }(_react.default.Component); + + TransitionGroup.childContextTypes = { + transitionGroup: _propTypes.default.object.isRequired + }; + TransitionGroup.propTypes = { + /** + * `` renders a `
` by default. You can change this + * behavior by providing a `component` prop. + * If you use React v16+ and would like to avoid a wrapping `
` element + * you can pass in `component={null}`. This is useful if the wrapping div + * borks your css styles. + */ + component: _propTypes.default.any, + + /** + * A set of `` components, that are toggled `in` and out as they + * leave. the `` will inject specific transition props, so + * remember to spread them through if you are wrapping the `` as + * with our `` example. + * + * While this component is meant for multiple `Transition` or `CSSTransition` + * children, sometimes you may want to have a single transition child with + * content that you want to be transitioned out and in when you change it + * (e.g. routes, images etc.) In that case you can change the `key` prop of + * the transition child as you change its content, this will cause + * `TransitionGroup` to transition the child out and back in. + */ + children: _propTypes.default.node, + + /** + * A convenience prop that enables or disables appear animations + * for all children. Note that specifying this will override any defaults set + * on individual children Transitions. + */ + appear: _propTypes.default.bool, + + /** + * A convenience prop that enables or disables enter animations + * for all children. Note that specifying this will override any defaults set + * on individual children Transitions. + */ + enter: _propTypes.default.bool, + + /** + * A convenience prop that enables or disables exit animations + * for all children. Note that specifying this will override any defaults set + * on individual children Transitions. + */ + exit: _propTypes.default.bool, + + /** + * You may need to apply reactive updates to a child as it is exiting. + * This is generally done by using `cloneElement` however in the case of an exiting + * child the element has already been removed and not accessible to the consumer. + * + * If you do need to update a child as it leaves you can provide a `childFactory` + * to wrap every child, even the ones that are leaving. + * + * @type Function(child: ReactElement) -> ReactElement + */ + childFactory: _propTypes.default.func + }; + TransitionGroup.defaultProps = defaultProps; + + var _default = (0, reactLifecyclesCompat_es.polyfill)(TransitionGroup); + + exports.default = _default; + module.exports = exports["default"]; + }); + + unwrapExports(TransitionGroup_1); + + var ReplaceTransition_1 = createCommonjsModule(function (module, exports) { + + exports.__esModule = true; + exports.default = void 0; + + var _propTypes = _interopRequireDefault(PropTypes$1); + + var _react = _interopRequireDefault(React__default); + + + + var _TransitionGroup = _interopRequireDefault(TransitionGroup_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + + /** + * The `` component is a specialized `Transition` component + * that animates between two children. + * + * ```jsx + * + *
I appear first
+ *
I replace the above
+ *
+ * ``` + */ + var ReplaceTransition = + /*#__PURE__*/ + function (_React$Component) { + _inheritsLoose(ReplaceTransition, _React$Component); + + function ReplaceTransition() { + var _this; + + for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) { + _args[_key] = arguments[_key]; + } + + _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this; + + _this.handleEnter = function () { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return _this.handleLifecycle('onEnter', 0, args); + }; + + _this.handleEntering = function () { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + return _this.handleLifecycle('onEntering', 0, args); + }; + + _this.handleEntered = function () { + for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + args[_key4] = arguments[_key4]; + } + + return _this.handleLifecycle('onEntered', 0, args); + }; + + _this.handleExit = function () { + for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { + args[_key5] = arguments[_key5]; + } + + return _this.handleLifecycle('onExit', 1, args); + }; + + _this.handleExiting = function () { + for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { + args[_key6] = arguments[_key6]; + } + + return _this.handleLifecycle('onExiting', 1, args); + }; + + _this.handleExited = function () { + for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { + args[_key7] = arguments[_key7]; + } + + return _this.handleLifecycle('onExited', 1, args); + }; + + return _this; + } + + var _proto = ReplaceTransition.prototype; + + _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) { + var _child$props; + + var children = this.props.children; + + var child = _react.default.Children.toArray(children)[idx]; + + if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs); + if (this.props[handler]) this.props[handler]((0, reactDom__default.findDOMNode)(this)); + }; + + _proto.render = function render() { + var _this$props = this.props, + children = _this$props.children, + inProp = _this$props.in, + props = _objectWithoutPropertiesLoose(_this$props, ["children", "in"]); + + var _React$Children$toArr = _react.default.Children.toArray(children), + first = _React$Children$toArr[0], + second = _React$Children$toArr[1]; + + delete props.onEnter; + delete props.onEntering; + delete props.onEntered; + delete props.onExit; + delete props.onExiting; + delete props.onExited; + return _react.default.createElement(_TransitionGroup.default, props, inProp ? _react.default.cloneElement(first, { + key: 'first', + onEnter: this.handleEnter, + onEntering: this.handleEntering, + onEntered: this.handleEntered + }) : _react.default.cloneElement(second, { + key: 'second', + onEnter: this.handleExit, + onEntering: this.handleExiting, + onEntered: this.handleExited + })); + }; + + return ReplaceTransition; + }(_react.default.Component); + + ReplaceTransition.propTypes = { + in: _propTypes.default.bool.isRequired, + children: function children(props, propName) { + if (_react.default.Children.count(props[propName]) !== 2) return new Error("\"" + propName + "\" must be exactly two transition components."); + return null; + } + }; + var _default = ReplaceTransition; + exports.default = _default; + module.exports = exports["default"]; + }); + + unwrapExports(ReplaceTransition_1); + + var reactTransitionGroup = createCommonjsModule(function (module) { + + var _CSSTransition = _interopRequireDefault(CSSTransition_1); + + var _ReplaceTransition = _interopRequireDefault(ReplaceTransition_1); + + var _TransitionGroup = _interopRequireDefault(TransitionGroup_1); + + var _Transition = _interopRequireDefault(Transition_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + module.exports = { + Transition: _Transition.default, + TransitionGroup: _TransitionGroup.default, + ReplaceTransition: _ReplaceTransition.default, + CSSTransition: _CSSTransition.default + }; + }); + + unwrapExports(reactTransitionGroup); + var reactTransitionGroup_1 = reactTransitionGroup.Transition; + var reactTransitionGroup_2 = reactTransitionGroup.TransitionGroup; + var reactTransitionGroup_3 = reactTransitionGroup.ReplaceTransition; + var reactTransitionGroup_4 = reactTransitionGroup.CSSTransition; + + function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); + } + + function _classCallCheck$1(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + function _defineProperties$1(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass$1(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); + if (staticProps) _defineProperties$1(Constructor, staticProps); + return Constructor; + } + + function _defineProperty$1(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _objectSpread$1(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + })); + } + + ownKeys.forEach(function (key) { + _defineProperty$1(target, key, source[key]); + }); + } + + return target; + } + + function _inherits$1(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; + } + + function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + + var target = _objectWithoutPropertiesLoose(source, excluded); + + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; + } + + function _assertThisInitialized$1(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + function _possibleConstructorReturn$1(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized$1(self); + } + + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); + } + + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } + } + + function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); + } + + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); + } + + // ============================== + // NO OP + // ============================== + var noop = function noop() {}; + // Class Name Prefixer + // ============================== + + /** + String representation of component state for styling with class names. + + Expects an array of strings OR a string/object pair: + - className(['comp', 'comp-arg', 'comp-arg-2']) + @returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2' + - className('comp', { some: true, state: false }) + @returns 'react-select__comp react-select__comp--some' + */ + + function applyPrefixToName(prefix, name) { + if (!name) { + return prefix; + } else if (name[0] === '-') { + return prefix + name; + } else { + return prefix + '__' + name; + } + } + + function classNames(prefix, cssKey, state, className) { + var arr = [cssKey, className]; + + if (state && prefix) { + for (var key in state) { + if (state.hasOwnProperty(key) && state[key]) { + arr.push("".concat(applyPrefixToName(prefix, key))); + } + } + } + + return arr.filter(function (i) { + return i; + }).map(function (i) { + return String(i).trim(); + }).join(' '); + } // ============================== + // Clean Value + // ============================== + + var cleanValue = function cleanValue(value) { + if (Array.isArray(value)) return value.filter(Boolean); + if (_typeof(value) === 'object' && value !== null) return [value]; + return []; + }; // ============================== + // Handle Input Change + // ============================== + + function handleInputChange(inputValue, actionMeta, onInputChange) { + if (onInputChange) { + var newValue = onInputChange(inputValue, actionMeta); + if (typeof newValue === 'string') return newValue; + } + + return inputValue; + } // ============================== + // Scroll Helpers + // ============================== + + function isDocumentElement(el) { + return [document.documentElement, document.body, window].indexOf(el) > -1; + } // Normalized Scroll Top + // ------------------------------ + + function getScrollTop(el) { + if (isDocumentElement(el)) { + return window.pageYOffset; + } + + return el.scrollTop; + } + function scrollTo(el, top) { + // with a scroll distance, we perform scroll on the element + if (isDocumentElement(el)) { + window.scrollTo(0, top); + return; + } + + el.scrollTop = top; + } // Get Scroll Parent + // ------------------------------ + + function getScrollParent(element) { + var style = getComputedStyle(element); + var excludeStaticParent = style.position === 'absolute'; + var overflowRx = /(auto|scroll)/; + var docEl = document.documentElement; // suck it, flow... + + if (style.position === 'fixed') return docEl; + + for (var parent = element; parent = parent.parentElement;) { + style = getComputedStyle(parent); + + if (excludeStaticParent && style.position === 'static') { + continue; + } + + if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) { + return parent; + } + } + + return docEl; + } // Animated Scroll To + // ------------------------------ + + /** + @param t: time (elapsed) + @param b: initial value + @param c: amount of change + @param d: duration + */ + + function easeOutCubic(t, b, c, d) { + return c * ((t = t / d - 1) * t * t + 1) + b; + } + + function animatedScrollTo(element, to) { + var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200; + var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop; + var start = getScrollTop(element); + var change = to - start; + var increment = 10; + var currentTime = 0; + + function animateScroll() { + currentTime += increment; + var val = easeOutCubic(currentTime, start, change, duration); + scrollTo(element, val); + + if (currentTime < duration) { + raf_1(animateScroll); + } else { + callback(element); + } + } + + animateScroll(); + } // Scroll Into View + // ------------------------------ + + function scrollIntoView(menuEl, focusedEl) { + var menuRect = menuEl.getBoundingClientRect(); + var focusedRect = focusedEl.getBoundingClientRect(); + var overScroll = focusedEl.offsetHeight / 3; + + if (focusedRect.bottom + overScroll > menuRect.bottom) { + scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight)); + } else if (focusedRect.top - overScroll < menuRect.top) { + scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0)); + } + } // ============================== + // Get bounding client object + // ============================== + // cannot get keys using array notation with DOMRect + + function getBoundingClientObj(element) { + var rect = element.getBoundingClientRect(); + return { + bottom: rect.bottom, + height: rect.height, + left: rect.left, + right: rect.right, + top: rect.top, + width: rect.width + }; + } + // Touch Capability Detector + // ============================== + + function isTouchCapable() { + try { + document.createEvent('TouchEvent'); + return true; + } catch (e) { + return false; + } + } // ============================== + // Mobile Device Detector + // ============================== + + function isMobileDevice() { + try { + return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); + } catch (e) { + return false; + } + } + + function getMenuPlacement(_ref) { + var maxHeight = _ref.maxHeight, + menuEl = _ref.menuEl, + minHeight = _ref.minHeight, + placement = _ref.placement, + shouldScroll = _ref.shouldScroll, + isFixedPosition = _ref.isFixedPosition, + theme = _ref.theme; + var spacing = theme.spacing; + var scrollParent = getScrollParent(menuEl); + var defaultState = { + placement: 'bottom', + maxHeight: maxHeight + }; // something went wrong, return default state + + if (!menuEl || !menuEl.offsetParent) return defaultState; // we can't trust `scrollParent.scrollHeight` --> it may increase when + // the menu is rendered + + var _scrollParent$getBoun = scrollParent.getBoundingClientRect(), + scrollHeight = _scrollParent$getBoun.height; + + var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(), + menuBottom = _menuEl$getBoundingCl.bottom, + menuHeight = _menuEl$getBoundingCl.height, + menuTop = _menuEl$getBoundingCl.top; + + var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(), + containerTop = _menuEl$offsetParent$.top; + + var viewHeight = window.innerHeight; + var scrollTop = getScrollTop(scrollParent); + var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10); + var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10); + var viewSpaceAbove = containerTop - marginTop; + var viewSpaceBelow = viewHeight - menuTop; + var scrollSpaceAbove = viewSpaceAbove + scrollTop; + var scrollSpaceBelow = scrollHeight - scrollTop - menuTop; + var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom; + var scrollUp = scrollTop + menuTop - marginTop; + var scrollDuration = 160; + + switch (placement) { + case 'auto': + case 'bottom': + // 1: the menu will fit, do nothing + if (viewSpaceBelow >= menuHeight) { + return { + placement: 'bottom', + maxHeight: maxHeight + }; + } // 2: the menu will fit, if scrolled + + + if (scrollSpaceBelow >= menuHeight && !isFixedPosition) { + if (shouldScroll) { + animatedScrollTo(scrollParent, scrollDown, scrollDuration); + } + + return { + placement: 'bottom', + maxHeight: maxHeight + }; + } // 3: the menu will fit, if constrained + + + if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) { + if (shouldScroll) { + animatedScrollTo(scrollParent, scrollDown, scrollDuration); + } // we want to provide as much of the menu as possible to the user, + // so give them whatever is available below rather than the minHeight. + + + var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom; + return { + placement: 'bottom', + maxHeight: constrainedHeight + }; + } // 4. Forked beviour when there isn't enough space below + // AUTO: flip the menu, render above + + + if (placement === 'auto' || isFixedPosition) { + // may need to be constrained after flipping + var _constrainedHeight = maxHeight; + var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove; + + if (spaceAbove >= minHeight) { + _constrainedHeight = Math.min(spaceAbove - marginBottom - spacing.controlHeight, maxHeight); + } + + return { + placement: 'top', + maxHeight: _constrainedHeight + }; + } // BOTTOM: allow browser to increase scrollable area and immediately set scroll + + + if (placement === 'bottom') { + scrollTo(scrollParent, scrollDown); + return { + placement: 'bottom', + maxHeight: maxHeight + }; + } + + break; + + case 'top': + // 1: the menu will fit, do nothing + if (viewSpaceAbove >= menuHeight) { + return { + placement: 'top', + maxHeight: maxHeight + }; + } // 2: the menu will fit, if scrolled + + + if (scrollSpaceAbove >= menuHeight && !isFixedPosition) { + if (shouldScroll) { + animatedScrollTo(scrollParent, scrollUp, scrollDuration); + } + + return { + placement: 'top', + maxHeight: maxHeight + }; + } // 3: the menu will fit, if constrained + + + if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) { + var _constrainedHeight2 = maxHeight; // we want to provide as much of the menu as possible to the user, + // so give them whatever is available below rather than the minHeight. + + if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) { + _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop; + } + + if (shouldScroll) { + animatedScrollTo(scrollParent, scrollUp, scrollDuration); + } + + return { + placement: 'top', + maxHeight: _constrainedHeight2 + }; + } // 4. not enough space, the browser WILL NOT increase scrollable area when + // absolutely positioned element rendered above the viewport (only below). + // Flip the menu, render below + + + return { + placement: 'bottom', + maxHeight: maxHeight + }; + + default: + throw new Error("Invalid placement provided \"".concat(placement, "\".")); + } // fulfil contract with flow: implicit return value of undefined + + + return defaultState; + } // Menu Component + // ------------------------------ + + function alignToControl(placement) { + var placementToCSSProp = { + bottom: 'top', + top: 'bottom' + }; + return placement ? placementToCSSProp[placement] : 'bottom'; + } + + var coercePlacement = function coercePlacement(p) { + return p === 'auto' ? 'bottom' : p; + }; + + var menuCSS = function menuCSS(_ref2) { + var _ref3; + + var placement = _ref2.placement, + _ref2$theme = _ref2.theme, + borderRadius = _ref2$theme.borderRadius, + spacing = _ref2$theme.spacing, + colors = _ref2$theme.colors; + return _ref3 = {}, _defineProperty$1(_ref3, alignToControl(placement), '100%'), _defineProperty$1(_ref3, "backgroundColor", colors.neutral0), _defineProperty$1(_ref3, "borderRadius", borderRadius), _defineProperty$1(_ref3, "boxShadow", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty$1(_ref3, "marginBottom", spacing.menuGutter), _defineProperty$1(_ref3, "marginTop", spacing.menuGutter), _defineProperty$1(_ref3, "position", 'absolute'), _defineProperty$1(_ref3, "width", '100%'), _defineProperty$1(_ref3, "zIndex", 1), _ref3; + }; // NOTE: internal only + + var MenuPlacer = + /*#__PURE__*/ + function (_Component) { + _inherits$1(MenuPlacer, _Component); + + function MenuPlacer() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck$1(this, MenuPlacer); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn$1(this, (_getPrototypeOf2 = _getPrototypeOf(MenuPlacer)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "state", { + maxHeight: _this.props.maxMenuHeight, + placement: null + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getPlacement", function (ref) { + var _this$props = _this.props, + minMenuHeight = _this$props.minMenuHeight, + maxMenuHeight = _this$props.maxMenuHeight, + menuPlacement = _this$props.menuPlacement, + menuPosition = _this$props.menuPosition, + menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView, + theme = _this$props.theme; + var getPortalPlacement = _this.context.getPortalPlacement; + if (!ref) return; // DO NOT scroll if position is fixed + + var isFixedPosition = menuPosition === 'fixed'; + var shouldScroll = menuShouldScrollIntoView && !isFixedPosition; + var state = getMenuPlacement({ + maxHeight: maxMenuHeight, + menuEl: ref, + minHeight: minMenuHeight, + placement: menuPlacement, + shouldScroll: shouldScroll, + isFixedPosition: isFixedPosition, + theme: theme + }); + if (getPortalPlacement) getPortalPlacement(state); + + _this.setState(state); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getUpdatedProps", function () { + var menuPlacement = _this.props.menuPlacement; + var placement = _this.state.placement || coercePlacement(menuPlacement); + return _objectSpread$1({}, _this.props, { + placement: placement, + maxHeight: _this.state.maxHeight + }); + }); + + return _this; + } + + _createClass$1(MenuPlacer, [{ + key: "render", + value: function render() { + var children = this.props.children; + return children({ + ref: this.getPlacement, + placerProps: this.getUpdatedProps() + }); + } + }]); + + return MenuPlacer; + }(React.Component); + + _defineProperty$1(MenuPlacer, "contextTypes", { + getPortalPlacement: PropTypes$1.func + }); + + var Menu = function Menu(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerRef = props.innerRef, + innerProps = props.innerProps; + var cn = cx( + /*#__PURE__*/ + css(getStyles('menu', props)), { + menu: true + }, className); + return React__default.createElement("div", _extends({ + className: cn + }, innerProps, { + ref: innerRef + }), children); + }; + // Menu List + // ============================== + + var menuListCSS = function menuListCSS(_ref4) { + var maxHeight = _ref4.maxHeight, + baseUnit = _ref4.theme.spacing.baseUnit; + return { + maxHeight: maxHeight, + overflowY: 'auto', + paddingBottom: baseUnit, + paddingTop: baseUnit, + position: 'relative', + // required for offset[Height, Top] > keyboard scroll + WebkitOverflowScrolling: 'touch' + }; + }; + var MenuList = function MenuList(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + isMulti = props.isMulti, + innerRef = props.innerRef; + return React__default.createElement("div", { + className: cx( + /*#__PURE__*/ + css(getStyles('menuList', props)), { + 'menu-list': true, + 'menu-list--is-multi': isMulti + }, className), + ref: innerRef + }, children); + }; // ============================== + // Menu Notices + // ============================== + + var noticeCSS = function noticeCSS(_ref5) { + var _ref5$theme = _ref5.theme, + baseUnit = _ref5$theme.spacing.baseUnit, + colors = _ref5$theme.colors; + return { + color: colors.neutral40, + padding: "".concat(baseUnit * 2, "px ").concat(baseUnit * 3, "px"), + textAlign: 'center' + }; + }; + + var noOptionsMessageCSS = noticeCSS; + var loadingMessageCSS = noticeCSS; + var NoOptionsMessage = function NoOptionsMessage(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return React__default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + css(getStyles('noOptionsMessage', props)), { + 'menu-notice': true, + 'menu-notice--no-options': true + }, className) + }, innerProps), children); + }; + NoOptionsMessage.defaultProps = { + children: 'No options' + }; + var LoadingMessage = function LoadingMessage(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return React__default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + css(getStyles('loadingMessage', props)), { + 'menu-notice': true, + 'menu-notice--loading': true + }, className) + }, innerProps), children); + }; + LoadingMessage.defaultProps = { + children: 'Loading...' + }; // ============================== + // Menu Portal + // ============================== + + var menuPortalCSS = function menuPortalCSS(_ref6) { + var rect = _ref6.rect, + offset = _ref6.offset, + position = _ref6.position; + return { + left: rect.left, + position: position, + top: offset, + width: rect.width, + zIndex: 1 + }; + }; + var MenuPortal = + /*#__PURE__*/ + function (_Component2) { + _inherits$1(MenuPortal, _Component2); + + function MenuPortal() { + var _getPrototypeOf3; + + var _this2; + + _classCallCheck$1(this, MenuPortal); + + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + _this2 = _possibleConstructorReturn$1(this, (_getPrototypeOf3 = _getPrototypeOf(MenuPortal)).call.apply(_getPrototypeOf3, [this].concat(args))); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this2)), "state", { + placement: null + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this2)), "getPortalPlacement", function (_ref7) { + var placement = _ref7.placement; + var initialPlacement = coercePlacement(_this2.props.menuPlacement); // avoid re-renders if the placement has not changed + + if (placement !== initialPlacement) { + _this2.setState({ + placement: placement + }); + } + }); + + return _this2; + } + + _createClass$1(MenuPortal, [{ + key: "getChildContext", + value: function getChildContext() { + return { + getPortalPlacement: this.getPortalPlacement + }; + } // callback for occassions where the menu must "flip" + + }, { + key: "render", + value: function render() { + var _this$props2 = this.props, + appendTo = _this$props2.appendTo, + children = _this$props2.children, + controlElement = _this$props2.controlElement, + menuPlacement = _this$props2.menuPlacement, + position = _this$props2.menuPosition, + getStyles = _this$props2.getStyles; + var isFixed = position === 'fixed'; // bail early if required elements aren't present + + if (!appendTo && !isFixed || !controlElement) { + return null; + } + + var placement = this.state.placement || coercePlacement(menuPlacement); + var rect = getBoundingClientObj(controlElement); + var scrollDistance = isFixed ? 0 : window.pageYOffset; + var offset = rect[placement] + scrollDistance; + var state = { + offset: offset, + position: position, + rect: rect + }; // same wrapper element whether fixed or portalled + + var menuWrapper = React__default.createElement("div", { + className: + /*#__PURE__*/ + + /*#__PURE__*/ + css(getStyles('menuPortal', state)) + }, children); + return appendTo ? reactDom.createPortal(menuWrapper, appendTo) : menuWrapper; + } + }]); + + return MenuPortal; + }(React.Component); + + _defineProperty$1(MenuPortal, "childContextTypes", { + getPortalPlacement: PropTypes$1.func + }); + + var isArray = Array.isArray; + var keyList = Object.keys; + var hasProp = Object.prototype.hasOwnProperty; + + function equal(a, b) { + // fast-deep-equal index.js 2.0.1 + if (a === b) return true; + + if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') { + var arrA = isArray(a), + arrB = isArray(b), + i, + length, + key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + + for (i = length; i-- !== 0;) { + if (!equal(a[i], b[i])) return false; + } + + return true; + } + + if (arrA != arrB) return false; + var dateA = a instanceof Date, + dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + var regexpA = a instanceof RegExp, + regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) { + return false; + } + + for (i = length; i-- !== 0;) { + if (!hasProp.call(b, keys[i])) return false; + } // end fast-deep-equal + // Custom handling for React + + + for (i = length; i-- !== 0;) { + key = keys[i]; + + if (key === '_owner' && a.$$typeof) { + // React-specific: avoid traversing React elements' _owner. + // _owner contains circular references + // and is not needed when comparing the actual elements (and not their owners) + // .$$typeof and ._store on just reasonable markers of a react element + continue; + } else { + // all other properties should be traversed as usual + if (!equal(a[key], b[key])) return false; + } + } // fast-deep-equal index.js 2.0.1 + + + return true; + } + + return a !== a && b !== b; + } // end fast-deep-equal + + + function exportedEqual(a, b) { + try { + return equal(a, b); + } catch (error) { + if (error.message && error.message.match(/stack|recursion/i)) { + // warn on circular references, don't crash + // browsers give this different errors name and messages: + // chrome/safari: "RangeError", "Maximum call stack size exceeded" + // firefox: "InternalError", too much recursion" + // edge: "Error", "Out of stack space" + console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message); + return false; + } // some other error. we should definitely know about these + + + throw error; + } + } + + var diacritics = [{ + base: 'A', + letters: /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g + }, { + base: 'AA', + letters: /[\uA732]/g + }, { + base: 'AE', + letters: /[\u00C6\u01FC\u01E2]/g + }, { + base: 'AO', + letters: /[\uA734]/g + }, { + base: 'AU', + letters: /[\uA736]/g + }, { + base: 'AV', + letters: /[\uA738\uA73A]/g + }, { + base: 'AY', + letters: /[\uA73C]/g + }, { + base: 'B', + letters: /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g + }, { + base: 'C', + letters: /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g + }, { + base: 'D', + letters: /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g + }, { + base: 'DZ', + letters: /[\u01F1\u01C4]/g + }, { + base: 'Dz', + letters: /[\u01F2\u01C5]/g + }, { + base: 'E', + letters: /[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g + }, { + base: 'F', + letters: /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g + }, { + base: 'G', + letters: /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g + }, { + base: 'H', + letters: /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g + }, { + base: 'I', + letters: /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g + }, { + base: 'J', + letters: /[\u004A\u24BF\uFF2A\u0134\u0248]/g + }, { + base: 'K', + letters: /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g + }, { + base: 'L', + letters: /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g + }, { + base: 'LJ', + letters: /[\u01C7]/g + }, { + base: 'Lj', + letters: /[\u01C8]/g + }, { + base: 'M', + letters: /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g + }, { + base: 'N', + letters: /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g + }, { + base: 'NJ', + letters: /[\u01CA]/g + }, { + base: 'Nj', + letters: /[\u01CB]/g + }, { + base: 'O', + letters: /[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g + }, { + base: 'OI', + letters: /[\u01A2]/g + }, { + base: 'OO', + letters: /[\uA74E]/g + }, { + base: 'OU', + letters: /[\u0222]/g + }, { + base: 'P', + letters: /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g + }, { + base: 'Q', + letters: /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g + }, { + base: 'R', + letters: /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g + }, { + base: 'S', + letters: /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g + }, { + base: 'T', + letters: /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g + }, { + base: 'TZ', + letters: /[\uA728]/g + }, { + base: 'U', + letters: /[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g + }, { + base: 'V', + letters: /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g + }, { + base: 'VY', + letters: /[\uA760]/g + }, { + base: 'W', + letters: /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g + }, { + base: 'X', + letters: /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g + }, { + base: 'Y', + letters: /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g + }, { + base: 'Z', + letters: /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g + }, { + base: 'a', + letters: /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g + }, { + base: 'aa', + letters: /[\uA733]/g + }, { + base: 'ae', + letters: /[\u00E6\u01FD\u01E3]/g + }, { + base: 'ao', + letters: /[\uA735]/g + }, { + base: 'au', + letters: /[\uA737]/g + }, { + base: 'av', + letters: /[\uA739\uA73B]/g + }, { + base: 'ay', + letters: /[\uA73D]/g + }, { + base: 'b', + letters: /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g + }, { + base: 'c', + letters: /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g + }, { + base: 'd', + letters: /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g + }, { + base: 'dz', + letters: /[\u01F3\u01C6]/g + }, { + base: 'e', + letters: /[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g + }, { + base: 'f', + letters: /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g + }, { + base: 'g', + letters: /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g + }, { + base: 'h', + letters: /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g + }, { + base: 'hv', + letters: /[\u0195]/g + }, { + base: 'i', + letters: /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g + }, { + base: 'j', + letters: /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g + }, { + base: 'k', + letters: /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g + }, { + base: 'l', + letters: /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g + }, { + base: 'lj', + letters: /[\u01C9]/g + }, { + base: 'm', + letters: /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g + }, { + base: 'n', + letters: /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g + }, { + base: 'nj', + letters: /[\u01CC]/g + }, { + base: 'o', + letters: /[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g + }, { + base: 'oi', + letters: /[\u01A3]/g + }, { + base: 'ou', + letters: /[\u0223]/g + }, { + base: 'oo', + letters: /[\uA74F]/g + }, { + base: 'p', + letters: /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g + }, { + base: 'q', + letters: /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g + }, { + base: 'r', + letters: /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g + }, { + base: 's', + letters: /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g + }, { + base: 't', + letters: /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g + }, { + base: 'tz', + letters: /[\uA729]/g + }, { + base: 'u', + letters: /[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g + }, { + base: 'v', + letters: /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g + }, { + base: 'vy', + letters: /[\uA761]/g + }, { + base: 'w', + letters: /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g + }, { + base: 'x', + letters: /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g + }, { + base: 'y', + letters: /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g + }, { + base: 'z', + letters: /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g + }]; + var stripDiacritics = function stripDiacritics(str) { + for (var i = 0; i < diacritics.length; i++) { + str = str.replace(diacritics[i].letters, diacritics[i].base); + } + + return str; + }; + + var trimString = function trimString(str) { + return str.replace(/^\s+|\s+$/g, ''); + }; + + var defaultStringify = function defaultStringify(option) { + return "".concat(option.label, " ").concat(option.value); + }; + + var createFilter = function createFilter(config) { + return function (option, rawInput) { + var _ignoreCase$ignoreAcc = _objectSpread$1({ + ignoreCase: true, + ignoreAccents: true, + stringify: defaultStringify, + trim: true, + matchFrom: 'any' + }, config), + ignoreCase = _ignoreCase$ignoreAcc.ignoreCase, + ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents, + stringify = _ignoreCase$ignoreAcc.stringify, + trim = _ignoreCase$ignoreAcc.trim, + matchFrom = _ignoreCase$ignoreAcc.matchFrom; + + var input = trim ? trimString(rawInput) : rawInput; + var candidate = trim ? trimString(stringify(option)) : stringify(option); + + if (ignoreCase) { + input = input.toLowerCase(); + candidate = candidate.toLowerCase(); + } + + if (ignoreAccents) { + input = stripDiacritics(input); + candidate = stripDiacritics(candidate); + } + + return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1; + }; + }; + + var A11yText = function A11yText(props) { + return React__default.createElement("span", _extends({ + className: + /*#__PURE__*/ + + /*#__PURE__*/ + css({ + zIndex: 9999, + border: 0, + clip: 'rect(1px, 1px, 1px, 1px)', + height: 1, + width: 1, + position: 'absolute', + overflow: 'hidden', + padding: 0, + whiteSpace: 'nowrap', + backgroundColor: 'red', + color: 'blue' + }) + }, props)); + }; + + var DummyInput = + /*#__PURE__*/ + function (_Component) { + _inherits$1(DummyInput, _Component); + + function DummyInput() { + _classCallCheck$1(this, DummyInput); + + return _possibleConstructorReturn$1(this, _getPrototypeOf(DummyInput).apply(this, arguments)); + } + + _createClass$1(DummyInput, [{ + key: "render", + value: function render() { + var _this$props = this.props, + inProp = _this$props.in, + out = _this$props.out, + onExited = _this$props.onExited, + appear = _this$props.appear, + enter = _this$props.enter, + exit = _this$props.exit, + innerRef = _this$props.innerRef, + emotion = _this$props.emotion, + props = _objectWithoutProperties(_this$props, ["in", "out", "onExited", "appear", "enter", "exit", "innerRef", "emotion"]); + + return React__default.createElement("input", _extends({ + ref: innerRef + }, props, { + className: + /*#__PURE__*/ + + /*#__PURE__*/ + css({ + // get rid of any default styles + background: 0, + border: 0, + fontSize: 'inherit', + outline: 0, + padding: 0, + // important! without `width` browsers won't allow focus + width: 1, + // remove cursor on desktop + color: 'transparent', + // remove cursor on mobile whilst maintaining "scroll into view" behaviour + left: -100, + opacity: 0, + position: 'relative', + transform: 'scale(0)' + }) + })); + } + }]); + + return DummyInput; + }(React.Component); + + var NodeResolver = + /*#__PURE__*/ + function (_Component) { + _inherits$1(NodeResolver, _Component); + + function NodeResolver() { + _classCallCheck$1(this, NodeResolver); + + return _possibleConstructorReturn$1(this, _getPrototypeOf(NodeResolver).apply(this, arguments)); + } + + _createClass$1(NodeResolver, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.props.innerRef(reactDom.findDOMNode(this)); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.props.innerRef(null); + } + }, { + key: "render", + value: function render() { + return this.props.children; + } + }]); + + return NodeResolver; + }(React.Component); + + var STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position']; + var LOCK_STYLES = { + boxSizing: 'border-box', + // account for possible declaration `width: 100%;` on body + overflow: 'hidden', + position: 'relative', + height: '100%' + }; + + function preventTouchMove(e) { + e.preventDefault(); + } + function allowTouchMove(e) { + e.stopPropagation(); + } + function preventInertiaScroll() { + var top = this.scrollTop; + var totalScroll = this.scrollHeight; + var currentScroll = top + this.offsetHeight; + + if (top === 0) { + this.scrollTop = 1; + } else if (currentScroll === totalScroll) { + this.scrollTop = top - 1; + } + } // `ontouchstart` check works on most browsers + // `maxTouchPoints` works on IE10/11 and Surface + + function isTouchDevice() { + return 'ontouchstart' in window || navigator.maxTouchPoints; + } + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + var activeScrollLocks = 0; + + var ScrollLock = + /*#__PURE__*/ + function (_Component) { + _inherits$1(ScrollLock, _Component); + + function ScrollLock() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck$1(this, ScrollLock); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn$1(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollLock)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "originalStyles", {}); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "listenerOptions", { + capture: false, + passive: false + }); + + return _this; + } + + _createClass$1(ScrollLock, [{ + key: "componentDidMount", + value: function componentDidMount() { + var _this2 = this; + + if (!canUseDOM) return; + var _this$props = this.props, + accountForScrollbars = _this$props.accountForScrollbars, + touchScrollTarget = _this$props.touchScrollTarget; + var target = document.body; + var targetStyle = target && target.style; + + if (accountForScrollbars) { + // store any styles already applied to the body + STYLE_KEYS.forEach(function (key) { + var val = targetStyle && targetStyle[key]; + _this2.originalStyles[key] = val; + }); + } // apply the lock styles and padding if this is the first scroll lock + + + if (accountForScrollbars && activeScrollLocks < 1) { + var currentPadding = parseInt(this.originalStyles.paddingRight, 10) || 0; + var clientWidth = document.body ? document.body.clientWidth : 0; + var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0; + Object.keys(LOCK_STYLES).forEach(function (key) { + var val = LOCK_STYLES[key]; + + if (targetStyle) { + targetStyle[key] = val; + } + }); + + if (targetStyle) { + targetStyle.paddingRight = "".concat(adjustedPadding, "px"); + } + } // account for touch devices + + + if (target && isTouchDevice()) { + // Mobile Safari ignores { overflow: hidden } declaration on the body. + target.addEventListener('touchmove', preventTouchMove, this.listenerOptions); // Allow scroll on provided target + + if (touchScrollTarget) { + touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, this.listenerOptions); + touchScrollTarget.addEventListener('touchmove', allowTouchMove, this.listenerOptions); + } + } // increment active scroll locks + + + activeScrollLocks += 1; + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + var _this3 = this; + + if (!canUseDOM) return; + var _this$props2 = this.props, + accountForScrollbars = _this$props2.accountForScrollbars, + touchScrollTarget = _this$props2.touchScrollTarget; + var target = document.body; + var targetStyle = target && target.style; // safely decrement active scroll locks + + activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any + + if (accountForScrollbars && activeScrollLocks < 1) { + STYLE_KEYS.forEach(function (key) { + var val = _this3.originalStyles[key]; + + if (targetStyle) { + targetStyle[key] = val; + } + }); + } // remove touch listeners + + + if (target && isTouchDevice()) { + target.removeEventListener('touchmove', preventTouchMove, this.listenerOptions); + + if (touchScrollTarget) { + touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, this.listenerOptions); + touchScrollTarget.removeEventListener('touchmove', allowTouchMove, this.listenerOptions); + } + } + } + }, { + key: "render", + value: function render() { + return null; + } + }]); + + return ScrollLock; + }(React.Component); + + _defineProperty$1(ScrollLock, "defaultProps", { + accountForScrollbars: true + }); + + // NOTE: + // We shouldn't need this after updating to React v16.3.0, which introduces: + // - createRef() https://reactjs.org/docs/react-api.html#reactcreateref + // - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref + var ScrollBlock = + /*#__PURE__*/ + function (_PureComponent) { + _inherits$1(ScrollBlock, _PureComponent); + + function ScrollBlock() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck$1(this, ScrollBlock); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn$1(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollBlock)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "state", { + touchScrollTarget: null + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getScrollTarget", function (ref) { + if (ref === _this.state.touchScrollTarget) return; + + _this.setState({ + touchScrollTarget: ref + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "blurSelectInput", function () { + if (document.activeElement) { + document.activeElement.blur(); + } + }); + + return _this; + } + + _createClass$1(ScrollBlock, [{ + key: "render", + value: function render() { + var _this$props = this.props, + children = _this$props.children, + isEnabled = _this$props.isEnabled; + var touchScrollTarget = this.state.touchScrollTarget; // bail early if not enabled + + if (!isEnabled) return children; + /* + * Div + * ------------------------------ + * blocks scrolling on non-body elements behind the menu + * NodeResolver + * ------------------------------ + * we need a reference to the scrollable element to "unlock" scroll on + * mobile devices + * ScrollLock + * ------------------------------ + * actually does the scroll locking + */ + + return React__default.createElement("div", null, React__default.createElement("div", { + onClick: this.blurSelectInput, + className: + /*#__PURE__*/ + + /*#__PURE__*/ + css({ + position: 'fixed', + left: 0, + bottom: 0, + right: 0, + top: 0 + }) + }), React__default.createElement(NodeResolver, { + innerRef: this.getScrollTarget + }, children), touchScrollTarget ? React__default.createElement(ScrollLock, { + touchScrollTarget: touchScrollTarget + }) : null); + } + }]); + + return ScrollBlock; + }(React.PureComponent); + + var ScrollCaptor = + /*#__PURE__*/ + function (_Component) { + _inherits$1(ScrollCaptor, _Component); + + function ScrollCaptor() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck$1(this, ScrollCaptor); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn$1(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollCaptor)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "isBottom", false); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "isTop", false); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "scrollTarget", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "touchStart", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "cancelScroll", function (event) { + event.preventDefault(); + event.stopPropagation(); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "handleEventDelta", function (event, delta) { + var _this$props = _this.props, + onBottomArrive = _this$props.onBottomArrive, + onBottomLeave = _this$props.onBottomLeave, + onTopArrive = _this$props.onTopArrive, + onTopLeave = _this$props.onTopLeave; + var _this$scrollTarget = _this.scrollTarget, + scrollTop = _this$scrollTarget.scrollTop, + scrollHeight = _this$scrollTarget.scrollHeight, + clientHeight = _this$scrollTarget.clientHeight; + var target = _this.scrollTarget; + var isDeltaPositive = delta > 0; + var availableScroll = scrollHeight - clientHeight - scrollTop; + var shouldCancelScroll = false; // reset bottom/top flags + + if (availableScroll > delta && _this.isBottom) { + if (onBottomLeave) onBottomLeave(event); + _this.isBottom = false; + } + + if (isDeltaPositive && _this.isTop) { + if (onTopLeave) onTopLeave(event); + _this.isTop = false; + } // bottom limit + + + if (isDeltaPositive && delta > availableScroll) { + if (onBottomArrive && !_this.isBottom) { + onBottomArrive(event); + } + + target.scrollTop = scrollHeight; + shouldCancelScroll = true; + _this.isBottom = true; // top limit + } else if (!isDeltaPositive && -delta > scrollTop) { + if (onTopArrive && !_this.isTop) { + onTopArrive(event); + } + + target.scrollTop = 0; + shouldCancelScroll = true; + _this.isTop = true; + } // cancel scroll + + + if (shouldCancelScroll) { + _this.cancelScroll(event); + } + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onWheel", function (event) { + _this.handleEventDelta(event, event.deltaY); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onTouchStart", function (event) { + // set touch start so we can calculate touchmove delta + _this.touchStart = event.changedTouches[0].clientY; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onTouchMove", function (event) { + var deltaY = _this.touchStart - event.changedTouches[0].clientY; + + _this.handleEventDelta(event, deltaY); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getScrollTarget", function (ref) { + _this.scrollTarget = ref; + }); + + return _this; + } + + _createClass$1(ScrollCaptor, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.startListening(this.scrollTarget); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.stopListening(this.scrollTarget); + } + }, { + key: "startListening", + value: function startListening(el) { + // bail early if no scroll available + if (!el) return; + if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢 + + if (typeof el.addEventListener === 'function') { + el.addEventListener('wheel', this.onWheel, false); + } + + if (typeof el.addEventListener === 'function') { + el.addEventListener('touchstart', this.onTouchStart, false); + } + + if (typeof el.addEventListener === 'function') { + el.addEventListener('touchmove', this.onTouchMove, false); + } + } + }, { + key: "stopListening", + value: function stopListening(el) { + // bail early if no scroll available + if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢 + + if (typeof el.removeEventListener === 'function') { + el.removeEventListener('wheel', this.onWheel, false); + } + + if (typeof el.removeEventListener === 'function') { + el.removeEventListener('touchstart', this.onTouchStart, false); + } + + if (typeof el.removeEventListener === 'function') { + el.removeEventListener('touchmove', this.onTouchMove, false); + } + } + }, { + key: "render", + value: function render() { + return React__default.createElement(NodeResolver, { + innerRef: this.getScrollTarget + }, this.props.children); + } + }]); + + return ScrollCaptor; + }(React.Component); + + var ScrollCaptorSwitch = + /*#__PURE__*/ + function (_Component2) { + _inherits$1(ScrollCaptorSwitch, _Component2); + + function ScrollCaptorSwitch() { + _classCallCheck$1(this, ScrollCaptorSwitch); + + return _possibleConstructorReturn$1(this, _getPrototypeOf(ScrollCaptorSwitch).apply(this, arguments)); + } + + _createClass$1(ScrollCaptorSwitch, [{ + key: "render", + value: function render() { + var _this$props2 = this.props, + isEnabled = _this$props2.isEnabled, + props = _objectWithoutProperties(_this$props2, ["isEnabled"]); + + return isEnabled ? React__default.createElement(ScrollCaptor, props) : this.props.children; + } + }]); + + return ScrollCaptorSwitch; + }(React.Component); + + _defineProperty$1(ScrollCaptorSwitch, "defaultProps", { + isEnabled: true + }); + + var instructionsAriaMessage = function instructionsAriaMessage(event) { + var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var isSearchable = context.isSearchable, + isMulti = context.isMulti, + label = context.label, + isDisabled = context.isDisabled; + + switch (event) { + case 'menu': + return "Use Up and Down to choose options".concat(isDisabled ? '' : ', press Enter to select the currently focused option', ", press Escape to exit the menu, press Tab to select the option and exit the menu."); + + case 'input': + return "".concat(label ? label : 'Select', " is focused ").concat(isSearchable ? ',type to refine list' : '', ", press Down to open the menu, ").concat(isMulti ? ' press left to focus selected values' : ''); + + case 'value': + return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value'; + } + }; + var valueEventAriaMessage = function valueEventAriaMessage(event, context) { + var value = context.value, + isDisabled = context.isDisabled; + if (!value) return; + + switch (event) { + case 'deselect-option': + case 'pop-value': + case 'remove-value': + return "option ".concat(value, ", deselected."); + + case 'select-option': + return isDisabled ? "option ".concat(value, " is disabled. Select another option.") : "option ".concat(value, ", selected."); + } + }; + var valueFocusAriaMessage = function valueFocusAriaMessage(_ref) { + var focusedValue = _ref.focusedValue, + getOptionLabel = _ref.getOptionLabel, + selectValue = _ref.selectValue; + return "value ".concat(getOptionLabel(focusedValue), " focused, ").concat(selectValue.indexOf(focusedValue) + 1, " of ").concat(selectValue.length, "."); + }; + var optionFocusAriaMessage = function optionFocusAriaMessage(_ref2) { + var focusedOption = _ref2.focusedOption, + getOptionLabel = _ref2.getOptionLabel, + options = _ref2.options; + return "option ".concat(getOptionLabel(focusedOption), " focused").concat(focusedOption.isDisabled ? ' disabled' : '', ", ").concat(options.indexOf(focusedOption) + 1, " of ").concat(options.length, "."); + }; + var resultsAriaMessage = function resultsAriaMessage(_ref3) { + var inputValue = _ref3.inputValue, + screenReaderMessage = _ref3.screenReaderMessage; + return "".concat(screenReaderMessage).concat(inputValue ? ' for search term ' + inputValue : '', "."); + }; + + var formatGroupLabel = function formatGroupLabel(group) { + return group.label; + }; + var getOptionLabel = function getOptionLabel(option) { + return option.label; + }; + var getOptionValue = function getOptionValue(option) { + return option.value; + }; + var isOptionDisabled = function isOptionDisabled(option) { + return !!option.isDisabled; + }; + + var containerCSS = function containerCSS(_ref) { + var isDisabled = _ref.isDisabled, + isRtl = _ref.isRtl; + return { + direction: isRtl ? 'rtl' : null, + pointerEvents: isDisabled ? 'none' : null, + // cancel mouse events when disabled + position: 'relative' + }; + }; + var SelectContainer = function SelectContainer(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps, + isDisabled = props.isDisabled, + isRtl = props.isRtl; + return React__default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + css(getStyles('container', props)), { + '--is-disabled': isDisabled, + '--is-rtl': isRtl + }, className) + }, innerProps), children); + }; // ============================== + // Value Container + // ============================== + + var valueContainerCSS = function valueContainerCSS(_ref2) { + var spacing = _ref2.theme.spacing; + return { + alignItems: 'center', + display: 'flex', + flex: 1, + flexWrap: 'wrap', + padding: "".concat(spacing.baseUnit / 2, "px ").concat(spacing.baseUnit * 2, "px"), + WebkitOverflowScrolling: 'touch', + position: 'relative', + overflow: 'hidden' + }; + }; + var ValueContainer = + /*#__PURE__*/ + function (_Component) { + _inherits$1(ValueContainer, _Component); + + function ValueContainer() { + _classCallCheck$1(this, ValueContainer); + + return _possibleConstructorReturn$1(this, _getPrototypeOf(ValueContainer).apply(this, arguments)); + } + + _createClass$1(ValueContainer, [{ + key: "render", + value: function render() { + var _this$props = this.props, + children = _this$props.children, + className = _this$props.className, + cx = _this$props.cx, + isMulti = _this$props.isMulti, + getStyles = _this$props.getStyles, + hasValue = _this$props.hasValue; + return React__default.createElement("div", { + className: cx( + /*#__PURE__*/ + css(getStyles('valueContainer', this.props)), { + 'value-container': true, + 'value-container--is-multi': isMulti, + 'value-container--has-value': hasValue + }, className) + }, children); + } + }]); + + return ValueContainer; + }(React.Component); // ============================== + // Indicator Container + // ============================== + + var indicatorsContainerCSS = function indicatorsContainerCSS() { + return { + alignItems: 'center', + alignSelf: 'stretch', + display: 'flex', + flexShrink: 0 + }; + }; + var IndicatorsContainer = function IndicatorsContainer(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles; + return React__default.createElement("div", { + className: cx( + /*#__PURE__*/ + css(getStyles('indicatorsContainer', props)), { + 'indicators': true + }, className) + }, children); + }; + + // ============================== + // Dropdown & Clear Icons + // ============================== + var Svg = function Svg(_ref) { + var size = _ref.size, + props = _objectWithoutProperties(_ref, ["size"]); + + return React__default.createElement("svg", _extends({ + height: size, + width: size, + viewBox: "0 0 20 20", + "aria-hidden": "true", + focusable: "false", + className: + /*#__PURE__*/ + + /*#__PURE__*/ + css({ + display: 'inline-block', + fill: 'currentColor', + lineHeight: 1, + stroke: 'currentColor', + strokeWidth: 0 + }) + }, props)); + }; + + var CrossIcon = function CrossIcon(props) { + return React__default.createElement(Svg, _extends({ + size: 20 + }, props), React__default.createElement("path", { + d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" + })); + }; + var DownChevron = function DownChevron(props) { + return React__default.createElement(Svg, _extends({ + size: 20 + }, props), React__default.createElement("path", { + d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" + })); + }; // ============================== + // Dropdown & Clear Buttons + // ============================== + + var baseCSS = function baseCSS(_ref2) { + var isFocused = _ref2.isFocused, + _ref2$theme = _ref2.theme, + baseUnit = _ref2$theme.spacing.baseUnit, + colors = _ref2$theme.colors; + return { + color: isFocused ? colors.neutral60 : colors.neutral20, + display: 'flex', + padding: baseUnit * 2, + transition: 'color 150ms', + ':hover': { + color: isFocused ? colors.neutral80 : colors.neutral40 + } + }; + }; + + var dropdownIndicatorCSS = baseCSS; + var DropdownIndicator = function DropdownIndicator(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return React__default.createElement("div", _extends({}, innerProps, { + className: cx( + /*#__PURE__*/ + css(getStyles('dropdownIndicator', props)), { + 'indicator': true, + 'dropdown-indicator': true + }, className) + }), children || React__default.createElement(DownChevron, null)); + }; + var clearIndicatorCSS = baseCSS; + var ClearIndicator = function ClearIndicator(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return React__default.createElement("div", _extends({}, innerProps, { + className: cx( + /*#__PURE__*/ + css(getStyles('clearIndicator', props)), { + 'indicator': true, + 'clear-indicator': true + }, className) + }), children || React__default.createElement(CrossIcon, null)); + }; // ============================== + // Separator + // ============================== + + var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref3) { + var isDisabled = _ref3.isDisabled, + _ref3$theme = _ref3.theme, + baseUnit = _ref3$theme.spacing.baseUnit, + colors = _ref3$theme.colors; + return { + alignSelf: 'stretch', + backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20, + marginBottom: baseUnit * 2, + marginTop: baseUnit * 2, + width: 1 + }; + }; + var IndicatorSeparator = function IndicatorSeparator(props) { + var className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return React__default.createElement("span", _extends({}, innerProps, { + className: cx( + /*#__PURE__*/ + css(getStyles('indicatorSeparator', props)), { + 'indicator-separator': true + }, className) + })); + }; // ============================== + // Loading + // ============================== + + var keyframesName = 'react-select-loading-indicator'; + var keyframesInjected = false; + var loadingIndicatorCSS = function loadingIndicatorCSS(_ref4) { + var isFocused = _ref4.isFocused, + size = _ref4.size, + _ref4$theme = _ref4.theme, + colors = _ref4$theme.colors, + baseUnit = _ref4$theme.spacing.baseUnit; + return { + color: isFocused ? colors.neutral60 : colors.neutral20, + display: 'flex', + padding: baseUnit * 2, + transition: 'color 150ms', + alignSelf: 'center', + fontSize: size, + lineHeight: 1, + marginRight: size, + textAlign: 'center', + verticalAlign: 'middle' + }; + }; + + var LoadingDot = function LoadingDot(_ref5) { + var color = _ref5.color, + delay = _ref5.delay, + offset = _ref5.offset; + return React__default.createElement("span", { + className: + /*#__PURE__*/ + + /*#__PURE__*/ + css({ + animationDuration: '1s', + animationDelay: "".concat(delay, "ms"), + animationIterationCount: 'infinite', + animationName: keyframesName, + animationTimingFunction: 'ease-in-out', + backgroundColor: color, + borderRadius: '1em', + display: 'inline-block', + marginLeft: offset ? '1em' : null, + height: '1em', + verticalAlign: 'top', + width: '1em' + }) + }); + }; + + var LoadingIndicator = function LoadingIndicator(props) { + var className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps, + isFocused = props.isFocused, + isRtl = props.isRtl, + colors = props.theme.colors; + var color = isFocused ? colors.neutral80 : colors.neutral20; + + if (!keyframesInjected) { + // eslint-disable-next-line no-unused-expressions + injectGlobal("@keyframes ", keyframesName, "{0%,80%,100%{opacity:0;}40%{opacity:1;}};"); + keyframesInjected = true; + } + + return React__default.createElement("div", _extends({}, innerProps, { + className: cx( + /*#__PURE__*/ + css(getStyles('loadingIndicator', props)), { + 'indicator': true, + 'loading-indicator': true + }, className) + }), React__default.createElement(LoadingDot, { + color: color, + delay: 0, + offset: isRtl + }), React__default.createElement(LoadingDot, { + color: color, + delay: 160, + offset: true + }), React__default.createElement(LoadingDot, { + color: color, + delay: 320, + offset: !isRtl + })); + }; + LoadingIndicator.defaultProps = { + size: 4 + }; + + var css$1 = function css$$1(_ref) { + var isDisabled = _ref.isDisabled, + isFocused = _ref.isFocused, + _ref$theme = _ref.theme, + colors = _ref$theme.colors, + borderRadius = _ref$theme.borderRadius, + spacing = _ref$theme.spacing; + return { + alignItems: 'center', + backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0, + borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20, + borderRadius: borderRadius, + borderStyle: 'solid', + borderWidth: 1, + boxShadow: isFocused ? "0 0 0 1px ".concat(colors.primary) : null, + cursor: 'default', + display: 'flex', + flexWrap: 'wrap', + justifyContent: 'space-between', + minHeight: spacing.controlHeight, + outline: '0 !important', + position: 'relative', + transition: 'all 100ms', + '&:hover': { + borderColor: isFocused ? colors.primary : colors.neutral30 + } + }; + }; + + var Control = function Control(props) { + var children = props.children, + cx = props.cx, + getStyles = props.getStyles, + className = props.className, + isDisabled = props.isDisabled, + isFocused = props.isFocused, + innerRef = props.innerRef, + innerProps = props.innerProps, + menuIsOpen = props.menuIsOpen; + return React__default.createElement("div", _extends({ + ref: innerRef, + className: cx( + /*#__PURE__*/ + css(getStyles('control', props)), { + 'control': true, + 'control--is-disabled': isDisabled, + 'control--is-focused': isFocused, + 'control--menu-is-open': menuIsOpen + }, className) + }, innerProps), children); + }; + + var groupCSS = function groupCSS(_ref) { + var spacing = _ref.theme.spacing; + return { + paddingBottom: spacing.baseUnit * 2, + paddingTop: spacing.baseUnit * 2 + }; + }; + + var Group = function Group(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + Heading = props.Heading, + headingProps = props.headingProps, + label = props.label, + theme = props.theme, + selectProps = props.selectProps; + return React__default.createElement("div", { + className: cx( + /*#__PURE__*/ + css(getStyles('group', props)), { + 'group': true + }, className) + }, React__default.createElement(Heading, _extends({}, headingProps, { + selectProps: selectProps, + theme: theme, + getStyles: getStyles, + cx: cx + }), label), React__default.createElement("div", null, children)); + }; + + var groupHeadingCSS = function groupHeadingCSS(_ref2) { + var spacing = _ref2.theme.spacing; + return { + color: '#999', + cursor: 'default', + display: 'block', + fontSize: '75%', + fontWeight: '500', + marginBottom: '0.25em', + paddingLeft: spacing.baseUnit * 3, + paddingRight: spacing.baseUnit * 3, + textTransform: 'uppercase' + }; + }; + var GroupHeading = function GroupHeading(props) { + var className = props.className, + cx = props.cx, + getStyles = props.getStyles, + theme = props.theme, + selectProps = props.selectProps, + cleanProps = _objectWithoutProperties(props, ["className", "cx", "getStyles", "theme", "selectProps"]); + + return React__default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + css(getStyles('groupHeading', _objectSpread$1({ + theme: theme + }, cleanProps))), { + 'group-heading': true + }, className) + }, cleanProps)); + }; + + var inputCSS = function inputCSS(_ref) { + var isDisabled = _ref.isDisabled, + _ref$theme = _ref.theme, + spacing = _ref$theme.spacing, + colors = _ref$theme.colors; + return { + margin: spacing.baseUnit / 2, + paddingBottom: spacing.baseUnit / 2, + paddingTop: spacing.baseUnit / 2, + visibility: isDisabled ? 'hidden' : 'visible', + color: colors.neutral80 + }; + }; + + var inputStyle = function inputStyle(isHidden) { + return { + background: 0, + border: 0, + fontSize: 'inherit', + opacity: isHidden ? 0 : 1, + outline: 0, + padding: 0, + color: 'inherit' + }; + }; + + var Input = function Input(_ref2) { + var className = _ref2.className, + cx = _ref2.cx, + getStyles = _ref2.getStyles, + innerRef = _ref2.innerRef, + isHidden = _ref2.isHidden, + isDisabled = _ref2.isDisabled, + theme = _ref2.theme, + selectProps = _ref2.selectProps, + props = _objectWithoutProperties(_ref2, ["className", "cx", "getStyles", "innerRef", "isHidden", "isDisabled", "theme", "selectProps"]); + + return React__default.createElement("div", { + className: + /*#__PURE__*/ + + /*#__PURE__*/ + css(getStyles('input', _objectSpread$1({ + theme: theme + }, props))) + }, React__default.createElement(AutosizeInput, _extends({ + className: cx(null, { + 'input': true + }, className), + inputRef: innerRef, + inputStyle: inputStyle(isHidden), + disabled: isDisabled + }, props))); + }; + + var multiValueCSS = function multiValueCSS(_ref) { + var _ref$theme = _ref.theme, + spacing = _ref$theme.spacing, + borderRadius = _ref$theme.borderRadius, + colors = _ref$theme.colors; + return { + backgroundColor: colors.neutral10, + borderRadius: borderRadius / 2, + display: 'flex', + margin: spacing.baseUnit / 2, + minWidth: 0 // resolves flex/text-overflow bug + + }; + }; + var multiValueLabelCSS = function multiValueLabelCSS(_ref2) { + var _ref2$theme = _ref2.theme, + borderRadius = _ref2$theme.borderRadius, + colors = _ref2$theme.colors, + cropWithEllipsis = _ref2.cropWithEllipsis; + return { + borderRadius: borderRadius / 2, + color: colors.neutral80, + fontSize: '85%', + overflow: 'hidden', + padding: 3, + paddingLeft: 6, + textOverflow: cropWithEllipsis ? 'ellipsis' : null, + whiteSpace: 'nowrap' + }; + }; + var multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) { + var _ref3$theme = _ref3.theme, + spacing = _ref3$theme.spacing, + borderRadius = _ref3$theme.borderRadius, + colors = _ref3$theme.colors, + isFocused = _ref3.isFocused; + return { + alignItems: 'center', + borderRadius: borderRadius / 2, + backgroundColor: isFocused && colors.dangerLight, + display: 'flex', + paddingLeft: spacing.baseUnit, + paddingRight: spacing.baseUnit, + ':hover': { + backgroundColor: colors.dangerLight, + color: colors.danger + } + }; + }; + var MultiValueGeneric = function MultiValueGeneric(_ref4) { + var children = _ref4.children, + innerProps = _ref4.innerProps; + return React__default.createElement("div", innerProps, children); + }; + var MultiValueContainer = MultiValueGeneric; + var MultiValueLabel = MultiValueGeneric; + var MultiValueRemove = + /*#__PURE__*/ + function (_Component) { + _inherits$1(MultiValueRemove, _Component); + + function MultiValueRemove() { + _classCallCheck$1(this, MultiValueRemove); + + return _possibleConstructorReturn$1(this, _getPrototypeOf(MultiValueRemove).apply(this, arguments)); + } + + _createClass$1(MultiValueRemove, [{ + key: "render", + value: function render() { + var _this$props = this.props, + children = _this$props.children, + innerProps = _this$props.innerProps; + return React__default.createElement("div", innerProps, children || React__default.createElement(CrossIcon, { + size: 14 + })); + } + }]); + + return MultiValueRemove; + }(React.Component); + + var MultiValue = + /*#__PURE__*/ + function (_Component2) { + _inherits$1(MultiValue, _Component2); + + function MultiValue() { + _classCallCheck$1(this, MultiValue); + + return _possibleConstructorReturn$1(this, _getPrototypeOf(MultiValue).apply(this, arguments)); + } + + _createClass$1(MultiValue, [{ + key: "render", + value: function render() { + var _this$props2 = this.props, + children = _this$props2.children, + className = _this$props2.className, + components = _this$props2.components, + cx = _this$props2.cx, + data = _this$props2.data, + getStyles = _this$props2.getStyles, + innerProps = _this$props2.innerProps, + isDisabled = _this$props2.isDisabled, + removeProps = _this$props2.removeProps, + selectProps = _this$props2.selectProps; + var Container = components.Container, + Label = components.Label, + Remove = components.Remove; + + var containerInnerProps = _objectSpread$1({ + className: cx( + /*#__PURE__*/ + css(getStyles('multiValue', this.props)), { + 'multi-value': true, + 'multi-value--is-disabled': isDisabled + }, className) + }, innerProps); + + var labelInnerProps = { + className: cx( + /*#__PURE__*/ + css(getStyles('multiValueLabel', this.props)), { + 'multi-value__label': true + }, className) + }; + + var removeInnerProps = _objectSpread$1({ + className: cx( + /*#__PURE__*/ + css(getStyles('multiValueRemove', this.props)), { + 'multi-value__remove': true + }, className) + }, removeProps); + + return React__default.createElement(Container, { + data: data, + innerProps: containerInnerProps, + selectProps: selectProps + }, React__default.createElement(Label, { + data: data, + innerProps: labelInnerProps, + selectProps: selectProps + }, children), React__default.createElement(Remove, { + data: data, + innerProps: removeInnerProps, + selectProps: selectProps + })); + } + }]); + + return MultiValue; + }(React.Component); + + _defineProperty$1(MultiValue, "defaultProps", { + cropWithEllipsis: true + }); + + var optionCSS = function optionCSS(_ref) { + var isDisabled = _ref.isDisabled, + isFocused = _ref.isFocused, + isSelected = _ref.isSelected, + _ref$theme = _ref.theme, + spacing = _ref$theme.spacing, + colors = _ref$theme.colors; + return { + backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent', + color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit', + cursor: 'default', + display: 'block', + fontSize: 'inherit', + padding: "".concat(spacing.baseUnit * 2, "px ").concat(spacing.baseUnit * 3, "px"), + width: '100%', + userSelect: 'none', + WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)', + // provide some affordance on touch devices + ':active': { + backgroundColor: isSelected ? colors.primary : colors.primary50 + } + }; + }; + + var Option = function Option(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + isDisabled = props.isDisabled, + isFocused = props.isFocused, + isSelected = props.isSelected, + innerRef = props.innerRef, + innerProps = props.innerProps; + return React__default.createElement("div", _extends({ + ref: innerRef, + className: cx( + /*#__PURE__*/ + css(getStyles('option', props)), { + 'option': true, + 'option--is-disabled': isDisabled, + 'option--is-focused': isFocused, + 'option--is-selected': isSelected + }, className) + }, innerProps), children); + }; + + var placeholderCSS = function placeholderCSS(_ref) { + var _ref$theme = _ref.theme, + spacing = _ref$theme.spacing, + colors = _ref$theme.colors; + return { + color: colors.neutral50, + marginLeft: spacing.baseUnit / 2, + marginRight: spacing.baseUnit / 2, + position: 'absolute', + top: '50%', + transform: 'translateY(-50%)' + }; + }; + + var Placeholder = function Placeholder(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return React__default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + css(getStyles('placeholder', props)), { + 'placeholder': true + }, className) + }, innerProps), children); + }; + + var css$2 = function css$$1(_ref) { + var isDisabled = _ref.isDisabled, + _ref$theme = _ref.theme, + spacing = _ref$theme.spacing, + colors = _ref$theme.colors; + return { + color: isDisabled ? colors.neutral40 : colors.neutral80, + marginLeft: spacing.baseUnit / 2, + marginRight: spacing.baseUnit / 2, + maxWidth: "calc(100% - ".concat(spacing.baseUnit * 2, "px)"), + overflow: 'hidden', + position: 'absolute', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + top: '50%', + transform: 'translateY(-50%)' + }; + }; + + var SingleValue = function SingleValue(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + isDisabled = props.isDisabled, + innerProps = props.innerProps; + return React__default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + css(getStyles('singleValue', props)), { + 'single-value': true, + 'single-value--is-disabled': isDisabled + }, className) + }, innerProps), children); + }; + + var components = { + ClearIndicator: ClearIndicator, + Control: Control, + DropdownIndicator: DropdownIndicator, + DownChevron: DownChevron, + CrossIcon: CrossIcon, + Group: Group, + GroupHeading: GroupHeading, + IndicatorsContainer: IndicatorsContainer, + IndicatorSeparator: IndicatorSeparator, + Input: Input, + LoadingIndicator: LoadingIndicator, + Menu: Menu, + MenuList: MenuList, + MenuPortal: MenuPortal, + LoadingMessage: LoadingMessage, + NoOptionsMessage: NoOptionsMessage, + MultiValue: MultiValue, + MultiValueContainer: MultiValueContainer, + MultiValueLabel: MultiValueLabel, + MultiValueRemove: MultiValueRemove, + Option: Option, + Placeholder: Placeholder, + SelectContainer: SelectContainer, + SingleValue: SingleValue, + ValueContainer: ValueContainer + }; + var defaultComponents = function defaultComponents(props) { + return _objectSpread$1({}, components, props.components); + }; + + var defaultStyles = { + clearIndicator: clearIndicatorCSS, + container: containerCSS, + control: css$1, + dropdownIndicator: dropdownIndicatorCSS, + group: groupCSS, + groupHeading: groupHeadingCSS, + indicatorsContainer: indicatorsContainerCSS, + indicatorSeparator: indicatorSeparatorCSS, + input: inputCSS, + loadingIndicator: loadingIndicatorCSS, + loadingMessage: loadingMessageCSS, + menu: menuCSS, + menuList: menuListCSS, + menuPortal: menuPortalCSS, + multiValue: multiValueCSS, + multiValueLabel: multiValueLabelCSS, + multiValueRemove: multiValueRemoveCSS, + noOptionsMessage: noOptionsMessageCSS, + option: optionCSS, + placeholder: placeholderCSS, + singleValue: css$2, + valueContainer: valueContainerCSS + }; // Merge Utility + + var colors$1 = { + primary: '#2684FF', + primary75: '#4C9AFF', + primary50: '#B2D4FF', + primary25: '#DEEBFF', + danger: '#DE350B', + dangerLight: '#FFBDAD', + neutral0: 'hsl(0, 0%, 100%)', + neutral5: 'hsl(0, 0%, 95%)', + neutral10: 'hsl(0, 0%, 90%)', + neutral20: 'hsl(0, 0%, 80%)', + neutral30: 'hsl(0, 0%, 70%)', + neutral40: 'hsl(0, 0%, 60%)', + neutral50: 'hsl(0, 0%, 50%)', + neutral60: 'hsl(0, 0%, 40%)', + neutral70: 'hsl(0, 0%, 30%)', + neutral80: 'hsl(0, 0%, 20%)', + neutral90: 'hsl(0, 0%, 10%)' + }; + var borderRadius = 4; + var baseUnit = 4; + /* Used to calculate consistent margin/padding on elements */ + + var controlHeight = 38; + /* The minimum height of the control */ + + var menuGutter = baseUnit * 2; + /* The amount of space between the control and menu */ + + var spacing = { + baseUnit: baseUnit, + controlHeight: controlHeight, + menuGutter: menuGutter + }; + var defaultTheme = { + borderRadius: borderRadius, + colors: colors$1, + spacing: spacing + }; + + var defaultProps = { + backspaceRemovesValue: true, + blurInputOnSelect: isTouchCapable(), + captureMenuScroll: !isTouchCapable(), + closeMenuOnSelect: true, + closeMenuOnScroll: false, + components: {}, + controlShouldRenderValue: true, + escapeClearsValue: false, + filterOption: createFilter(), + formatGroupLabel: formatGroupLabel, + getOptionLabel: getOptionLabel, + getOptionValue: getOptionValue, + isDisabled: false, + isLoading: false, + isMulti: false, + isRtl: false, + isSearchable: true, + isOptionDisabled: isOptionDisabled, + loadingMessage: function loadingMessage() { + return 'Loading...'; + }, + maxMenuHeight: 300, + minMenuHeight: 140, + menuIsOpen: false, + menuPlacement: 'bottom', + menuPosition: 'absolute', + menuShouldBlockScroll: false, + menuShouldScrollIntoView: !isMobileDevice(), + noOptionsMessage: function noOptionsMessage() { + return 'No options'; + }, + openMenuOnFocus: false, + openMenuOnClick: true, + options: [], + pageSize: 5, + placeholder: 'Select...', + screenReaderStatus: function screenReaderStatus(_ref) { + var count = _ref.count; + return "".concat(count, " result").concat(count !== 1 ? 's' : '', " available"); + }, + styles: {}, + tabIndex: '0', + tabSelectsValue: true + }; + var instanceId = 1; + + var Select = + /*#__PURE__*/ + function (_Component) { + _inherits$1(Select, _Component); + + // Misc. Instance Properties + // ------------------------------ + // TODO + // Refs + // ------------------------------ + // Lifecycle + // ------------------------------ + function Select(_props) { + var _this; + + _classCallCheck$1(this, Select); + + _this = _possibleConstructorReturn$1(this, _getPrototypeOf(Select).call(this, _props)); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "state", { + ariaLiveSelection: '', + ariaLiveContext: '', + focusedOption: null, + focusedValue: null, + inputIsHidden: false, + isFocused: false, + isComposing: false, + menuOptions: { + render: [], + focusable: [] + }, + selectValue: [] + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "blockOptionHover", false); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "clearFocusValueOnUpdate", false); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "commonProps", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "components", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "hasGroups", false); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "initialTouchX", 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "initialTouchY", 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "inputIsHiddenAfterUpdate", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "instancePrefix", ''); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "openAfterFocus", false); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "scrollToFocusedOptionOnUpdate", false); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "userIsDragging", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "controlRef", null); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getControlRef", function (ref) { + _this.controlRef = ref; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "focusedOptionRef", null); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getFocusedOptionRef", function (ref) { + _this.focusedOptionRef = ref; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "menuListRef", null); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getMenuListRef", function (ref) { + _this.menuListRef = ref; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "inputRef", null); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getInputRef", function (ref) { + _this.inputRef = ref; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "cacheComponents", function (components$$1) { + _this.components = defaultComponents({ + components: components$$1 + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "focus", _this.focusInput); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "blur", _this.blurInput); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onChange", function (newValue, actionMeta) { + var _this$props = _this.props, + onChange = _this$props.onChange, + name = _this$props.name; + onChange(newValue, _objectSpread$1({}, actionMeta, { + name: name + })); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "setValue", function (newValue) { + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'set-value'; + var option = arguments.length > 2 ? arguments[2] : undefined; + var _this$props2 = _this.props, + closeMenuOnSelect = _this$props2.closeMenuOnSelect, + isMulti = _this$props2.isMulti; + + _this.onInputChange('', { + action: 'set-value' + }); + + if (closeMenuOnSelect) { + _this.inputIsHiddenAfterUpdate = !isMulti; + + _this.onMenuClose(); + } // when the select value should change, we should reset focusedValue + + + _this.clearFocusValueOnUpdate = true; + + _this.onChange(newValue, { + action: action, + option: option + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "selectOption", function (newValue) { + var _this$props3 = _this.props, + blurInputOnSelect = _this$props3.blurInputOnSelect, + isMulti = _this$props3.isMulti; + var selectValue = _this.state.selectValue; + + if (isMulti) { + if (_this.isOptionSelected(newValue, selectValue)) { + var candidate = _this.getOptionValue(newValue); + + _this.setValue(selectValue.filter(function (i) { + return _this.getOptionValue(i) !== candidate; + }), 'deselect-option', newValue); + + _this.announceAriaLiveSelection({ + event: 'deselect-option', + context: { + value: _this.getOptionLabel(newValue) + } + }); + } else { + if (!_this.isOptionDisabled(newValue, selectValue)) { + _this.setValue([].concat(_toConsumableArray(selectValue), [newValue]), 'select-option', newValue); + + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue) + } + }); + } else { + // announce that option is disabled + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue), + isDisabled: true + } + }); + } + } + } else { + if (!_this.isOptionDisabled(newValue, selectValue)) { + _this.setValue(newValue, 'select-option'); + + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue) + } + }); + } else { + // announce that option is disabled + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue), + isDisabled: true + } + }); + } + } + + if (blurInputOnSelect) { + _this.blurInput(); + } + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "removeValue", function (removedValue) { + var selectValue = _this.state.selectValue; + + var candidate = _this.getOptionValue(removedValue); + + _this.onChange(selectValue.filter(function (i) { + return _this.getOptionValue(i) !== candidate; + }), { + action: 'remove-value', + removedValue: removedValue + }); + + _this.announceAriaLiveSelection({ + event: 'remove-value', + context: { + value: removedValue ? _this.getOptionLabel(removedValue) : '' + } + }); + + _this.focusInput(); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "clearValue", function () { + var isMulti = _this.props.isMulti; + + _this.onChange(isMulti ? [] : null, { + action: 'clear' + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "popValue", function () { + var selectValue = _this.state.selectValue; + var lastSelectedValue = selectValue[selectValue.length - 1]; + + _this.announceAriaLiveSelection({ + event: 'pop-value', + context: { + value: lastSelectedValue ? _this.getOptionLabel(lastSelectedValue) : '' + } + }); + + _this.onChange(selectValue.slice(0, selectValue.length - 1), { + action: 'pop-value', + removedValue: lastSelectedValue + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getOptionLabel", function (data) { + return _this.props.getOptionLabel(data); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getOptionValue", function (data) { + return _this.props.getOptionValue(data); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getStyles", function (key, props) { + var base = defaultStyles[key](props); + base.boxSizing = 'border-box'; + var custom = _this.props.styles[key]; + return custom ? custom(base, props) : base; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getElementId", function (element) { + return "".concat(_this.instancePrefix, "-").concat(element); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getActiveDescendentId", function () { + var menuIsOpen = _this.props.menuIsOpen; + var _this$state = _this.state, + menuOptions = _this$state.menuOptions, + focusedOption = _this$state.focusedOption; + if (!focusedOption || !menuIsOpen) return undefined; + var index = menuOptions.focusable.indexOf(focusedOption); + var option = menuOptions.render[index]; + return option && option.key; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "announceAriaLiveSelection", function (_ref2) { + var event = _ref2.event, + context = _ref2.context; + + _this.setState({ + ariaLiveSelection: valueEventAriaMessage(event, context) + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "announceAriaLiveContext", function (_ref3) { + var event = _ref3.event, + context = _ref3.context; + + _this.setState({ + ariaLiveContext: instructionsAriaMessage(event, _objectSpread$1({}, context, { + label: _this.props['aria-label'] + })) + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onMenuMouseDown", function (event) { + if (event.button !== 0) { + return; + } + + event.stopPropagation(); + event.preventDefault(); + + _this.focusInput(); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onMenuMouseMove", function (event) { + _this.blockOptionHover = false; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onControlMouseDown", function (event) { + var openMenuOnClick = _this.props.openMenuOnClick; + + if (!_this.state.isFocused) { + if (openMenuOnClick) { + _this.openAfterFocus = true; + } + + _this.focusInput(); + } else if (!_this.props.menuIsOpen) { + if (openMenuOnClick) { + _this.openMenu('first'); + } + } else { + //$FlowFixMe + if (event.target.tagName !== 'INPUT') { + _this.onMenuClose(); + } + } //$FlowFixMe + + + if (event.target.tagName !== 'INPUT') { + event.preventDefault(); + } + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onDropdownIndicatorMouseDown", function (event) { + // ignore mouse events that weren't triggered by the primary button + if (event && event.type === 'mousedown' && event.button !== 0) { + return; + } + + if (_this.props.isDisabled) return; + var _this$props4 = _this.props, + isMulti = _this$props4.isMulti, + menuIsOpen = _this$props4.menuIsOpen; + + _this.focusInput(); + + if (menuIsOpen) { + _this.inputIsHiddenAfterUpdate = !isMulti; + + _this.onMenuClose(); + } else { + _this.openMenu('first'); + } + + event.preventDefault(); + event.stopPropagation(); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onClearIndicatorMouseDown", function (event) { + // ignore mouse events that weren't triggered by the primary button + if (event && event.type === 'mousedown' && event.button !== 0) { + return; + } + + _this.clearValue(); + + event.stopPropagation(); + _this.openAfterFocus = false; + setTimeout(function () { + return _this.focusInput(); + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onScroll", function (event) { + if (typeof _this.props.closeMenuOnScroll === 'boolean') { + if (event.target instanceof HTMLElement && isDocumentElement(event.target)) { + _this.props.onMenuClose(); + } + } else if (typeof _this.props.closeMenuOnScroll === 'function') { + if (_this.props.closeMenuOnScroll(event)) { + _this.props.onMenuClose(); + } + } + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onCompositionStart", function () { + _this.setState({ + isComposing: true + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onCompositionEnd", function () { + _this.setState({ + isComposing: false + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onTouchStart", function (_ref4) { + var touches = _ref4.touches; + var touch = touches.item(0); + + if (!touch) { + return; + } + + _this.initialTouchX = touch.clientX; + _this.initialTouchY = touch.clientY; + _this.userIsDragging = false; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onTouchMove", function (_ref5) { + var touches = _ref5.touches; + var touch = touches.item(0); + + if (!touch) { + return; + } + + var deltaX = Math.abs(touch.clientX - _this.initialTouchX); + var deltaY = Math.abs(touch.clientY - _this.initialTouchY); + var moveThreshold = 5; + _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onTouchEnd", function (event) { + if (_this.userIsDragging) return; // close the menu if the user taps outside + // we're checking on event.target here instead of event.currentTarget, because we want to assert information + // on events on child elements, not the document (which we've attached this handler to). + + if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) { + _this.blurInput(); + } // reset move vars + + + _this.initialTouchX = 0; + _this.initialTouchY = 0; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onControlTouchEnd", function (event) { + if (_this.userIsDragging) return; + + _this.onControlMouseDown(event); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onClearIndicatorTouchEnd", function (event) { + if (_this.userIsDragging) return; + + _this.onClearIndicatorMouseDown(event); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onDropdownIndicatorTouchEnd", function (event) { + if (_this.userIsDragging) return; + + _this.onDropdownIndicatorMouseDown(event); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "handleInputChange", function (event) { + var inputValue = event.currentTarget.value; + _this.inputIsHiddenAfterUpdate = false; + + _this.onInputChange(inputValue, { + action: 'input-change' + }); + + _this.onMenuOpen(); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onInputFocus", function (event) { + var _this$props5 = _this.props, + isSearchable = _this$props5.isSearchable, + isMulti = _this$props5.isMulti; + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + + _this.inputIsHiddenAfterUpdate = false; + + _this.announceAriaLiveContext({ + event: 'input', + context: { + isSearchable: isSearchable, + isMulti: isMulti + } + }); + + _this.setState({ + isFocused: true + }); + + if (_this.openAfterFocus || _this.props.openMenuOnFocus) { + _this.openMenu('first'); + } + + _this.openAfterFocus = false; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onInputBlur", function (event) { + if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) { + _this.inputRef.focus(); + + return; + } + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + + _this.onInputChange('', { + action: 'input-blur' + }); + + _this.onMenuClose(); + + _this.setState({ + focusedValue: null, + isFocused: false + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onOptionHover", function (focusedOption) { + if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) { + return; + } + + _this.setState({ + focusedOption: focusedOption + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "shouldHideSelectedOptions", function () { + var _this$props6 = _this.props, + hideSelectedOptions = _this$props6.hideSelectedOptions, + isMulti = _this$props6.isMulti; + if (hideSelectedOptions === undefined) return isMulti; + return hideSelectedOptions; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onKeyDown", function (event) { + var _this$props7 = _this.props, + isMulti = _this$props7.isMulti, + backspaceRemovesValue = _this$props7.backspaceRemovesValue, + escapeClearsValue = _this$props7.escapeClearsValue, + inputValue = _this$props7.inputValue, + isClearable = _this$props7.isClearable, + isDisabled = _this$props7.isDisabled, + menuIsOpen = _this$props7.menuIsOpen, + onKeyDown = _this$props7.onKeyDown, + tabSelectsValue = _this$props7.tabSelectsValue, + openMenuOnFocus = _this$props7.openMenuOnFocus; + var _this$state2 = _this.state, + isComposing = _this$state2.isComposing, + focusedOption = _this$state2.focusedOption, + focusedValue = _this$state2.focusedValue, + selectValue = _this$state2.selectValue; + if (isDisabled) return; + + if (typeof onKeyDown === 'function') { + onKeyDown(event); + + if (event.defaultPrevented) { + return; + } + } // Block option hover events when the user has just pressed a key + + + _this.blockOptionHover = true; + + switch (event.key) { + case 'ArrowLeft': + if (!isMulti || inputValue) return; + + _this.focusValue('previous'); + + break; + + case 'ArrowRight': + if (!isMulti || inputValue) return; + + _this.focusValue('next'); + + break; + + case 'Delete': + case 'Backspace': + if (inputValue) return; + + if (focusedValue) { + _this.removeValue(focusedValue); + } else { + if (!backspaceRemovesValue) return; + + if (isMulti) { + _this.popValue(); + } else if (isClearable) { + _this.clearValue(); + } + } + + break; + + case 'Tab': + if (isComposing) return; + + if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused + // option is already selected; it breaks the flow of navigation + openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) { + return; + } + + _this.selectOption(focusedOption); + + break; + + case 'Enter': + if (menuIsOpen) { + if (!focusedOption) return; + if (isComposing) return; + + _this.selectOption(focusedOption); + + break; + } + + return; + + case 'Escape': + if (menuIsOpen) { + _this.inputIsHiddenAfterUpdate = false; + + _this.onInputChange('', { + action: 'menu-close' + }); + + _this.onMenuClose(); + } else if (isClearable && escapeClearsValue) { + _this.clearValue(); + } + + break; + + case ' ': + // space + if (inputValue) { + return; + } + + if (!menuIsOpen) { + _this.openMenu('first'); + + break; + } + + if (!focusedOption) return; + + _this.selectOption(focusedOption); + + break; + + case 'ArrowUp': + if (menuIsOpen) { + _this.focusOption('up'); + } else { + _this.openMenu('last'); + } + + break; + + case 'ArrowDown': + if (menuIsOpen) { + _this.focusOption('down'); + } else { + _this.openMenu('first'); + } + + break; + + case 'PageUp': + if (!menuIsOpen) return; + + _this.focusOption('pageup'); + + break; + + case 'PageDown': + if (!menuIsOpen) return; + + _this.focusOption('pagedown'); + + break; + + case 'Home': + if (!menuIsOpen) return; + + _this.focusOption('first'); + + break; + + case 'End': + if (!menuIsOpen) return; + + _this.focusOption('last'); + + break; + + default: + return; + } + + event.preventDefault(); + }); + + var value = _props.value; + _this.cacheComponents = index(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized$1(_assertThisInitialized$1(_this))); + + _this.cacheComponents(_props.components); + + _this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId); + + var _selectValue = cleanValue(value); + + var _menuOptions = _this.buildMenuOptions(_props, _selectValue); + + _this.state.menuOptions = _menuOptions; + _this.state.selectValue = _selectValue; + return _this; + } + + _createClass$1(Select, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.startListeningComposition(); + this.startListeningToTouch(); + + if (this.props.closeMenuOnScroll && document && document.addEventListener) { + // Listen to all scroll events, and filter them out inside of 'onScroll' + document.addEventListener('scroll', this.onScroll, true); + } + + if (this.props.autoFocus) { + this.focusInput(); + } + } + }, { + key: "componentWillReceiveProps", + value: function componentWillReceiveProps(nextProps) { + var _this$props8 = this.props, + options = _this$props8.options, + value = _this$props8.value, + inputValue = _this$props8.inputValue; // re-cache custom components + + this.cacheComponents(nextProps.components); // rebuild the menu options + + if (nextProps.value !== value || nextProps.options !== options || nextProps.inputValue !== inputValue) { + var selectValue = cleanValue(nextProps.value); + var menuOptions = this.buildMenuOptions(nextProps, selectValue); + var focusedValue = this.getNextFocusedValue(selectValue); + var focusedOption = this.getNextFocusedOption(menuOptions.focusable); + this.setState({ + menuOptions: menuOptions, + selectValue: selectValue, + focusedOption: focusedOption, + focusedValue: focusedValue + }); + } // some updates should toggle the state of the input visibility + + + if (this.inputIsHiddenAfterUpdate != null) { + this.setState({ + inputIsHidden: this.inputIsHiddenAfterUpdate + }); + delete this.inputIsHiddenAfterUpdate; + } + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + var _this$props9 = this.props, + isDisabled = _this$props9.isDisabled, + menuIsOpen = _this$props9.menuIsOpen; + var isFocused = this.state.isFocused; + + if ( // ensure focus is restored correctly when the control becomes enabled + isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens + isFocused && menuIsOpen && !prevProps.menuIsOpen) { + this.focusInput(); + } // scroll the focused option into view if necessary + + + if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) { + scrollIntoView(this.menuListRef, this.focusedOptionRef); + } + + this.scrollToFocusedOptionOnUpdate = false; + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.stopListeningComposition(); + this.stopListeningToTouch(); + document.removeEventListener('scroll', this.onScroll, true); + } + }, { + key: "onMenuOpen", + // ============================== + // Consumer Handlers + // ============================== + value: function onMenuOpen() { + this.props.onMenuOpen(); + } + }, { + key: "onMenuClose", + value: function onMenuClose() { + var _this$props10 = this.props, + isSearchable = _this$props10.isSearchable, + isMulti = _this$props10.isMulti; + this.announceAriaLiveContext({ + event: 'input', + context: { + isSearchable: isSearchable, + isMulti: isMulti + } + }); + this.onInputChange('', { + action: 'menu-close' + }); + this.props.onMenuClose(); + } + }, { + key: "onInputChange", + value: function onInputChange(newValue, actionMeta) { + this.props.onInputChange(newValue, actionMeta); + } // ============================== + // Methods + // ============================== + + }, { + key: "focusInput", + value: function focusInput() { + if (!this.inputRef) return; + this.inputRef.focus(); + } + }, { + key: "blurInput", + value: function blurInput() { + if (!this.inputRef) return; + this.inputRef.blur(); + } // aliased for consumers + + }, { + key: "openMenu", + value: function openMenu(focusOption) { + var _this$state3 = this.state, + menuOptions = _this$state3.menuOptions, + selectValue = _this$state3.selectValue, + isFocused = _this$state3.isFocused; + var isMulti = this.props.isMulti; + var openAtIndex = focusOption === 'first' ? 0 : menuOptions.focusable.length - 1; + + if (!isMulti) { + var selectedIndex = menuOptions.focusable.indexOf(selectValue[0]); + + if (selectedIndex > -1) { + openAtIndex = selectedIndex; + } + } // only scroll if the menu isn't already open + + + this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef); + this.inputIsHiddenAfterUpdate = false; + this.onMenuOpen(); + this.setState({ + focusedValue: null, + focusedOption: menuOptions.focusable[openAtIndex] + }); + this.announceAriaLiveContext({ + event: 'menu' + }); + } + }, { + key: "focusValue", + value: function focusValue(direction) { + var _this$props11 = this.props, + isMulti = _this$props11.isMulti, + isSearchable = _this$props11.isSearchable; + var _this$state4 = this.state, + selectValue = _this$state4.selectValue, + focusedValue = _this$state4.focusedValue; // Only multiselects support value focusing + + if (!isMulti) return; + this.setState({ + focusedOption: null + }); + var focusedIndex = selectValue.indexOf(focusedValue); + + if (!focusedValue) { + focusedIndex = -1; + this.announceAriaLiveContext({ + event: 'value' + }); + } + + var lastIndex = selectValue.length - 1; + var nextFocus = -1; + if (!selectValue.length) return; + + switch (direction) { + case 'previous': + if (focusedIndex === 0) { + // don't cycle from the start to the end + nextFocus = 0; + } else if (focusedIndex === -1) { + // if nothing is focused, focus the last value first + nextFocus = lastIndex; + } else { + nextFocus = focusedIndex - 1; + } + + break; + + case 'next': + if (focusedIndex > -1 && focusedIndex < lastIndex) { + nextFocus = focusedIndex + 1; + } + + break; + } + + if (nextFocus === -1) { + this.announceAriaLiveContext({ + event: 'input', + context: { + isSearchable: isSearchable, + isMulti: isMulti + } + }); + } + + this.setState({ + inputIsHidden: nextFocus === -1 ? false : true, + focusedValue: selectValue[nextFocus] + }); + } + }, { + key: "focusOption", + value: function focusOption() { + var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first'; + var pageSize = this.props.pageSize; + var _this$state5 = this.state, + focusedOption = _this$state5.focusedOption, + menuOptions = _this$state5.menuOptions; + var options = menuOptions.focusable; + if (!options.length) return; + var nextFocus = 0; // handles 'first' + + var focusedIndex = options.indexOf(focusedOption); + + if (!focusedOption) { + focusedIndex = -1; + this.announceAriaLiveContext({ + event: 'menu' + }); + } + + if (direction === 'up') { + nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1; + } else if (direction === 'down') { + nextFocus = (focusedIndex + 1) % options.length; + } else if (direction === 'pageup') { + nextFocus = focusedIndex - pageSize; + if (nextFocus < 0) nextFocus = 0; + } else if (direction === 'pagedown') { + nextFocus = focusedIndex + pageSize; + if (nextFocus > options.length - 1) nextFocus = options.length - 1; + } else if (direction === 'last') { + nextFocus = options.length - 1; + } + + this.scrollToFocusedOptionOnUpdate = true; + this.setState({ + focusedOption: options[nextFocus], + focusedValue: null + }); + this.announceAriaLiveContext({ + event: 'menu', + context: { + isDisabled: isOptionDisabled(options[nextFocus]) + } + }); + } + }, { + key: "getTheme", + // ============================== + // Getters + // ============================== + value: function getTheme() { + // Use the default theme if there are no customizations. + if (!this.props.theme) { + return defaultTheme; + } // If the theme prop is a function, assume the function + // knows how to merge the passed-in default theme with + // its own modifications. + + + if (typeof this.props.theme === 'function') { + return this.props.theme(defaultTheme); + } // Otherwise, if a plain theme object was passed in, + // overlay it with the default theme. + + + return _objectSpread$1({}, defaultTheme, this.props.theme); + } + }, { + key: "getCommonProps", + value: function getCommonProps() { + var clearValue = this.clearValue, + getStyles = this.getStyles, + setValue = this.setValue, + selectOption = this.selectOption, + props = this.props; + var classNamePrefix = props.classNamePrefix, + isMulti = props.isMulti, + isRtl = props.isRtl, + options = props.options; + var selectValue = this.state.selectValue; + var hasValue = this.hasValue(); + + var getValue = function getValue() { + return selectValue; + }; + + var cx = classNames.bind(null, classNamePrefix); + return { + cx: cx, + clearValue: clearValue, + getStyles: getStyles, + getValue: getValue, + hasValue: hasValue, + isMulti: isMulti, + isRtl: isRtl, + options: options, + selectOption: selectOption, + setValue: setValue, + selectProps: props, + theme: this.getTheme() + }; + } + }, { + key: "getNextFocusedValue", + value: function getNextFocusedValue(nextSelectValue) { + if (this.clearFocusValueOnUpdate) { + this.clearFocusValueOnUpdate = false; + return null; + } + + var _this$state6 = this.state, + focusedValue = _this$state6.focusedValue, + lastSelectValue = _this$state6.selectValue; + var lastFocusedIndex = lastSelectValue.indexOf(focusedValue); + + if (lastFocusedIndex > -1) { + var nextFocusedIndex = nextSelectValue.indexOf(focusedValue); + + if (nextFocusedIndex > -1) { + // the focused value is still in the selectValue, return it + return focusedValue; + } else if (lastFocusedIndex < nextSelectValue.length) { + // the focusedValue is not present in the next selectValue array by + // reference, so return the new value at the same index + return nextSelectValue[lastFocusedIndex]; + } + } + + return null; + } + }, { + key: "getNextFocusedOption", + value: function getNextFocusedOption(options) { + var lastFocusedOption = this.state.focusedOption; + return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0]; + } + }, { + key: "hasValue", + value: function hasValue() { + var selectValue = this.state.selectValue; + return selectValue.length > 0; + } + }, { + key: "hasOptions", + value: function hasOptions() { + return !!this.state.menuOptions.render.length; + } + }, { + key: "countOptions", + value: function countOptions() { + return this.state.menuOptions.focusable.length; + } + }, { + key: "isClearable", + value: function isClearable() { + var _this$props12 = this.props, + isClearable = _this$props12.isClearable, + isMulti = _this$props12.isMulti; // single select, by default, IS NOT clearable + // multi select, by default, IS clearable + + if (isClearable === undefined) return isMulti; + return isClearable; + } + }, { + key: "isOptionDisabled", + value: function isOptionDisabled$$1(option, selectValue) { + return typeof this.props.isOptionDisabled === 'function' ? this.props.isOptionDisabled(option, selectValue) : false; + } + }, { + key: "isOptionSelected", + value: function isOptionSelected(option, selectValue) { + var _this2 = this; + + if (selectValue.indexOf(option) > -1) return true; + + if (typeof this.props.isOptionSelected === 'function') { + return this.props.isOptionSelected(option, selectValue); + } + + var candidate = this.getOptionValue(option); + return selectValue.some(function (i) { + return _this2.getOptionValue(i) === candidate; + }); + } + }, { + key: "filterOption", + value: function filterOption(option, inputValue) { + return this.props.filterOption ? this.props.filterOption(option, inputValue) : true; + } + }, { + key: "formatOptionLabel", + value: function formatOptionLabel(data, context) { + if (typeof this.props.formatOptionLabel === 'function') { + var inputValue = this.props.inputValue; + var selectValue = this.state.selectValue; + return this.props.formatOptionLabel(data, { + context: context, + inputValue: inputValue, + selectValue: selectValue + }); + } else { + return this.getOptionLabel(data); + } + } + }, { + key: "formatGroupLabel", + value: function formatGroupLabel$$1(data) { + return this.props.formatGroupLabel(data); + } // ============================== + // Mouse Handlers + // ============================== + + }, { + key: "startListeningComposition", + // ============================== + // Composition Handlers + // ============================== + value: function startListeningComposition() { + if (document && document.addEventListener) { + document.addEventListener('compositionstart', this.onCompositionStart, false); + document.addEventListener('compositionend', this.onCompositionEnd, false); + } + } + }, { + key: "stopListeningComposition", + value: function stopListeningComposition() { + if (document && document.removeEventListener) { + document.removeEventListener('compositionstart', this.onCompositionStart); + document.removeEventListener('compositionend', this.onCompositionEnd); + } + } + }, { + key: "startListeningToTouch", + // ============================== + // Touch Handlers + // ============================== + value: function startListeningToTouch() { + if (document && document.addEventListener) { + document.addEventListener('touchstart', this.onTouchStart, false); + document.addEventListener('touchmove', this.onTouchMove, false); + document.addEventListener('touchend', this.onTouchEnd, false); + } + } + }, { + key: "stopListeningToTouch", + value: function stopListeningToTouch() { + if (document && document.removeEventListener) { + document.removeEventListener('touchstart', this.onTouchStart); + document.removeEventListener('touchmove', this.onTouchMove); + document.removeEventListener('touchend', this.onTouchEnd); + } + } + }, { + key: "buildMenuOptions", + // ============================== + // Menu Options + // ============================== + value: function buildMenuOptions(props, selectValue) { + var _this3 = this; + + var _props$inputValue = props.inputValue, + inputValue = _props$inputValue === void 0 ? '' : _props$inputValue, + options = props.options; + + var toOption = function toOption(option, id) { + var isDisabled = _this3.isOptionDisabled(option, selectValue); + + var isSelected = _this3.isOptionSelected(option, selectValue); + + var label = _this3.getOptionLabel(option); + + var value = _this3.getOptionValue(option); + + if (_this3.shouldHideSelectedOptions() && isSelected || !_this3.filterOption({ + label: label, + value: value, + data: option + }, inputValue)) { + return; + } + + var onHover = isDisabled ? undefined : function () { + return _this3.onOptionHover(option); + }; + var onSelect = isDisabled ? undefined : function () { + return _this3.selectOption(option); + }; + var optionId = "".concat(_this3.getElementId('option'), "-").concat(id); + return { + innerProps: { + id: optionId, + onClick: onSelect, + onMouseMove: onHover, + onMouseOver: onHover, + tabIndex: -1 + }, + data: option, + isDisabled: isDisabled, + isSelected: isSelected, + key: optionId, + label: label, + type: 'option', + value: value + }; + }; + + return options.reduce(function (acc, item, itemIndex) { + if (item.options) { + // TODO needs a tidier implementation + if (!_this3.hasGroups) _this3.hasGroups = true; + var items = item.options; + var children = items.map(function (child, i) { + var option = toOption(child, "".concat(itemIndex, "-").concat(i)); + if (option) acc.focusable.push(child); + return option; + }).filter(Boolean); + + if (children.length) { + var groupId = "".concat(_this3.getElementId('group'), "-").concat(itemIndex); + acc.render.push({ + type: 'group', + key: groupId, + data: item, + options: children + }); + } + } else { + var option = toOption(item, "".concat(itemIndex)); + + if (option) { + acc.render.push(option); + acc.focusable.push(item); + } + } + + return acc; + }, { + render: [], + focusable: [] + }); + } // ============================== + // Renderers + // ============================== + + }, { + key: "constructAriaLiveMessage", + value: function constructAriaLiveMessage() { + var _this$state7 = this.state, + ariaLiveContext = _this$state7.ariaLiveContext, + selectValue = _this$state7.selectValue, + focusedValue = _this$state7.focusedValue, + focusedOption = _this$state7.focusedOption; + var _this$props13 = this.props, + options = _this$props13.options, + menuIsOpen = _this$props13.menuIsOpen, + inputValue = _this$props13.inputValue, + screenReaderStatus = _this$props13.screenReaderStatus; // An aria live message representing the currently focused value in the select. + + var focusedValueMsg = focusedValue ? valueFocusAriaMessage({ + focusedValue: focusedValue, + getOptionLabel: this.getOptionLabel, + selectValue: selectValue + }) : ''; // An aria live message representing the currently focused option in the select. + + var focusedOptionMsg = focusedOption && menuIsOpen ? optionFocusAriaMessage({ + focusedOption: focusedOption, + getOptionLabel: this.getOptionLabel, + options: options + }) : ''; // An aria live message representing the set of focusable results and current searchterm/inputvalue. + + var resultsMsg = resultsAriaMessage({ + inputValue: inputValue, + screenReaderMessage: screenReaderStatus({ + count: this.countOptions() + }) + }); + return "".concat(focusedValueMsg, " ").concat(focusedOptionMsg, " ").concat(resultsMsg, " ").concat(ariaLiveContext); + } + }, { + key: "renderInput", + value: function renderInput() { + var _this$props14 = this.props, + isDisabled = _this$props14.isDisabled, + isSearchable = _this$props14.isSearchable, + inputId = _this$props14.inputId, + inputValue = _this$props14.inputValue, + tabIndex = _this$props14.tabIndex; + var Input = this.components.Input; + var inputIsHidden = this.state.inputIsHidden; + var id = inputId || this.getElementId('input'); + + if (!isSearchable) { + // use a dummy input to maintain focus/blur functionality + return React__default.createElement(DummyInput, { + id: id, + innerRef: this.getInputRef, + onBlur: this.onInputBlur, + onChange: noop, + onFocus: this.onInputFocus, + readOnly: true, + disabled: isDisabled, + tabIndex: tabIndex, + value: "" + }); + } // aria attributes makes the JSX "noisy", separated for clarity + + + var ariaAttributes = { + 'aria-autocomplete': 'list', + 'aria-label': this.props['aria-label'], + 'aria-labelledby': this.props['aria-labelledby'] + }; + var _this$commonProps = this.commonProps, + cx = _this$commonProps.cx, + theme = _this$commonProps.theme, + selectProps = _this$commonProps.selectProps; + return React__default.createElement(Input, _extends({ + autoCapitalize: "none", + autoComplete: "off", + autoCorrect: "off", + cx: cx, + getStyles: this.getStyles, + id: id, + innerRef: this.getInputRef, + isDisabled: isDisabled, + isHidden: inputIsHidden, + onBlur: this.onInputBlur, + onChange: this.handleInputChange, + onFocus: this.onInputFocus, + selectProps: selectProps, + spellCheck: "false", + tabIndex: tabIndex, + theme: theme, + type: "text", + value: inputValue + }, ariaAttributes)); + } + }, { + key: "renderPlaceholderOrValue", + value: function renderPlaceholderOrValue() { + var _this4 = this; + + var _this$components = this.components, + MultiValue = _this$components.MultiValue, + MultiValueContainer = _this$components.MultiValueContainer, + MultiValueLabel = _this$components.MultiValueLabel, + MultiValueRemove = _this$components.MultiValueRemove, + SingleValue = _this$components.SingleValue, + Placeholder = _this$components.Placeholder; + var commonProps = this.commonProps; + var _this$props15 = this.props, + controlShouldRenderValue = _this$props15.controlShouldRenderValue, + isDisabled = _this$props15.isDisabled, + isMulti = _this$props15.isMulti, + inputValue = _this$props15.inputValue, + placeholder = _this$props15.placeholder; + var _this$state8 = this.state, + selectValue = _this$state8.selectValue, + focusedValue = _this$state8.focusedValue, + isFocused = _this$state8.isFocused; + + if (!this.hasValue() || !controlShouldRenderValue) { + return inputValue ? null : React__default.createElement(Placeholder, _extends({}, commonProps, { + key: "placeholder", + isDisabled: isDisabled, + isFocused: isFocused + }), placeholder); + } + + if (isMulti) { + var selectValues = selectValue.map(function (opt) { + var isFocused = opt === focusedValue; + return React__default.createElement(MultiValue, _extends({}, commonProps, { + components: { + Container: MultiValueContainer, + Label: MultiValueLabel, + Remove: MultiValueRemove + }, + isFocused: isFocused, + isDisabled: isDisabled, + key: _this4.getOptionValue(opt), + removeProps: { + onClick: function onClick() { + return _this4.removeValue(opt); + }, + onTouchEnd: function onTouchEnd() { + return _this4.removeValue(opt); + }, + onMouseDown: function onMouseDown(e) { + e.preventDefault(); + e.stopPropagation(); + } + }, + data: opt + }), _this4.formatOptionLabel(opt, 'value')); + }); + return selectValues; + } + + if (inputValue) { + return null; + } + + var singleValue = selectValue[0]; + return React__default.createElement(SingleValue, _extends({}, commonProps, { + data: singleValue, + isDisabled: isDisabled + }), this.formatOptionLabel(singleValue, 'value')); + } + }, { + key: "renderClearIndicator", + value: function renderClearIndicator() { + var ClearIndicator = this.components.ClearIndicator; + var commonProps = this.commonProps; + var _this$props16 = this.props, + isDisabled = _this$props16.isDisabled, + isLoading = _this$props16.isLoading; + var isFocused = this.state.isFocused; + + if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) { + return null; + } + + var innerProps = { + onMouseDown: this.onClearIndicatorMouseDown, + onTouchEnd: this.onClearIndicatorTouchEnd, + 'aria-hidden': 'true' + }; + return React__default.createElement(ClearIndicator, _extends({}, commonProps, { + innerProps: innerProps, + isFocused: isFocused + })); + } + }, { + key: "renderLoadingIndicator", + value: function renderLoadingIndicator() { + var LoadingIndicator = this.components.LoadingIndicator; + var commonProps = this.commonProps; + var _this$props17 = this.props, + isDisabled = _this$props17.isDisabled, + isLoading = _this$props17.isLoading; + var isFocused = this.state.isFocused; + if (!LoadingIndicator || !isLoading) return null; + var innerProps = { + 'aria-hidden': 'true' + }; + return React__default.createElement(LoadingIndicator, _extends({}, commonProps, { + innerProps: innerProps, + isDisabled: isDisabled, + isFocused: isFocused + })); + } + }, { + key: "renderIndicatorSeparator", + value: function renderIndicatorSeparator() { + var _this$components2 = this.components, + DropdownIndicator = _this$components2.DropdownIndicator, + IndicatorSeparator = _this$components2.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator + + if (!DropdownIndicator || !IndicatorSeparator) return null; + var commonProps = this.commonProps; + var isDisabled = this.props.isDisabled; + var isFocused = this.state.isFocused; + return React__default.createElement(IndicatorSeparator, _extends({}, commonProps, { + isDisabled: isDisabled, + isFocused: isFocused + })); + } + }, { + key: "renderDropdownIndicator", + value: function renderDropdownIndicator() { + var DropdownIndicator = this.components.DropdownIndicator; + if (!DropdownIndicator) return null; + var commonProps = this.commonProps; + var isDisabled = this.props.isDisabled; + var isFocused = this.state.isFocused; + var innerProps = { + onMouseDown: this.onDropdownIndicatorMouseDown, + onTouchEnd: this.onDropdownIndicatorTouchEnd, + 'aria-hidden': 'true' + }; + return React__default.createElement(DropdownIndicator, _extends({}, commonProps, { + innerProps: innerProps, + isDisabled: isDisabled, + isFocused: isFocused + })); + } + }, { + key: "renderMenu", + value: function renderMenu() { + var _this5 = this; + + var _this$components3 = this.components, + Group = _this$components3.Group, + GroupHeading = _this$components3.GroupHeading, + Menu$$1 = _this$components3.Menu, + MenuList$$1 = _this$components3.MenuList, + MenuPortal$$1 = _this$components3.MenuPortal, + LoadingMessage$$1 = _this$components3.LoadingMessage, + NoOptionsMessage$$1 = _this$components3.NoOptionsMessage, + Option = _this$components3.Option; + var commonProps = this.commonProps; + var _this$state9 = this.state, + focusedOption = _this$state9.focusedOption, + menuOptions = _this$state9.menuOptions; + var _this$props18 = this.props, + captureMenuScroll = _this$props18.captureMenuScroll, + inputValue = _this$props18.inputValue, + isLoading = _this$props18.isLoading, + loadingMessage = _this$props18.loadingMessage, + minMenuHeight = _this$props18.minMenuHeight, + maxMenuHeight = _this$props18.maxMenuHeight, + menuIsOpen = _this$props18.menuIsOpen, + menuPlacement = _this$props18.menuPlacement, + menuPosition = _this$props18.menuPosition, + menuPortalTarget = _this$props18.menuPortalTarget, + menuShouldBlockScroll = _this$props18.menuShouldBlockScroll, + menuShouldScrollIntoView = _this$props18.menuShouldScrollIntoView, + noOptionsMessage = _this$props18.noOptionsMessage, + onMenuScrollToTop = _this$props18.onMenuScrollToTop, + onMenuScrollToBottom = _this$props18.onMenuScrollToBottom; + if (!menuIsOpen) return null; // TODO: Internal Option Type here + + var render = function render(props) { + // for performance, the menu options in state aren't changed when the + // focused option changes so we calculate additional props based on that + var isFocused = focusedOption === props.data; + props.innerRef = isFocused ? _this5.getFocusedOptionRef : undefined; + return React__default.createElement(Option, _extends({}, commonProps, props, { + isFocused: isFocused + }), _this5.formatOptionLabel(props.data, 'menu')); + }; + + var menuUI; + + if (this.hasOptions()) { + menuUI = menuOptions.render.map(function (item) { + if (item.type === 'group') { + var type = item.type, + group = _objectWithoutProperties(item, ["type"]); + + var headingId = "".concat(item.key, "-heading"); + return React__default.createElement(Group, _extends({}, commonProps, group, { + Heading: GroupHeading, + headingProps: { + id: headingId + }, + label: _this5.formatGroupLabel(item.data) + }), item.options.map(function (option) { + return render(option); + })); + } else if (item.type === 'option') { + return render(item); + } + }); + } else if (isLoading) { + var message = loadingMessage({ + inputValue: inputValue + }); + if (message === null) return null; + menuUI = React__default.createElement(LoadingMessage$$1, commonProps, message); + } else { + var _message = noOptionsMessage({ + inputValue: inputValue + }); + + if (_message === null) return null; + menuUI = React__default.createElement(NoOptionsMessage$$1, commonProps, _message); + } + + var menuPlacementProps = { + minMenuHeight: minMenuHeight, + maxMenuHeight: maxMenuHeight, + menuPlacement: menuPlacement, + menuPosition: menuPosition, + menuShouldScrollIntoView: menuShouldScrollIntoView + }; + var menuElement = React__default.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref6) { + var ref = _ref6.ref, + _ref6$placerProps = _ref6.placerProps, + placement = _ref6$placerProps.placement, + maxHeight = _ref6$placerProps.maxHeight; + return React__default.createElement(Menu$$1, _extends({}, commonProps, menuPlacementProps, { + innerRef: ref, + innerProps: { + onMouseDown: _this5.onMenuMouseDown, + onMouseMove: _this5.onMenuMouseMove + }, + isLoading: isLoading, + placement: placement + }), React__default.createElement(ScrollCaptorSwitch, { + isEnabled: captureMenuScroll, + onTopArrive: onMenuScrollToTop, + onBottomArrive: onMenuScrollToBottom + }, React__default.createElement(ScrollBlock, { + isEnabled: menuShouldBlockScroll + }, React__default.createElement(MenuList$$1, _extends({}, commonProps, { + innerRef: _this5.getMenuListRef, + isLoading: isLoading, + maxHeight: maxHeight + }), menuUI)))); + }); // positioning behaviour is almost identical for portalled and fixed, + // so we use the same component. the actual portalling logic is forked + // within the component based on `menuPosition` + + return menuPortalTarget || menuPosition === 'fixed' ? React__default.createElement(MenuPortal$$1, _extends({}, commonProps, { + appendTo: menuPortalTarget, + controlElement: this.controlRef, + menuPlacement: menuPlacement, + menuPosition: menuPosition + }), menuElement) : menuElement; + } + }, { + key: "renderFormField", + value: function renderFormField() { + var _this6 = this; + + var _this$props19 = this.props, + delimiter = _this$props19.delimiter, + isDisabled = _this$props19.isDisabled, + isMulti = _this$props19.isMulti, + name = _this$props19.name; + var selectValue = this.state.selectValue; + if (!name || isDisabled) return; + + if (isMulti) { + if (delimiter) { + var value = selectValue.map(function (opt) { + return _this6.getOptionValue(opt); + }).join(delimiter); + return React__default.createElement("input", { + name: name, + type: "hidden", + value: value + }); + } else { + var input = selectValue.length > 0 ? selectValue.map(function (opt, i) { + return React__default.createElement("input", { + key: "i-".concat(i), + name: name, + type: "hidden", + value: _this6.getOptionValue(opt) + }); + }) : React__default.createElement("input", { + name: name, + type: "hidden" + }); + return React__default.createElement("div", null, input); + } + } else { + var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : ''; + + return React__default.createElement("input", { + name: name, + type: "hidden", + value: _value + }); + } + } + }, { + key: "renderLiveRegion", + value: function renderLiveRegion() { + if (!this.state.isFocused) return null; + return React__default.createElement(A11yText, { + "aria-live": "assertive" + }, React__default.createElement("p", { + id: "aria-selection-event" + }, "\xA0", this.state.ariaLiveSelection), React__default.createElement("p", { + id: "aria-context" + }, "\xA0", this.constructAriaLiveMessage())); + } + }, { + key: "render", + value: function render() { + var _this$components4 = this.components, + Control = _this$components4.Control, + IndicatorsContainer = _this$components4.IndicatorsContainer, + SelectContainer = _this$components4.SelectContainer, + ValueContainer = _this$components4.ValueContainer; + var _this$props20 = this.props, + className = _this$props20.className, + id = _this$props20.id, + isDisabled = _this$props20.isDisabled, + menuIsOpen = _this$props20.menuIsOpen; + var isFocused = this.state.isFocused; + var commonProps = this.commonProps = this.getCommonProps(); + return React__default.createElement(SelectContainer, _extends({}, commonProps, { + className: className, + innerProps: { + id: id, + onKeyDown: this.onKeyDown + }, + isDisabled: isDisabled, + isFocused: isFocused + }), this.renderLiveRegion(), React__default.createElement(Control, _extends({}, commonProps, { + innerRef: this.getControlRef, + innerProps: { + onMouseDown: this.onControlMouseDown, + onTouchEnd: this.onControlTouchEnd + }, + isDisabled: isDisabled, + isFocused: isFocused, + menuIsOpen: menuIsOpen + }), React__default.createElement(ValueContainer, _extends({}, commonProps, { + isDisabled: isDisabled + }), this.renderPlaceholderOrValue(), this.renderInput()), React__default.createElement(IndicatorsContainer, _extends({}, commonProps, { + isDisabled: isDisabled + }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField()); + } + }]); + + return Select; + }(React.Component); + + _defineProperty$1(Select, "defaultProps", defaultProps); + + var defaultProps$1 = { + defaultInputValue: '', + defaultMenuIsOpen: false, + defaultValue: null + }; + + var manageState = function manageState(SelectComponent) { + var _class, _temp; + + return _temp = _class = + /*#__PURE__*/ + function (_Component) { + _inherits$1(StateManager, _Component); + + function StateManager() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck$1(this, StateManager); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn$1(this, (_getPrototypeOf2 = _getPrototypeOf(StateManager)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "select", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "state", { + inputValue: _this.props.inputValue !== undefined ? _this.props.inputValue : _this.props.defaultInputValue, + menuIsOpen: _this.props.menuIsOpen !== undefined ? _this.props.menuIsOpen : _this.props.defaultMenuIsOpen, + value: _this.props.value !== undefined ? _this.props.value : _this.props.defaultValue + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onChange", function (value, actionMeta) { + _this.callProp('onChange', value, actionMeta); + + _this.setState({ + value: value + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onInputChange", function (value, actionMeta) { + // TODO: for backwards compatibility, we allow the prop to return a new + // value, but now inputValue is a controllable prop we probably shouldn't + var newValue = _this.callProp('onInputChange', value, actionMeta); + + _this.setState({ + inputValue: newValue !== undefined ? newValue : value + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onMenuOpen", function () { + _this.callProp('onMenuOpen'); + + _this.setState({ + menuIsOpen: true + }); + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onMenuClose", function () { + _this.callProp('onMenuClose'); + + _this.setState({ + menuIsOpen: false + }); + }); + + return _this; + } + + _createClass$1(StateManager, [{ + key: "focus", + value: function focus() { + this.select.focus(); + } + }, { + key: "blur", + value: function blur() { + this.select.blur(); + } // FIXME: untyped flow code, return any + + }, { + key: "getProp", + value: function getProp(key) { + return this.props[key] !== undefined ? this.props[key] : this.state[key]; + } // FIXME: untyped flow code, return any + + }, { + key: "callProp", + value: function callProp(name) { + if (typeof this.props[name] === 'function') { + var _this$props; + + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + + return (_this$props = this.props)[name].apply(_this$props, args); + } + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props2 = this.props, + defaultInputValue = _this$props2.defaultInputValue, + defaultMenuIsOpen = _this$props2.defaultMenuIsOpen, + defaultValue = _this$props2.defaultValue, + props = _objectWithoutProperties(_this$props2, ["defaultInputValue", "defaultMenuIsOpen", "defaultValue"]); + + return React__default.createElement(SelectComponent, _extends({}, props, { + ref: function ref(_ref) { + _this2.select = _ref; + }, + inputValue: this.getProp('inputValue'), + menuIsOpen: this.getProp('menuIsOpen'), + onChange: this.onChange, + onInputChange: this.onInputChange, + onMenuClose: this.onMenuClose, + onMenuOpen: this.onMenuOpen, + value: this.getProp('value') + })); + } + }]); + + return StateManager; + }(React.Component), _defineProperty$1(_class, "defaultProps", defaultProps$1), _temp; + }; + + var defaultProps$2 = { + cacheOptions: false, + defaultOptions: false, + filterOption: null + }; + var makeAsyncSelect = function makeAsyncSelect(SelectComponent) { + var _class, _temp; + + return _temp = _class = + /*#__PURE__*/ + function (_Component) { + _inherits$1(Async, _Component); + + function Async(props) { + var _this; + + _classCallCheck$1(this, Async); + + _this = _possibleConstructorReturn$1(this, _getPrototypeOf(Async).call(this)); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "select", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "lastRequest", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "mounted", false); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "optionsCache", {}); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "handleInputChange", function (newValue, actionMeta) { + var _this$props = _this.props, + cacheOptions = _this$props.cacheOptions, + onInputChange = _this$props.onInputChange; // TODO + + var inputValue = handleInputChange(newValue, actionMeta, onInputChange); + + if (!inputValue) { + delete _this.lastRequest; + + _this.setState({ + inputValue: '', + loadedInputValue: '', + loadedOptions: [], + isLoading: false, + passEmptyOptions: false + }); + + return; + } + + if (cacheOptions && _this.optionsCache[inputValue]) { + _this.setState({ + inputValue: inputValue, + loadedInputValue: inputValue, + loadedOptions: _this.optionsCache[inputValue], + isLoading: false, + passEmptyOptions: false + }); + } else { + var request = _this.lastRequest = {}; + + _this.setState({ + inputValue: inputValue, + isLoading: true, + passEmptyOptions: !_this.state.loadedInputValue + }, function () { + _this.loadOptions(inputValue, function (options) { + if (!_this.mounted) return; + + if (options) { + _this.optionsCache[inputValue] = options; + } + + if (request !== _this.lastRequest) return; + delete _this.lastRequest; + + _this.setState({ + isLoading: false, + loadedInputValue: inputValue, + loadedOptions: options || [], + passEmptyOptions: false + }); + }); + }); + } + + return inputValue; + }); + + _this.state = { + defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined, + inputValue: typeof props.inputValue !== 'undefined' ? props.inputValue : '', + isLoading: props.defaultOptions === true ? true : false, + loadedOptions: [], + passEmptyOptions: false + }; + return _this; + } + + _createClass$1(Async, [{ + key: "componentDidMount", + value: function componentDidMount() { + var _this2 = this; + + this.mounted = true; + var defaultOptions = this.props.defaultOptions; + var inputValue = this.state.inputValue; + + if (defaultOptions === true) { + this.loadOptions(inputValue, function (options) { + if (!_this2.mounted) return; + var isLoading = !!_this2.lastRequest; + + _this2.setState({ + defaultOptions: options || [], + isLoading: isLoading + }); + }); + } + } + }, { + key: "componentWillReceiveProps", + value: function componentWillReceiveProps(nextProps) { + // if the cacheOptions prop changes, clear the cache + if (nextProps.cacheOptions !== this.props.cacheOptions) { + this.optionsCache = {}; + } + + if (nextProps.defaultOptions !== this.props.defaultOptions) { + this.setState({ + defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined + }); + } + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.mounted = false; + } + }, { + key: "focus", + value: function focus() { + this.select.focus(); + } + }, { + key: "blur", + value: function blur() { + this.select.blur(); + } + }, { + key: "loadOptions", + value: function loadOptions(inputValue, callback) { + var loadOptions = this.props.loadOptions; + if (!loadOptions) return callback(); + var loader = loadOptions(inputValue, callback); + + if (loader && typeof loader.then === 'function') { + loader.then(callback, function () { + return callback(); + }); + } + } + }, { + key: "render", + value: function render() { + var _this3 = this; + + var _this$props2 = this.props, + loadOptions = _this$props2.loadOptions, + props = _objectWithoutProperties(_this$props2, ["loadOptions"]); + + var _this$state = this.state, + defaultOptions = _this$state.defaultOptions, + inputValue = _this$state.inputValue, + isLoading = _this$state.isLoading, + loadedInputValue = _this$state.loadedInputValue, + loadedOptions = _this$state.loadedOptions, + passEmptyOptions = _this$state.passEmptyOptions; + var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || []; + return React__default.createElement(SelectComponent, _extends({}, props, { + ref: function ref(_ref) { + _this3.select = _ref; + }, + options: options, + isLoading: isLoading, + onInputChange: this.handleInputChange + })); + } + }]); + + return Async; + }(React.Component), _defineProperty$1(_class, "defaultProps", defaultProps$2), _temp; + }; + var SelectState = manageState(Select); + var Async = makeAsyncSelect(SelectState); + + var compareOption = function compareOption() { + var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + var option = arguments.length > 1 ? arguments[1] : undefined; + var candidate = String(inputValue).toLowerCase(); + var optionValue = String(option.value).toLowerCase(); + var optionLabel = String(option.label).toLowerCase(); + return optionValue === candidate || optionLabel === candidate; + }; + + var builtins = { + formatCreateLabel: function formatCreateLabel(inputValue) { + return "Create \"".concat(inputValue, "\""); + }, + isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) { + return !(!inputValue || selectValue.some(function (option) { + return compareOption(inputValue, option); + }) || selectOptions.some(function (option) { + return compareOption(inputValue, option); + })); + }, + getNewOptionData: function getNewOptionData(inputValue, optionLabel) { + return { + label: optionLabel, + value: inputValue, + __isNew__: true + }; + } + }; + var defaultProps$3 = _objectSpread$1({ + allowCreateWhileLoading: false, + createOptionPosition: 'last' + }, builtins); + var makeCreatableSelect = function makeCreatableSelect(SelectComponent) { + var _class, _temp; + + return _temp = _class = + /*#__PURE__*/ + function (_Component) { + _inherits$1(Creatable, _Component); + + function Creatable(props) { + var _this; + + _classCallCheck$1(this, Creatable); + + _this = _possibleConstructorReturn$1(this, _getPrototypeOf(Creatable).call(this, props)); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "select", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "onChange", function (newValue, actionMeta) { + var _this$props = _this.props, + getNewOptionData = _this$props.getNewOptionData, + inputValue = _this$props.inputValue, + isMulti = _this$props.isMulti, + onChange = _this$props.onChange, + onCreateOption = _this$props.onCreateOption, + value = _this$props.value; + + if (actionMeta.action !== 'select-option') { + return onChange(newValue, actionMeta); + } + + var newOption = _this.state.newOption; + var valueArray = Array.isArray(newValue) ? newValue : [newValue]; + + if (valueArray[valueArray.length - 1] === newOption) { + if (onCreateOption) onCreateOption(inputValue);else { + var newOptionData = getNewOptionData(inputValue, inputValue); + var newActionMeta = { + action: 'create-option' + }; + + if (isMulti) { + onChange([].concat(_toConsumableArray(cleanValue(value)), [newOptionData]), newActionMeta); + } else { + onChange(newOptionData, newActionMeta); + } + } + return; + } + + onChange(newValue, actionMeta); + }); + + var options = props.options || []; + _this.state = { + newOption: undefined, + options: options + }; + return _this; + } + + _createClass$1(Creatable, [{ + key: "componentWillReceiveProps", + value: function componentWillReceiveProps(nextProps) { + var allowCreateWhileLoading = nextProps.allowCreateWhileLoading, + createOptionPosition = nextProps.createOptionPosition, + formatCreateLabel = nextProps.formatCreateLabel, + getNewOptionData = nextProps.getNewOptionData, + inputValue = nextProps.inputValue, + isLoading = nextProps.isLoading, + isValidNewOption = nextProps.isValidNewOption, + value = nextProps.value; + var options = nextProps.options || []; + var newOption = this.state.newOption; + + if (isValidNewOption(inputValue, cleanValue(value), options)) { + newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue)); + } else { + newOption = undefined; + } + + this.setState({ + newOption: newOption, + options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(_toConsumableArray(options)) : [].concat(_toConsumableArray(options), [newOption]) : options + }); + } + }, { + key: "focus", + value: function focus() { + this.select.focus(); + } + }, { + key: "blur", + value: function blur() { + this.select.blur(); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var props = _extends({}, this.props); + + var options = this.state.options; + return React__default.createElement(SelectComponent, _extends({}, props, { + ref: function ref(_ref) { + _this2.select = _ref; + }, + options: options, + onChange: this.onChange + })); + } + }]); + + return Creatable; + }(React.Component), _defineProperty$1(_class, "defaultProps", defaultProps$3), _temp; + }; // TODO: do this in package entrypoint + + var SelectCreatable = makeCreatableSelect(Select); + var Creatable = manageState(SelectCreatable); + + var SelectCreatable$1 = makeCreatableSelect(Select); + var SelectCreatableState = manageState(SelectCreatable$1); + var AsyncCreatable = makeAsyncSelect(SelectCreatableState); + + // strip transition props off before spreading onto select component + // note we need to be explicit about innerRef for flow + var AnimatedInput = function AnimatedInput(WrappedComponent) { + return function (_ref) { + var inProp = _ref.in, + onExited = _ref.onExited, + appear = _ref.appear, + enter = _ref.enter, + exit = _ref.exit, + props = _objectWithoutProperties(_ref, ["in", "onExited", "appear", "enter", "exit"]); + + return React__default.createElement(WrappedComponent, props); + }; + }; + + var Fade = function Fade(_ref) { + var Tag = _ref.component, + _ref$duration = _ref.duration, + duration = _ref$duration === void 0 ? 1 : _ref$duration, + inProp = _ref.in, + onExited = _ref.onExited, + props = _objectWithoutProperties(_ref, ["component", "duration", "in", "onExited"]); + + var transition = { + entering: { + opacity: 0 + }, + entered: { + opacity: 1, + transition: "opacity ".concat(duration, "ms") + }, + exiting: { + opacity: 0 + }, + exited: { + opacity: 0 + } + }; + return React__default.createElement(reactTransitionGroup_1, { + mountOnEnter: true, + unmountOnExit: true, + in: inProp, + timeout: duration + }, function (state) { + var innerProps = { + style: _objectSpread$1({}, transition[state]) + }; + return React__default.createElement(Tag, _extends({ + innerProps: innerProps + }, props)); + }); + }; // ============================== + // Collapse Transition + // ============================== + + var collapseDuration = 260; + // wrap each MultiValue with a collapse transition; decreases width until + // finally removing from DOM + var Collapse = + /*#__PURE__*/ + function (_Component) { + _inherits$1(Collapse, _Component); + + function Collapse() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck$1(this, Collapse); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn$1(this, (_getPrototypeOf2 = _getPrototypeOf(Collapse)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "duration", collapseDuration); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "rafID", void 0); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "state", { + width: 'auto' + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "transition", { + exiting: { + width: 0, + transition: "width ".concat(_this.duration, "ms ease-out") + }, + exited: { + width: 0 + } + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getWidth", function (ref) { + if (ref && isNaN(_this.state.width)) { + /* + Here we're invoking requestAnimationFrame with a callback invoking our + call to getBoundingClientRect and setState in order to resolve an edge case + around portalling. Certain portalling solutions briefly remove children from the DOM + before appending them to the target node. This is to avoid us trying to call getBoundingClientrect + while the Select component is in this state. + */ + // cannot use `offsetWidth` because it is rounded + _this.rafID = window.requestAnimationFrame(function () { + var _ref$getBoundingClien = ref.getBoundingClientRect(), + width = _ref$getBoundingClien.width; + + _this.setState({ + width: width + }); + }); + } + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getStyle", function (width) { + return { + overflow: 'hidden', + whiteSpace: 'nowrap', + width: width + }; + }); + + _defineProperty$1(_assertThisInitialized$1(_assertThisInitialized$1(_this)), "getTransition", function (state) { + return _this.transition[state]; + }); + + return _this; + } + + _createClass$1(Collapse, [{ + key: "componentWillUnmount", + value: function componentWillUnmount() { + if (this.rafID) { + window.cancelAnimationFrame(this.rafID); + } + } // width must be calculated; cannot transition from `undefined` to `number` + + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props = this.props, + children = _this$props.children, + inProp = _this$props.in; + var width = this.state.width; + return React__default.createElement(reactTransitionGroup_1, { + enter: false, + mountOnEnter: true, + unmountOnExit: true, + in: inProp, + timeout: this.duration + }, function (state) { + var style = _objectSpread$1({}, _this2.getStyle(width), _this2.getTransition(state)); + + return React__default.createElement("div", { + ref: _this2.getWidth, + style: style + }, children); + }); + } + }]); + + return Collapse; + }(React.Component); + + var AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) { + return function (_ref) { + var inProp = _ref.in, + onExited = _ref.onExited, + props = _objectWithoutProperties(_ref, ["in", "onExited"]); + + return React__default.createElement(Collapse, { + in: inProp, + onExited: onExited + }, React__default.createElement(WrappedComponent, _extends({ + cropWithEllipsis: inProp + }, props))); + }; + }; + + var AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) { + return function (props) { + return React__default.createElement(Fade, _extends({ + component: WrappedComponent, + duration: props.isMulti ? collapseDuration : 1 + }, props)); + }; + }; + + var AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) { + return function (props) { + return React__default.createElement(Fade, _extends({ + component: WrappedComponent + }, props)); + }; + }; + + // make ValueContainer a transition group + var AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) { + return function (props) { + return React__default.createElement(reactTransitionGroup_2, _extends({ + component: WrappedComponent + }, props)); + }; + }; + + var makeAnimated = function makeAnimated() { + var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var components$$1 = defaultComponents({ + components: externalComponents + }); + + var Input = components$$1.Input, + MultiValue = components$$1.MultiValue, + Placeholder = components$$1.Placeholder, + SingleValue = components$$1.SingleValue, + ValueContainer = components$$1.ValueContainer, + rest = _objectWithoutProperties(components$$1, ["Input", "MultiValue", "Placeholder", "SingleValue", "ValueContainer"]); + + return _objectSpread$1({ + Input: AnimatedInput(Input), + MultiValue: AnimatedMultiValue(MultiValue), + Placeholder: AnimatedPlaceholder(Placeholder), + SingleValue: AnimatedSingleValue(SingleValue), + ValueContainer: AnimatedValueContainer(ValueContainer) + }, rest); + }; + + var AnimatedComponents = makeAnimated(); + var Input$1 = AnimatedComponents.Input; + var MultiValue$1 = AnimatedComponents.MultiValue; + var Placeholder$1 = AnimatedComponents.Placeholder; + var SingleValue$1 = AnimatedComponents.SingleValue; + var ValueContainer$1 = AnimatedComponents.ValueContainer; + var index$1 = index(makeAnimated, exportedEqual); + + var index$1$1 = manageState(Select); + + var Filter$1 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Filter, _React$PureComponent); + + function Filter() { + classCallCheck(this, Filter); + + return possibleConstructorReturn(this, getPrototypeOf(Filter).apply(this, arguments)); + } + + createClass(Filter, [{ + key: "handleChange", + value: function handleChange(selected) { + this.props.onChange(this.props.property.name, selected.value); + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + filter = _this$props.filter; + var filterKey = "filter-".concat(property.name); + var value = filter[property.name]; + var options = [{ + value: '', + label: "-- All --" + }, { + value: true, + label: mapValue(true) + }, { + value: false, + label: mapValue(false) + }]; + return React__default.createElement("div", { + className: "filter" + }, React__default.createElement("label", { + htmlFor: filterKey, + className: "label" + }, property.label, " contains:"), React__default.createElement("div", { + className: "control" + }, React__default.createElement(index$1$1, { + options: options, + onChange: this.handleChange.bind(this) + }))); + } + }]); + + return Filter; + }(React__default.PureComponent); + + var boolean = { + edit: Edit$1, + show: Show$1, + list: List$1, + filter: Filter$1 + }; + + var Edit$2 = + /*#__PURE__*/ + function (_React$Component) { + inherits(Edit, _React$Component); + + function Edit() { + classCallCheck(this, Edit); + + return possibleConstructorReturn(this, getPrototypeOf(Edit).apply(this, arguments)); + } + + createClass(Edit, [{ + key: "handleChange", + value: function handleChange(value) { + this.props.onChange(this.props.property.name, value); + } + }, { + key: "setupDatePicker", + value: function setupDatePicker() { + var _this = this; + + var _this$props = this.props, + record = _this$props.record, + property = _this$props.property; + var defaultDate = record.params && record.params[property.name] || ''; + var options = { + format: 'Y-m-d' + }; + + if (property.type === 'datetime') { + options = { + format: 'Y-m-d H:i', + enableTime: true, + time_24hr: true + }; + } + + var inst = flatpickr(this.refs.datepicker, objectSpread({ + format: 'Y-m-d H:i', + defaultDate: defaultDate + }, options)); + inst.config.onChange.push(function (dates, text) { + _this.handleChange(text); + }); + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.setupDatePicker(); + } + }, { + key: "shouldComponentUpdate", + value: function shouldComponentUpdate(nextProps, nextState) { + var _this$props2 = this.props, + record = _this$props2.record, + property = _this$props2.property; + var nextRecord = nextProps.record; + var value = record.params && record.params[property.name] || ''; + var nextValue = nextRecord.params && nextRecord.params[property.name] || ''; + return nextValue !== value; + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate() { + this.setupDatePicker(); + } + }, { + key: "render", + value: function render() { + var _this$props3 = this.props, + property = _this$props3.property, + resource = _this$props3.resource, + record = _this$props3.record; + var value = record.params && record.params[property.name] || ''; + var error = record.errors && record.errors[property.name]; + return React__default.createElement("div", { + className: "field" + }, React__default.createElement("label", { + htmlFor: property.name, + className: "label" + }, property.label), React__default.createElement("div", { + className: "control has-icons-right" + }, React__default.createElement("input", { + type: "text", + className: "input pickadate", + id: property.name, + ref: "datepicker", + name: property.name + }), React__default.createElement("span", { + className: "icon is-small is-right" + }, React__default.createElement("i", { + className: "icomoon-calendar" + }))), error && React__default.createElement("div", { + className: "help is-danger" + }, error.message)); + } + }]); + + return Edit; + }(React__default.Component); + + var mapValue$1 = (function (value, type) { + if (!value) { + return ''; + } + + var date = new Date(value); + return date.toLocaleString(); + }); + + var Show$2 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Show, _React$PureComponent); + + function Show() { + classCallCheck(this, Show); + + return possibleConstructorReturn(this, getPrototypeOf(Show).apply(this, arguments)); + } + + createClass(Show, [{ + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record; + var value = mapValue$1(record.params[property.name], property.type); + var label = property.label; + return React__default.createElement("div", { + className: "property" + }, React__default.createElement("div", { + className: "card-content" + }, React__default.createElement("div", { + className: "text-small" + }, label), React__default.createElement("div", null, value))); + } + }]); + + return Show; + }(React__default.PureComponent); + + var List$2 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(List, _React$PureComponent); + + function List() { + classCallCheck(this, List); + + return possibleConstructorReturn(this, getPrototypeOf(List).apply(this, arguments)); + } + + createClass(List, [{ + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record, + resource = _this$props.resource; + var showAction = resource.recordActions.find(function (a) { + return a.name === 'show'; + }); + var value = mapValue$1(record.params[property.name]); + + if (resource.titleProperty.name === property.name && showAction) { + var h = new viewHelpers(); + var href = h.recordActionUrl({ + resourceId: resource.id, + recordId: record.id, + actionName: 'show' + }); + return React__default.createElement(reactRouterDom.Link, { + to: href + }, value); + } + + return React__default.createElement("span", null, value); + } + }]); + + return List; + }(React__default.PureComponent); + + var Filter$2 = + /*#__PURE__*/ + function (_React$Component) { + inherits(Filter, _React$Component); + + function Filter() { + classCallCheck(this, Filter); + + return possibleConstructorReturn(this, getPrototypeOf(Filter).apply(this, arguments)); + } + + createClass(Filter, [{ + key: "handleChange", + value: function handleChange(key, value) { + var date = value !== '' ? new Date(value).toISOString() : ''; + this.props.onChange("".concat(this.props.property.name, ".").concat(key), date); + } + }, { + key: "setupDatePicker", + value: function setupDatePicker(key) { + var _this = this; + + var _this$props = this.props, + property = _this$props.property, + filter = _this$props.filter; + var fieldKey = "".concat(property.name, ".").concat(key); + var defaultDate = filter[fieldKey] && new Date(filter[fieldKey]) || ''; + var options = { + format: 'Y-m-d' + }; + + if (property.type === 'datetime') { + options = { + format: 'Y-m-d H:i', + enableTime: true, + time_24hr: true + }; + } + + var inst = flatpickr(this.refs[key], objectSpread({ + format: 'Y-m-d H:i', + defaultDate: defaultDate + }, options)); + inst.config.onChange.push(function (dates, text) { + _this.handleChange(key, text); + }); + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.setupDatePicker('from'); + this.setupDatePicker('to'); + } + }, { + key: "shouldComponentUpdate", + value: function shouldComponentUpdate(nextProps, nextState) { + var property = this.props.property; + var fromKey = "".concat(property.name, ".from"); + var toKey = "".concat(property.name, ".to"); + var nextFilter = nextProps.filter || {}; + var from = this.refs.from._flatpickr; + var to = this.refs.to._flatpickr; + nextFilter[fromKey] ? from.jumpToDate(nextFilter[fromKey]) : from.input.value = ''; + nextFilter[toKey] ? to.jumpToDate(nextFilter[toKey]) : to.input.value = ''; + return false; + } + }, { + key: "renderFilter", + value: function renderFilter(where) { + var key = where.toLowerCase(); + var property = this.props.property; + var filterKey = "filter-".concat(property.name); + return React__default.createElement("div", { + className: "filter" + }, React__default.createElement("label", { + className: "label" + }, where, ":"), React__default.createElement("div", { + className: "control has-icons-right" + }, React__default.createElement("input", { + type: "text", + ref: key, + className: "input filter", + name: "".concat(filterKey, ".").concat(key) + }), React__default.createElement("span", { + className: "icon is-small is-right" + }, React__default.createElement("i", { + className: "icomoon-calendar" + })))); + } + }, { + key: "render", + value: function render() { + var _this$props2 = this.props, + property = _this$props2.property, + filter = _this$props2.filter; + return React__default.createElement("div", { + className: "picker-name" + }, property.label, React__default.createElement("div", { + className: "date-range" + }, this.renderFilter('From'), this.renderFilter('To'))); + } + }]); + + return Filter; + }(React__default.Component); + + var datetime = { + edit: Edit$2, + show: Show$2, + list: List$2, + filter: Filter$2 + }; + + var toolbarOptions = [[{ + 'header': [1, 2, 3, 4, 5, 6, false] + }], ['bold', 'italic', 'underline', 'strike'], // toggled buttons + ['blockquote', 'code-block'], [{ + 'list': 'ordered' + }, { + 'list': 'bullet' + }], [{ + 'script': 'sub' + }, { + 'script': 'super' + }], // superscript/subscript + [{ + 'indent': '-1' + }, { + 'indent': '+1' + }], // outdent/indent + [{ + 'direction': 'rtl' + }], // text direction + [{ + 'size': ['small', false, 'large', 'huge'] + }], // custom dropdown + [{ + 'color': [] + }, { + 'background': [] + }], // dropdown with defaults from theme + [{ + 'font': [] + }], [{ + 'align': [] + }], ['clean'] // remove formatting button + ]; + + var Edit$3 = + /*#__PURE__*/ + function (_React$Component) { + inherits(Edit, _React$Component); + + function Edit() { + classCallCheck(this, Edit); + + return possibleConstructorReturn(this, getPrototypeOf(Edit).apply(this, arguments)); + } + + createClass(Edit, [{ + key: "handleChange", + value: function handleChange(value) { + this.props.onChange(this.props.property.name, value); + } + }, { + key: "setupWysiwig", + value: function setupWysiwig() { + var _this = this; + + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record; + var value = record.params && record.params[property.name] || ''; + this.refs.wysiwig.innerHTML = value; + var quill = new Quill(this.refs.wysiwig, { + modules: { + toolbar: toolbarOptions + }, + theme: 'snow' + }); + quill.on('text-change', function () { + _this.handleChange(_this.refs.wysiwig.children[0].innerHTML); + }); + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.setupWysiwig(); + } + }, { + key: "shouldComponentUpdate", + value: function shouldComponentUpdate(nextProps, nextState) { + return false; + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate() { + this.setupWysiwig(); + } + }, { + key: "render", + value: function render() { + var _this$props2 = this.props, + property = _this$props2.property, + resource = _this$props2.resource, + record = _this$props2.record; + var error = record.errors && record.errors[property.name]; + return React__default.createElement("div", { + className: "field" + }, React__default.createElement("label", { + htmlFor: property.name, + className: "label" + }, property.label), React__default.createElement("div", { + className: "control has-icons-right" + }, React__default.createElement("div", { + className: "quill-editor", + ref: "wysiwig", + style: { + height: "400px" + } + })), error && React__default.createElement("div", { + className: "help is-danger" + }, error.message)); + } + }]); + + return Edit; + }(React__default.Component); + + var Show$3 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Show, _React$PureComponent); + + function Show() { + classCallCheck(this, Show); + + return possibleConstructorReturn(this, getPrototypeOf(Show).apply(this, arguments)); + } + + createClass(Show, [{ + key: "componentDidMount", + value: function componentDidMount() { + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record; + var value = record.params[property.name]; + this.refs.content.innerHTML = value; + } + }, { + key: "render", + value: function render() { + var property = this.props.property; + var label = property.label; + return React__default.createElement("div", { + className: "property" + }, React__default.createElement("div", { + className: "card-content" + }, React__default.createElement("div", { + className: "text-small" + }, label), React__default.createElement("div", { + className: "rich-text-value content", + ref: "content" + }))); + } + }]); + + return Show; + }(React__default.PureComponent); + + var List$3 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(List, _React$PureComponent); + + function List() { + classCallCheck(this, List); + + return possibleConstructorReturn(this, getPrototypeOf(List).apply(this, arguments)); + } + + createClass(List, [{ + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record, + resource = _this$props.resource; + var showAction = resource.recordActions.find(function (a) { + return a.name === 'show'; + }); + var original = record.params[property.name] || ''; + var value = original.substring(0, 15) + (original.length > 15 ? '...' : ''); + + if (resource.titleProperty.name === property.name && showAction) { + var h = new viewHelpers(); + var href = h.recordActionUrl({ + resourceId: resource.id, + recordId: record.id, + actionName: 'show' + }); + return React__default.createElement(reactRouterDom.Link, { + to: href + }, value); + } + + return React__default.createElement("span", null, value); + } + }]); + + return List; + }(React__default.PureComponent); + + var richtext = { + edit: Edit$3, + show: Show$3, + list: List$3 // filter: Filter, + + }; + + var utils = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.classNames = classNames; + exports.handleInputChange = handleInputChange; + exports.isDocumentElement = isDocumentElement; + exports.normalizedHeight = normalizedHeight; + exports.getScrollTop = getScrollTop; + exports.scrollTo = scrollTo; + exports.getScrollParent = getScrollParent; + exports.animatedScrollTo = animatedScrollTo; + exports.scrollIntoView = scrollIntoView; + exports.getBoundingClientObj = getBoundingClientObj; + exports.toKey = toKey; + exports.isTouchCapable = isTouchCapable; + exports.isMobileDevice = isMobileDevice; + exports.cleanValue = exports.emptyString = exports.noop = void 0; + + var _raf = _interopRequireDefault(raf_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + // ============================== + // NO OP + // ============================== + var noop = function noop() {}; + + exports.noop = noop; + + var emptyString = function emptyString() { + return ''; + }; // ============================== + // Class Name Prefixer + // ============================== + + /** + String representation of component state for styling with class names. + + Expects an array of strings OR a string/object pair: + - className(['comp', 'comp-arg', 'comp-arg-2']) + @returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2' + - className('comp', { some: true, state: false }) + @returns 'react-select__comp react-select__comp--some' + */ + + + exports.emptyString = emptyString; + + function applyPrefixToName(prefix, name) { + if (!name) { + return prefix; + } else if (name[0] === '-') { + return prefix + name; + } else { + return prefix + '__' + name; + } + } + + function classNames(prefix, cssKey, state, className) { + var arr = [cssKey, className]; + + if (state && prefix) { + for (var key in state) { + if (state.hasOwnProperty(key) && state[key]) { + arr.push("".concat(applyPrefixToName(prefix, key))); + } + } + } + + return arr.filter(function (i) { + return i; + }).map(function (i) { + return String(i).trim(); + }).join(' '); + } // ============================== + // Clean Value + // ============================== + + + var cleanValue = function cleanValue(value) { + if (Array.isArray(value)) return value.filter(Boolean); + if (_typeof(value) === 'object' && value !== null) return [value]; + return []; + }; // ============================== + // Handle Input Change + // ============================== + + + exports.cleanValue = cleanValue; + + function handleInputChange(inputValue, actionMeta, onInputChange) { + if (onInputChange) { + var newValue = onInputChange(inputValue, actionMeta); + if (typeof newValue === 'string') return newValue; + } + + return inputValue; + } // ============================== + // Scroll Helpers + // ============================== + + + function isDocumentElement(el) { + return [document.documentElement, document.body, window].indexOf(el) > -1; + } // Normalized Scroll Top + // ------------------------------ + + + function normalizedHeight(el) { + if (isDocumentElement(el)) { + return window.innerHeight; + } + + return el.clientHeight; + } // Normalized scrollTo & scrollTop + // ------------------------------ + + + function getScrollTop(el) { + if (isDocumentElement(el)) { + return window.pageYOffset; + } + + return el.scrollTop; + } + + function scrollTo(el, top) { + // with a scroll distance, we perform scroll on the element + if (isDocumentElement(el)) { + window.scrollTo(0, top); + return; + } + + el.scrollTop = top; + } // Get Scroll Parent + // ------------------------------ + + + function getScrollParent(element) { + var style = getComputedStyle(element); + var excludeStaticParent = style.position === 'absolute'; + var overflowRx = /(auto|scroll)/; + var docEl = document.documentElement; // suck it, flow... + + if (style.position === 'fixed') return docEl; + + for (var parent = element; parent = parent.parentElement;) { + style = getComputedStyle(parent); + + if (excludeStaticParent && style.position === 'static') { + continue; + } + + if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) { + return parent; + } + } + + return docEl; + } // Animated Scroll To + // ------------------------------ + + /** + @param t: time (elapsed) + @param b: initial value + @param c: amount of change + @param d: duration + */ + + + function easeOutCubic(t, b, c, d) { + return c * ((t = t / d - 1) * t * t + 1) + b; + } + + function animatedScrollTo(element, to) { + var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200; + var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop; + var start = getScrollTop(element); + var change = to - start; + var increment = 10; + var currentTime = 0; + + function animateScroll() { + currentTime += increment; + var val = easeOutCubic(currentTime, start, change, duration); + scrollTo(element, val); + + if (currentTime < duration) { + (0, _raf.default)(animateScroll); + } else { + callback(element); + } + } + + animateScroll(); + } // Scroll Into View + // ------------------------------ + + + function scrollIntoView(menuEl, focusedEl) { + var menuRect = menuEl.getBoundingClientRect(); + var focusedRect = focusedEl.getBoundingClientRect(); + var overScroll = focusedEl.offsetHeight / 3; + + if (focusedRect.bottom + overScroll > menuRect.bottom) { + scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight)); + } else if (focusedRect.top - overScroll < menuRect.top) { + scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0)); + } + } // ============================== + // Get bounding client object + // ============================== + // cannot get keys using array notation with DOMRect + + + function getBoundingClientObj(element) { + var rect = element.getBoundingClientRect(); + return { + bottom: rect.bottom, + height: rect.height, + left: rect.left, + right: rect.right, + top: rect.top, + width: rect.width + }; + } + + // ============================== + // String to Key (kebabify) + // ============================== + function toKey(str) { + return str.replace(/\W/g, '-'); + } // ============================== + // Touch Capability Detector + // ============================== + + + function isTouchCapable() { + try { + document.createEvent('TouchEvent'); + return true; + } catch (e) { + return false; + } + } // ============================== + // Mobile Device Detector + // ============================== + + + function isMobileDevice() { + try { + return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); + } catch (e) { + return false; + } + } + }); + + unwrapExports(utils); + var utils_1 = utils.classNames; + var utils_2 = utils.handleInputChange; + var utils_3 = utils.isDocumentElement; + var utils_4 = utils.normalizedHeight; + var utils_5 = utils.getScrollTop; + var utils_6 = utils.scrollTo; + var utils_7 = utils.getScrollParent; + var utils_8 = utils.animatedScrollTo; + var utils_9 = utils.scrollIntoView; + var utils_10 = utils.getBoundingClientObj; + var utils_11 = utils.toKey; + var utils_12 = utils.isTouchCapable; + var utils_13 = utils.isMobileDevice; + var utils_14 = utils.cleanValue; + var utils_15 = utils.emptyString; + var utils_16 = utils.noop; + + var Menu_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.getMenuPlacement = getMenuPlacement; + exports.MenuPortal = exports.menuPortalCSS = exports.LoadingMessage = exports.NoOptionsMessage = exports.loadingMessageCSS = exports.noOptionsMessageCSS = exports.MenuList = exports.menuListCSS = exports.default = exports.MenuPlacer = exports.menuCSS = void 0; + + var _react = _interopRequireWildcard(React__default); + + + + + + var _propTypes = _interopRequireDefault(PropTypes$1); + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + function getMenuPlacement(_ref) { + var maxHeight = _ref.maxHeight, + menuEl = _ref.menuEl, + minHeight = _ref.minHeight, + placement = _ref.placement, + shouldScroll = _ref.shouldScroll, + isFixedPosition = _ref.isFixedPosition, + theme = _ref.theme; + var spacing = theme.spacing; + var scrollParent = (0, utils.getScrollParent)(menuEl); + var defaultState = { + placement: 'bottom', + maxHeight: maxHeight + }; // something went wrong, return default state + + if (!menuEl || !menuEl.offsetParent) return defaultState; // we can't trust `scrollParent.scrollHeight` --> it may increase when + // the menu is rendered + + var _scrollParent$getBoun = scrollParent.getBoundingClientRect(), + scrollHeight = _scrollParent$getBoun.height; + + var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(), + menuBottom = _menuEl$getBoundingCl.bottom, + menuHeight = _menuEl$getBoundingCl.height, + menuTop = _menuEl$getBoundingCl.top; + + var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(), + containerTop = _menuEl$offsetParent$.top; + + var viewHeight = window.innerHeight; + var scrollTop = (0, utils.getScrollTop)(scrollParent); + var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10); + var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10); + var viewSpaceAbove = containerTop - marginTop; + var viewSpaceBelow = viewHeight - menuTop; + var scrollSpaceAbove = viewSpaceAbove + scrollTop; + var scrollSpaceBelow = scrollHeight - scrollTop - menuTop; + var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom; + var scrollUp = scrollTop + menuTop - marginTop; + var scrollDuration = 160; + + switch (placement) { + case 'auto': + case 'bottom': + // 1: the menu will fit, do nothing + if (viewSpaceBelow >= menuHeight) { + return { + placement: 'bottom', + maxHeight: maxHeight + }; + } // 2: the menu will fit, if scrolled + + + if (scrollSpaceBelow >= menuHeight && !isFixedPosition) { + if (shouldScroll) { + (0, utils.animatedScrollTo)(scrollParent, scrollDown, scrollDuration); + } + + return { + placement: 'bottom', + maxHeight: maxHeight + }; + } // 3: the menu will fit, if constrained + + + if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) { + if (shouldScroll) { + (0, utils.animatedScrollTo)(scrollParent, scrollDown, scrollDuration); + } // we want to provide as much of the menu as possible to the user, + // so give them whatever is available below rather than the minHeight. + + + var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom; + return { + placement: 'bottom', + maxHeight: constrainedHeight + }; + } // 4. Forked beviour when there isn't enough space below + // AUTO: flip the menu, render above + + + if (placement === 'auto' || isFixedPosition) { + // may need to be constrained after flipping + var _constrainedHeight = maxHeight; + var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove; + + if (spaceAbove >= minHeight) { + _constrainedHeight = Math.min(spaceAbove - marginBottom - spacing.controlHeight, maxHeight); + } + + return { + placement: 'top', + maxHeight: _constrainedHeight + }; + } // BOTTOM: allow browser to increase scrollable area and immediately set scroll + + + if (placement === 'bottom') { + (0, utils.scrollTo)(scrollParent, scrollDown); + return { + placement: 'bottom', + maxHeight: maxHeight + }; + } + + break; + + case 'top': + // 1: the menu will fit, do nothing + if (viewSpaceAbove >= menuHeight) { + return { + placement: 'top', + maxHeight: maxHeight + }; + } // 2: the menu will fit, if scrolled + + + if (scrollSpaceAbove >= menuHeight && !isFixedPosition) { + if (shouldScroll) { + (0, utils.animatedScrollTo)(scrollParent, scrollUp, scrollDuration); + } + + return { + placement: 'top', + maxHeight: maxHeight + }; + } // 3: the menu will fit, if constrained + + + if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) { + var _constrainedHeight2 = maxHeight; // we want to provide as much of the menu as possible to the user, + // so give them whatever is available below rather than the minHeight. + + if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) { + _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop; + } + + if (shouldScroll) { + (0, utils.animatedScrollTo)(scrollParent, scrollUp, scrollDuration); + } + + return { + placement: 'top', + maxHeight: _constrainedHeight2 + }; + } // 4. not enough space, the browser WILL NOT increase scrollable area when + // absolutely positioned element rendered above the viewport (only below). + // Flip the menu, render below + + + return { + placement: 'bottom', + maxHeight: maxHeight + }; + + default: + throw new Error("Invalid placement provided \"".concat(placement, "\".")); + } // fulfil contract with flow: implicit return value of undefined + + + return defaultState; + } // Menu Component + // ------------------------------ + + + function alignToControl(placement) { + var placementToCSSProp = { + bottom: 'top', + top: 'bottom' + }; + return placement ? placementToCSSProp[placement] : 'bottom'; + } + + var coercePlacement = function coercePlacement(p) { + return p === 'auto' ? 'bottom' : p; + }; + + var menuCSS = function menuCSS(_ref2) { + var _ref3; + + var placement = _ref2.placement, + _ref2$theme = _ref2.theme, + borderRadius = _ref2$theme.borderRadius, + spacing = _ref2$theme.spacing, + colors = _ref2$theme.colors; + return _ref3 = {}, _defineProperty(_ref3, alignToControl(placement), '100%'), _defineProperty(_ref3, "backgroundColor", colors.neutral0), _defineProperty(_ref3, "borderRadius", borderRadius), _defineProperty(_ref3, "boxShadow", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty(_ref3, "marginBottom", spacing.menuGutter), _defineProperty(_ref3, "marginTop", spacing.menuGutter), _defineProperty(_ref3, "position", 'absolute'), _defineProperty(_ref3, "width", '100%'), _defineProperty(_ref3, "zIndex", 1), _ref3; + }; // NOTE: internal only + + + exports.menuCSS = menuCSS; + + var MenuPlacer = + /*#__PURE__*/ + function (_Component) { + _inherits(MenuPlacer, _Component); + + function MenuPlacer() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck(this, MenuPlacer); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(MenuPlacer)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { + maxHeight: _this.props.maxMenuHeight, + placement: null + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getPlacement", function (ref) { + var _this$props = _this.props, + minMenuHeight = _this$props.minMenuHeight, + maxMenuHeight = _this$props.maxMenuHeight, + menuPlacement = _this$props.menuPlacement, + menuPosition = _this$props.menuPosition, + menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView, + theme = _this$props.theme; + var getPortalPlacement = _this.context.getPortalPlacement; + if (!ref) return; // DO NOT scroll if position is fixed + + var isFixedPosition = menuPosition === 'fixed'; + var shouldScroll = menuShouldScrollIntoView && !isFixedPosition; + var state = getMenuPlacement({ + maxHeight: maxMenuHeight, + menuEl: ref, + minHeight: minMenuHeight, + placement: menuPlacement, + shouldScroll: shouldScroll, + isFixedPosition: isFixedPosition, + theme: theme + }); + if (getPortalPlacement) getPortalPlacement(state); + + _this.setState(state); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getUpdatedProps", function () { + var menuPlacement = _this.props.menuPlacement; + var placement = _this.state.placement || coercePlacement(menuPlacement); + return _objectSpread({}, _this.props, { + placement: placement, + maxHeight: _this.state.maxHeight + }); + }); + + return _this; + } + + _createClass(MenuPlacer, [{ + key: "render", + value: function render() { + var children = this.props.children; + return children({ + ref: this.getPlacement, + placerProps: this.getUpdatedProps() + }); + } + }]); + + return MenuPlacer; + }(_react.Component); + + exports.MenuPlacer = MenuPlacer; + + _defineProperty(MenuPlacer, "contextTypes", { + getPortalPlacement: _propTypes.default.func + }); + + var Menu = function Menu(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerRef = props.innerRef, + innerProps = props.innerProps; + var cn = cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('menu', props)), { + menu: true + }, className); + return _react.default.createElement("div", _extends({ + className: cn + }, innerProps, { + ref: innerRef + }), children); + }; + + var _default = Menu; // ============================== + // Menu List + // ============================== + + exports.default = _default; + + var menuListCSS = function menuListCSS(_ref4) { + var maxHeight = _ref4.maxHeight, + baseUnit = _ref4.theme.spacing.baseUnit; + return { + maxHeight: maxHeight, + overflowY: 'auto', + paddingBottom: baseUnit, + paddingTop: baseUnit, + position: 'relative', + // required for offset[Height, Top] > keyboard scroll + WebkitOverflowScrolling: 'touch' + }; + }; + + exports.menuListCSS = menuListCSS; + + var MenuList = function MenuList(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + isMulti = props.isMulti, + innerRef = props.innerRef; + return _react.default.createElement("div", { + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('menuList', props)), { + 'menu-list': true, + 'menu-list--is-multi': isMulti + }, className), + ref: innerRef + }, children); + }; // ============================== + // Menu Notices + // ============================== + + + exports.MenuList = MenuList; + + var noticeCSS = function noticeCSS(_ref5) { + var _ref5$theme = _ref5.theme, + baseUnit = _ref5$theme.spacing.baseUnit, + colors = _ref5$theme.colors; + return { + color: colors.neutral40, + padding: "".concat(baseUnit * 2, "px ").concat(baseUnit * 3, "px"), + textAlign: 'center' + }; + }; + + var noOptionsMessageCSS = noticeCSS; + exports.noOptionsMessageCSS = noOptionsMessageCSS; + var loadingMessageCSS = noticeCSS; + exports.loadingMessageCSS = loadingMessageCSS; + + var NoOptionsMessage = function NoOptionsMessage(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return _react.default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('noOptionsMessage', props)), { + 'menu-notice': true, + 'menu-notice--no-options': true + }, className) + }, innerProps), children); + }; + + exports.NoOptionsMessage = NoOptionsMessage; + NoOptionsMessage.defaultProps = { + children: 'No options' + }; + + var LoadingMessage = function LoadingMessage(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return _react.default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('loadingMessage', props)), { + 'menu-notice': true, + 'menu-notice--loading': true + }, className) + }, innerProps), children); + }; + + exports.LoadingMessage = LoadingMessage; + LoadingMessage.defaultProps = { + children: 'Loading...' + }; // ============================== + // Menu Portal + // ============================== + + var menuPortalCSS = function menuPortalCSS(_ref6) { + var rect = _ref6.rect, + offset = _ref6.offset, + position = _ref6.position; + return { + left: rect.left, + position: position, + top: offset, + width: rect.width, + zIndex: 1 + }; + }; + + exports.menuPortalCSS = menuPortalCSS; + + var MenuPortal = + /*#__PURE__*/ + function (_Component2) { + _inherits(MenuPortal, _Component2); + + function MenuPortal() { + var _getPrototypeOf3; + + var _this2; + + _classCallCheck(this, MenuPortal); + + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + _this2 = _possibleConstructorReturn(this, (_getPrototypeOf3 = _getPrototypeOf(MenuPortal)).call.apply(_getPrototypeOf3, [this].concat(args))); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "state", { + placement: null + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "getPortalPlacement", function (_ref7) { + var placement = _ref7.placement; + var initialPlacement = coercePlacement(_this2.props.menuPlacement); // avoid re-renders if the placement has not changed + + if (placement !== initialPlacement) { + _this2.setState({ + placement: placement + }); + } + }); + + return _this2; + } + + _createClass(MenuPortal, [{ + key: "getChildContext", + value: function getChildContext() { + return { + getPortalPlacement: this.getPortalPlacement + }; + } // callback for occassions where the menu must "flip" + + }, { + key: "render", + value: function render() { + var _this$props2 = this.props, + appendTo = _this$props2.appendTo, + children = _this$props2.children, + controlElement = _this$props2.controlElement, + menuPlacement = _this$props2.menuPlacement, + position = _this$props2.menuPosition, + getStyles = _this$props2.getStyles; + var isFixed = position === 'fixed'; // bail early if required elements aren't present + + if (!appendTo && !isFixed || !controlElement) { + return null; + } + + var placement = this.state.placement || coercePlacement(menuPlacement); + var rect = (0, utils.getBoundingClientObj)(controlElement); + var scrollDistance = isFixed ? 0 : window.pageYOffset; + var offset = rect[placement] + scrollDistance; + var state = { + offset: offset, + position: position, + rect: rect + }; // same wrapper element whether fixed or portalled + + var menuWrapper = _react.default.createElement("div", { + className: + /*#__PURE__*/ + + /*#__PURE__*/ + (0, index_esm.css)(getStyles('menuPortal', state)) + }, children); + + return appendTo ? (0, reactDom__default.createPortal)(menuWrapper, appendTo) : menuWrapper; + } + }]); + + return MenuPortal; + }(_react.Component); + + exports.MenuPortal = MenuPortal; + + _defineProperty(MenuPortal, "childContextTypes", { + getPortalPlacement: _propTypes.default.func + }); + }); + + unwrapExports(Menu_1); + var Menu_2 = Menu_1.getMenuPlacement; + var Menu_3 = Menu_1.MenuPortal; + var Menu_4 = Menu_1.menuPortalCSS; + var Menu_5 = Menu_1.LoadingMessage; + var Menu_6 = Menu_1.NoOptionsMessage; + var Menu_7 = Menu_1.loadingMessageCSS; + var Menu_8 = Menu_1.noOptionsMessageCSS; + var Menu_9 = Menu_1.MenuList; + var Menu_10 = Menu_1.menuListCSS; + var Menu_11 = Menu_1.MenuPlacer; + var Menu_12 = Menu_1.menuCSS; + + var reactFastCompare = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exportedEqual; + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + var isArray = Array.isArray; + var keyList = Object.keys; + var hasProp = Object.prototype.hasOwnProperty; + + function equal(a, b) { + // fast-deep-equal index.js 2.0.1 + if (a === b) return true; + + if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') { + var arrA = isArray(a), + arrB = isArray(b), + i, + length, + key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + + for (i = length; i-- !== 0;) { + if (!equal(a[i], b[i])) return false; + } + + return true; + } + + if (arrA != arrB) return false; + var dateA = a instanceof Date, + dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + var regexpA = a instanceof RegExp, + regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) { + return false; + } + + for (i = length; i-- !== 0;) { + if (!hasProp.call(b, keys[i])) return false; + } // end fast-deep-equal + // Custom handling for React + + + for (i = length; i-- !== 0;) { + key = keys[i]; + + if (key === '_owner' && a.$$typeof) { + // React-specific: avoid traversing React elements' _owner. + // _owner contains circular references + // and is not needed when comparing the actual elements (and not their owners) + // .$$typeof and ._store on just reasonable markers of a react element + continue; + } else { + // all other properties should be traversed as usual + if (!equal(a[key], b[key])) return false; + } + } // fast-deep-equal index.js 2.0.1 + + + return true; + } + + return a !== a && b !== b; + } // end fast-deep-equal + + + function exportedEqual(a, b) { + try { + return equal(a, b); + } catch (error) { + if (error.message && error.message.match(/stack|recursion/i)) { + // warn on circular references, don't crash + // browsers give this different errors name and messages: + // chrome/safari: "RangeError", "Maximum call stack size exceeded" + // firefox: "InternalError", too much recursion" + // edge: "Error", "Out of stack space" + console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message); + return false; + } // some other error. we should definitely know about these + + + throw error; + } + } + }); + + unwrapExports(reactFastCompare); + + var diacritics_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.stripDiacritics = void 0; + var diacritics = [{ + base: 'A', + letters: /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g + }, { + base: 'AA', + letters: /[\uA732]/g + }, { + base: 'AE', + letters: /[\u00C6\u01FC\u01E2]/g + }, { + base: 'AO', + letters: /[\uA734]/g + }, { + base: 'AU', + letters: /[\uA736]/g + }, { + base: 'AV', + letters: /[\uA738\uA73A]/g + }, { + base: 'AY', + letters: /[\uA73C]/g + }, { + base: 'B', + letters: /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g + }, { + base: 'C', + letters: /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g + }, { + base: 'D', + letters: /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g + }, { + base: 'DZ', + letters: /[\u01F1\u01C4]/g + }, { + base: 'Dz', + letters: /[\u01F2\u01C5]/g + }, { + base: 'E', + letters: /[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g + }, { + base: 'F', + letters: /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g + }, { + base: 'G', + letters: /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g + }, { + base: 'H', + letters: /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g + }, { + base: 'I', + letters: /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g + }, { + base: 'J', + letters: /[\u004A\u24BF\uFF2A\u0134\u0248]/g + }, { + base: 'K', + letters: /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g + }, { + base: 'L', + letters: /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g + }, { + base: 'LJ', + letters: /[\u01C7]/g + }, { + base: 'Lj', + letters: /[\u01C8]/g + }, { + base: 'M', + letters: /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g + }, { + base: 'N', + letters: /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g + }, { + base: 'NJ', + letters: /[\u01CA]/g + }, { + base: 'Nj', + letters: /[\u01CB]/g + }, { + base: 'O', + letters: /[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g + }, { + base: 'OI', + letters: /[\u01A2]/g + }, { + base: 'OO', + letters: /[\uA74E]/g + }, { + base: 'OU', + letters: /[\u0222]/g + }, { + base: 'P', + letters: /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g + }, { + base: 'Q', + letters: /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g + }, { + base: 'R', + letters: /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g + }, { + base: 'S', + letters: /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g + }, { + base: 'T', + letters: /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g + }, { + base: 'TZ', + letters: /[\uA728]/g + }, { + base: 'U', + letters: /[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g + }, { + base: 'V', + letters: /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g + }, { + base: 'VY', + letters: /[\uA760]/g + }, { + base: 'W', + letters: /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g + }, { + base: 'X', + letters: /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g + }, { + base: 'Y', + letters: /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g + }, { + base: 'Z', + letters: /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g + }, { + base: 'a', + letters: /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g + }, { + base: 'aa', + letters: /[\uA733]/g + }, { + base: 'ae', + letters: /[\u00E6\u01FD\u01E3]/g + }, { + base: 'ao', + letters: /[\uA735]/g + }, { + base: 'au', + letters: /[\uA737]/g + }, { + base: 'av', + letters: /[\uA739\uA73B]/g + }, { + base: 'ay', + letters: /[\uA73D]/g + }, { + base: 'b', + letters: /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g + }, { + base: 'c', + letters: /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g + }, { + base: 'd', + letters: /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g + }, { + base: 'dz', + letters: /[\u01F3\u01C6]/g + }, { + base: 'e', + letters: /[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g + }, { + base: 'f', + letters: /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g + }, { + base: 'g', + letters: /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g + }, { + base: 'h', + letters: /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g + }, { + base: 'hv', + letters: /[\u0195]/g + }, { + base: 'i', + letters: /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g + }, { + base: 'j', + letters: /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g + }, { + base: 'k', + letters: /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g + }, { + base: 'l', + letters: /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g + }, { + base: 'lj', + letters: /[\u01C9]/g + }, { + base: 'm', + letters: /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g + }, { + base: 'n', + letters: /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g + }, { + base: 'nj', + letters: /[\u01CC]/g + }, { + base: 'o', + letters: /[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g + }, { + base: 'oi', + letters: /[\u01A3]/g + }, { + base: 'ou', + letters: /[\u0223]/g + }, { + base: 'oo', + letters: /[\uA74F]/g + }, { + base: 'p', + letters: /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g + }, { + base: 'q', + letters: /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g + }, { + base: 'r', + letters: /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g + }, { + base: 's', + letters: /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g + }, { + base: 't', + letters: /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g + }, { + base: 'tz', + letters: /[\uA729]/g + }, { + base: 'u', + letters: /[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g + }, { + base: 'v', + letters: /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g + }, { + base: 'vy', + letters: /[\uA761]/g + }, { + base: 'w', + letters: /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g + }, { + base: 'x', + letters: /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g + }, { + base: 'y', + letters: /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g + }, { + base: 'z', + letters: /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g + }]; + + var stripDiacritics = function stripDiacritics(str) { + for (var i = 0; i < diacritics.length; i++) { + str = str.replace(diacritics[i].letters, diacritics[i].base); + } + + return str; + }; + + exports.stripDiacritics = stripDiacritics; + }); + + unwrapExports(diacritics_1); + var diacritics_2 = diacritics_1.stripDiacritics; + + var filters = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.createFilter = void 0; + + + + function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + var trimString = function trimString(str) { + return str.replace(/^\s+|\s+$/g, ''); + }; + + var defaultStringify = function defaultStringify(option) { + return "".concat(option.label, " ").concat(option.value); + }; + + var createFilter = function createFilter(config) { + return function (option, rawInput) { + var _ignoreCase$ignoreAcc = _objectSpread({ + ignoreCase: true, + ignoreAccents: true, + stringify: defaultStringify, + trim: true, + matchFrom: 'any' + }, config), + ignoreCase = _ignoreCase$ignoreAcc.ignoreCase, + ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents, + stringify = _ignoreCase$ignoreAcc.stringify, + trim = _ignoreCase$ignoreAcc.trim, + matchFrom = _ignoreCase$ignoreAcc.matchFrom; + + var input = trim ? trimString(rawInput) : rawInput; + var candidate = trim ? trimString(stringify(option)) : stringify(option); + + if (ignoreCase) { + input = input.toLowerCase(); + candidate = candidate.toLowerCase(); + } + + if (ignoreAccents) { + input = (0, diacritics_1.stripDiacritics)(input); + candidate = (0, diacritics_1.stripDiacritics)(candidate); + } + + return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1; + }; + }; + + exports.createFilter = createFilter; + }); + + unwrapExports(filters); + var filters_1 = filters.createFilter; + + var A11yText_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + + var _react = _interopRequireDefault(React__default); + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + // Assistive text to describe visual elements. Hidden for sighted users. + var A11yText = function A11yText(props) { + return _react.default.createElement("span", _extends({ + className: + /*#__PURE__*/ + + /*#__PURE__*/ + (0, index_esm.css)({ + zIndex: 9999, + border: 0, + clip: 'rect(1px, 1px, 1px, 1px)', + height: 1, + width: 1, + position: 'absolute', + overflow: 'hidden', + padding: 0, + whiteSpace: 'nowrap', + backgroundColor: 'red', + color: 'blue' + }) + }, props)); + }; + + var _default = A11yText; + exports.default = _default; + }); + + unwrapExports(A11yText_1); + + var DummyInput_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + + var _react = _interopRequireWildcard(React__default); + + + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + var DummyInput = + /*#__PURE__*/ + function (_Component) { + _inherits(DummyInput, _Component); + + function DummyInput() { + _classCallCheck(this, DummyInput); + + return _possibleConstructorReturn(this, _getPrototypeOf(DummyInput).apply(this, arguments)); + } + + _createClass(DummyInput, [{ + key: "render", + value: function render() { + var _this$props = this.props, + inProp = _this$props.in, + out = _this$props.out, + onExited = _this$props.onExited, + appear = _this$props.appear, + enter = _this$props.enter, + exit = _this$props.exit, + innerRef = _this$props.innerRef, + emotion = _this$props.emotion, + props = _objectWithoutProperties(_this$props, ["in", "out", "onExited", "appear", "enter", "exit", "innerRef", "emotion"]); + + return _react.default.createElement("input", _extends({ + ref: innerRef + }, props, { + className: + /*#__PURE__*/ + + /*#__PURE__*/ + (0, index_esm.css)({ + // get rid of any default styles + background: 0, + border: 0, + fontSize: 'inherit', + outline: 0, + padding: 0, + // important! without `width` browsers won't allow focus + width: 1, + // remove cursor on desktop + color: 'transparent', + // remove cursor on mobile whilst maintaining "scroll into view" behaviour + left: -100, + opacity: 0, + position: 'relative', + transform: 'scale(0)' + }) + })); + } + }]); + + return DummyInput; + }(_react.Component); + + exports.default = DummyInput; + }); + + unwrapExports(DummyInput_1); + + var NodeResolver_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + + + + + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + var NodeResolver = + /*#__PURE__*/ + function (_Component) { + _inherits(NodeResolver, _Component); + + function NodeResolver() { + _classCallCheck(this, NodeResolver); + + return _possibleConstructorReturn(this, _getPrototypeOf(NodeResolver).apply(this, arguments)); + } + + _createClass(NodeResolver, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.props.innerRef((0, reactDom__default.findDOMNode)(this)); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.props.innerRef(null); + } + }, { + key: "render", + value: function render() { + return this.props.children; + } + }]); + + return NodeResolver; + }(React__default.Component); + + exports.default = NodeResolver; + }); + + unwrapExports(NodeResolver_1); + + var constants = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.LOCK_STYLES = exports.STYLE_KEYS = void 0; + var STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position']; + exports.STYLE_KEYS = STYLE_KEYS; + var LOCK_STYLES = { + boxSizing: 'border-box', + // account for possible declaration `width: 100%;` on body + overflow: 'hidden', + position: 'relative', + height: '100%' + }; + exports.LOCK_STYLES = LOCK_STYLES; + }); + + unwrapExports(constants); + var constants_1 = constants.LOCK_STYLES; + var constants_2 = constants.STYLE_KEYS; + + var utils$1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.preventTouchMove = preventTouchMove; + exports.allowTouchMove = allowTouchMove; + exports.preventInertiaScroll = preventInertiaScroll; + exports.isTouchDevice = isTouchDevice; + + function preventTouchMove(e) { + e.preventDefault(); + } + + function allowTouchMove(e) { + e.stopPropagation(); + } + + function preventInertiaScroll() { + var top = this.scrollTop; + var totalScroll = this.scrollHeight; + var currentScroll = top + this.offsetHeight; + + if (top === 0) { + this.scrollTop = 1; + } else if (currentScroll === totalScroll) { + this.scrollTop = top - 1; + } + } // `ontouchstart` check works on most browsers + // `maxTouchPoints` works on IE10/11 and Surface + + + function isTouchDevice() { + return 'ontouchstart' in window || navigator.maxTouchPoints; + } + }); + + unwrapExports(utils$1); + var utils_1$1 = utils$1.preventTouchMove; + var utils_2$1 = utils$1.allowTouchMove; + var utils_3$1 = utils$1.preventInertiaScroll; + var utils_4$1 = utils$1.isTouchDevice; + + var ScrollLock_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + + + + + + + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + var activeScrollLocks = 0; + + var ScrollLock = + /*#__PURE__*/ + function (_Component) { + _inherits(ScrollLock, _Component); + + function ScrollLock() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck(this, ScrollLock); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollLock)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "originalStyles", {}); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "listenerOptions", { + capture: false, + passive: false + }); + + return _this; + } + + _createClass(ScrollLock, [{ + key: "componentDidMount", + value: function componentDidMount() { + var _this2 = this; + + if (!canUseDOM) return; + var _this$props = this.props, + accountForScrollbars = _this$props.accountForScrollbars, + touchScrollTarget = _this$props.touchScrollTarget; + var target = document.body; + var targetStyle = target && target.style; + + if (accountForScrollbars) { + // store any styles already applied to the body + constants.STYLE_KEYS.forEach(function (key) { + var val = targetStyle && targetStyle[key]; + _this2.originalStyles[key] = val; + }); + } // apply the lock styles and padding if this is the first scroll lock + + + if (accountForScrollbars && activeScrollLocks < 1) { + var currentPadding = parseInt(this.originalStyles.paddingRight, 10) || 0; + var clientWidth = document.body ? document.body.clientWidth : 0; + var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0; + Object.keys(constants.LOCK_STYLES).forEach(function (key) { + var val = constants.LOCK_STYLES[key]; + + if (targetStyle) { + targetStyle[key] = val; + } + }); + + if (targetStyle) { + targetStyle.paddingRight = "".concat(adjustedPadding, "px"); + } + } // account for touch devices + + + if (target && (0, utils$1.isTouchDevice)()) { + // Mobile Safari ignores { overflow: hidden } declaration on the body. + target.addEventListener('touchmove', utils$1.preventTouchMove, this.listenerOptions); // Allow scroll on provided target + + if (touchScrollTarget) { + touchScrollTarget.addEventListener('touchstart', utils$1.preventInertiaScroll, this.listenerOptions); + touchScrollTarget.addEventListener('touchmove', utils$1.allowTouchMove, this.listenerOptions); + } + } // increment active scroll locks + + + activeScrollLocks += 1; + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + var _this3 = this; + + if (!canUseDOM) return; + var _this$props2 = this.props, + accountForScrollbars = _this$props2.accountForScrollbars, + touchScrollTarget = _this$props2.touchScrollTarget; + var target = document.body; + var targetStyle = target && target.style; // safely decrement active scroll locks + + activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any + + if (accountForScrollbars && activeScrollLocks < 1) { + constants.STYLE_KEYS.forEach(function (key) { + var val = _this3.originalStyles[key]; + + if (targetStyle) { + targetStyle[key] = val; + } + }); + } // remove touch listeners + + + if (target && (0, utils$1.isTouchDevice)()) { + target.removeEventListener('touchmove', utils$1.preventTouchMove, this.listenerOptions); + + if (touchScrollTarget) { + touchScrollTarget.removeEventListener('touchstart', utils$1.preventInertiaScroll, this.listenerOptions); + touchScrollTarget.removeEventListener('touchmove', utils$1.allowTouchMove, this.listenerOptions); + } + } + } + }, { + key: "render", + value: function render() { + return null; + } + }]); + + return ScrollLock; + }(React__default.Component); + + exports.default = ScrollLock; + + _defineProperty(ScrollLock, "defaultProps", { + accountForScrollbars: true + }); + }); + + unwrapExports(ScrollLock_1); + + var ScrollBlock_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + + var _react = _interopRequireWildcard(React__default); + + + + var _NodeResolver = _interopRequireDefault(NodeResolver_1); + + var _index = _interopRequireDefault(ScrollLock_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + // NOTE: + // We shouldn't need this after updating to React v16.3.0, which introduces: + // - createRef() https://reactjs.org/docs/react-api.html#reactcreateref + // - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref + var ScrollBlock = + /*#__PURE__*/ + function (_PureComponent) { + _inherits(ScrollBlock, _PureComponent); + + function ScrollBlock() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck(this, ScrollBlock); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollBlock)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { + touchScrollTarget: null + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getScrollTarget", function (ref) { + if (ref === _this.state.touchScrollTarget) return; + + _this.setState({ + touchScrollTarget: ref + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blurSelectInput", function () { + if (document.activeElement) { + document.activeElement.blur(); + } + }); + + return _this; + } + + _createClass(ScrollBlock, [{ + key: "render", + value: function render() { + var _this$props = this.props, + children = _this$props.children, + isEnabled = _this$props.isEnabled; + var touchScrollTarget = this.state.touchScrollTarget; // bail early if not enabled + + if (!isEnabled) return children; + /* + * Div + * ------------------------------ + * blocks scrolling on non-body elements behind the menu + * NodeResolver + * ------------------------------ + * we need a reference to the scrollable element to "unlock" scroll on + * mobile devices + * ScrollLock + * ------------------------------ + * actually does the scroll locking + */ + + return _react.default.createElement("div", null, _react.default.createElement("div", { + onClick: this.blurSelectInput, + className: + /*#__PURE__*/ + + /*#__PURE__*/ + (0, index_esm.css)({ + position: 'fixed', + left: 0, + bottom: 0, + right: 0, + top: 0 + }) + }), _react.default.createElement(_NodeResolver.default, { + innerRef: this.getScrollTarget + }, children), touchScrollTarget ? _react.default.createElement(_index.default, { + touchScrollTarget: touchScrollTarget + }) : null); + } + }]); + + return ScrollBlock; + }(_react.PureComponent); + + exports.default = ScrollBlock; + }); + + unwrapExports(ScrollBlock_1); + + var ScrollCaptor_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; + + var _react = _interopRequireWildcard(React__default); + + var _NodeResolver = _interopRequireDefault(NodeResolver_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + var ScrollCaptor = + /*#__PURE__*/ + function (_Component) { + _inherits(ScrollCaptor, _Component); + + function ScrollCaptor() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck(this, ScrollCaptor); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollCaptor)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isBottom", false); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isTop", false); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "scrollTarget", void 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "touchStart", void 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "cancelScroll", function (event) { + event.preventDefault(); + event.stopPropagation(); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleEventDelta", function (event, delta) { + var _this$props = _this.props, + onBottomArrive = _this$props.onBottomArrive, + onBottomLeave = _this$props.onBottomLeave, + onTopArrive = _this$props.onTopArrive, + onTopLeave = _this$props.onTopLeave; + var _this$scrollTarget = _this.scrollTarget, + scrollTop = _this$scrollTarget.scrollTop, + scrollHeight = _this$scrollTarget.scrollHeight, + clientHeight = _this$scrollTarget.clientHeight; + var target = _this.scrollTarget; + var isDeltaPositive = delta > 0; + var availableScroll = scrollHeight - clientHeight - scrollTop; + var shouldCancelScroll = false; // reset bottom/top flags + + if (availableScroll > delta && _this.isBottom) { + if (onBottomLeave) onBottomLeave(event); + _this.isBottom = false; + } + + if (isDeltaPositive && _this.isTop) { + if (onTopLeave) onTopLeave(event); + _this.isTop = false; + } // bottom limit + + + if (isDeltaPositive && delta > availableScroll) { + if (onBottomArrive && !_this.isBottom) { + onBottomArrive(event); + } + + target.scrollTop = scrollHeight; + shouldCancelScroll = true; + _this.isBottom = true; // top limit + } else if (!isDeltaPositive && -delta > scrollTop) { + if (onTopArrive && !_this.isTop) { + onTopArrive(event); + } + + target.scrollTop = 0; + shouldCancelScroll = true; + _this.isTop = true; + } // cancel scroll + + + if (shouldCancelScroll) { + _this.cancelScroll(event); + } + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onWheel", function (event) { + _this.handleEventDelta(event, event.deltaY); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchStart", function (event) { + // set touch start so we can calculate touchmove delta + _this.touchStart = event.changedTouches[0].clientY; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchMove", function (event) { + var deltaY = _this.touchStart - event.changedTouches[0].clientY; + + _this.handleEventDelta(event, deltaY); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getScrollTarget", function (ref) { + _this.scrollTarget = ref; + }); + + return _this; + } + + _createClass(ScrollCaptor, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.startListening(this.scrollTarget); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.stopListening(this.scrollTarget); + } + }, { + key: "startListening", + value: function startListening(el) { + // bail early if no scroll available + if (!el) return; + if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢 + + if (typeof el.addEventListener === 'function') { + el.addEventListener('wheel', this.onWheel, false); + } + + if (typeof el.addEventListener === 'function') { + el.addEventListener('touchstart', this.onTouchStart, false); + } + + if (typeof el.addEventListener === 'function') { + el.addEventListener('touchmove', this.onTouchMove, false); + } + } + }, { + key: "stopListening", + value: function stopListening(el) { + // bail early if no scroll available + if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢 + + if (typeof el.removeEventListener === 'function') { + el.removeEventListener('wheel', this.onWheel, false); + } + + if (typeof el.removeEventListener === 'function') { + el.removeEventListener('touchstart', this.onTouchStart, false); + } + + if (typeof el.removeEventListener === 'function') { + el.removeEventListener('touchmove', this.onTouchMove, false); + } + } + }, { + key: "render", + value: function render() { + return _react.default.createElement(_NodeResolver.default, { + innerRef: this.getScrollTarget + }, this.props.children); + } + }]); + + return ScrollCaptor; + }(_react.Component); + + var ScrollCaptorSwitch = + /*#__PURE__*/ + function (_Component2) { + _inherits(ScrollCaptorSwitch, _Component2); + + function ScrollCaptorSwitch() { + _classCallCheck(this, ScrollCaptorSwitch); + + return _possibleConstructorReturn(this, _getPrototypeOf(ScrollCaptorSwitch).apply(this, arguments)); + } + + _createClass(ScrollCaptorSwitch, [{ + key: "render", + value: function render() { + var _this$props2 = this.props, + isEnabled = _this$props2.isEnabled, + props = _objectWithoutProperties(_this$props2, ["isEnabled"]); + + return isEnabled ? _react.default.createElement(ScrollCaptor, props) : this.props.children; + } + }]); + + return ScrollCaptorSwitch; + }(_react.Component); + + exports.default = ScrollCaptorSwitch; + + _defineProperty(ScrollCaptorSwitch, "defaultProps", { + isEnabled: true + }); + }); + + unwrapExports(ScrollCaptor_1); + + var internal = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.defineProperty(exports, "A11yText", { + enumerable: true, + get: function get() { + return _A11yText.default; + } + }); + Object.defineProperty(exports, "DummyInput", { + enumerable: true, + get: function get() { + return _DummyInput.default; + } + }); + Object.defineProperty(exports, "NodeResolver", { + enumerable: true, + get: function get() { + return _NodeResolver.default; + } + }); + Object.defineProperty(exports, "ScrollBlock", { + enumerable: true, + get: function get() { + return _ScrollBlock.default; + } + }); + Object.defineProperty(exports, "ScrollCaptor", { + enumerable: true, + get: function get() { + return _ScrollCaptor.default; + } + }); + + var _A11yText = _interopRequireDefault(A11yText_1); + + var _DummyInput = _interopRequireDefault(DummyInput_1); + + var _NodeResolver = _interopRequireDefault(NodeResolver_1); + + var _ScrollBlock = _interopRequireDefault(ScrollBlock_1); + + var _ScrollCaptor = _interopRequireDefault(ScrollCaptor_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + }); + + unwrapExports(internal); + + var accessibility = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.resultsAriaMessage = exports.optionFocusAriaMessage = exports.valueFocusAriaMessage = exports.valueEventAriaMessage = exports.instructionsAriaMessage = void 0; + + var instructionsAriaMessage = function instructionsAriaMessage(event) { + var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var isSearchable = context.isSearchable, + isMulti = context.isMulti, + label = context.label, + isDisabled = context.isDisabled; + + switch (event) { + case 'menu': + return "Use Up and Down to choose options".concat(isDisabled ? '' : ', press Enter to select the currently focused option', ", press Escape to exit the menu, press Tab to select the option and exit the menu."); + + case 'input': + return "".concat(label ? label : 'Select', " is focused ").concat(isSearchable ? ',type to refine list' : '', ", press Down to open the menu, ").concat(isMulti ? ' press left to focus selected values' : ''); + + case 'value': + return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value'; + } + }; + + exports.instructionsAriaMessage = instructionsAriaMessage; + + var valueEventAriaMessage = function valueEventAriaMessage(event, context) { + var value = context.value, + isDisabled = context.isDisabled; + if (!value) return; + + switch (event) { + case 'deselect-option': + case 'pop-value': + case 'remove-value': + return "option ".concat(value, ", deselected."); + + case 'select-option': + return isDisabled ? "option ".concat(value, " is disabled. Select another option.") : "option ".concat(value, ", selected."); + } + }; + + exports.valueEventAriaMessage = valueEventAriaMessage; + + var valueFocusAriaMessage = function valueFocusAriaMessage(_ref) { + var focusedValue = _ref.focusedValue, + getOptionLabel = _ref.getOptionLabel, + selectValue = _ref.selectValue; + return "value ".concat(getOptionLabel(focusedValue), " focused, ").concat(selectValue.indexOf(focusedValue) + 1, " of ").concat(selectValue.length, "."); + }; + + exports.valueFocusAriaMessage = valueFocusAriaMessage; + + var optionFocusAriaMessage = function optionFocusAriaMessage(_ref2) { + var focusedOption = _ref2.focusedOption, + getOptionLabel = _ref2.getOptionLabel, + options = _ref2.options; + return "option ".concat(getOptionLabel(focusedOption), " focused").concat(focusedOption.isDisabled ? ' disabled' : '', ", ").concat(options.indexOf(focusedOption) + 1, " of ").concat(options.length, "."); + }; + + exports.optionFocusAriaMessage = optionFocusAriaMessage; + + var resultsAriaMessage = function resultsAriaMessage(_ref3) { + var inputValue = _ref3.inputValue, + screenReaderMessage = _ref3.screenReaderMessage; + return "".concat(screenReaderMessage).concat(inputValue ? ' for search term ' + inputValue : '', "."); + }; + + exports.resultsAriaMessage = resultsAriaMessage; + }); + + unwrapExports(accessibility); + var accessibility_1 = accessibility.resultsAriaMessage; + var accessibility_2 = accessibility.optionFocusAriaMessage; + var accessibility_3 = accessibility.valueFocusAriaMessage; + var accessibility_4 = accessibility.valueEventAriaMessage; + var accessibility_5 = accessibility.instructionsAriaMessage; + + var builtins$1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.isOptionDisabled = exports.getOptionValue = exports.getOptionLabel = exports.formatGroupLabel = void 0; + + var formatGroupLabel = function formatGroupLabel(group) { + return group.label; + }; + + exports.formatGroupLabel = formatGroupLabel; + + var getOptionLabel = function getOptionLabel(option) { + return option.label; + }; + + exports.getOptionLabel = getOptionLabel; + + var getOptionValue = function getOptionValue(option) { + return option.value; + }; + + exports.getOptionValue = getOptionValue; + + var isOptionDisabled = function isOptionDisabled(option) { + return !!option.isDisabled; + }; + + exports.isOptionDisabled = isOptionDisabled; + }); + + unwrapExports(builtins$1); + var builtins_1 = builtins$1.isOptionDisabled; + var builtins_2 = builtins$1.getOptionValue; + var builtins_3 = builtins$1.getOptionLabel; + var builtins_4 = builtins$1.formatGroupLabel; + + var containers = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.IndicatorsContainer = exports.indicatorsContainerCSS = exports.ValueContainer = exports.valueContainerCSS = exports.SelectContainer = exports.containerCSS = void 0; + + var _react = _interopRequireWildcard(React__default); + + + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + var containerCSS = function containerCSS(_ref) { + var isDisabled = _ref.isDisabled, + isRtl = _ref.isRtl; + return { + direction: isRtl ? 'rtl' : null, + pointerEvents: isDisabled ? 'none' : null, + // cancel mouse events when disabled + position: 'relative' + }; + }; + + exports.containerCSS = containerCSS; + + var SelectContainer = function SelectContainer(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps, + isDisabled = props.isDisabled, + isRtl = props.isRtl; + return _react.default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('container', props)), { + '--is-disabled': isDisabled, + '--is-rtl': isRtl + }, className) + }, innerProps), children); + }; // ============================== + // Value Container + // ============================== + + + exports.SelectContainer = SelectContainer; + + var valueContainerCSS = function valueContainerCSS(_ref2) { + var spacing = _ref2.theme.spacing; + return { + alignItems: 'center', + display: 'flex', + flex: 1, + flexWrap: 'wrap', + padding: "".concat(spacing.baseUnit / 2, "px ").concat(spacing.baseUnit * 2, "px"), + WebkitOverflowScrolling: 'touch', + position: 'relative', + overflow: 'hidden' + }; + }; + + exports.valueContainerCSS = valueContainerCSS; + + var ValueContainer = + /*#__PURE__*/ + function (_Component) { + _inherits(ValueContainer, _Component); + + function ValueContainer() { + _classCallCheck(this, ValueContainer); + + return _possibleConstructorReturn(this, _getPrototypeOf(ValueContainer).apply(this, arguments)); + } + + _createClass(ValueContainer, [{ + key: "render", + value: function render() { + var _this$props = this.props, + children = _this$props.children, + className = _this$props.className, + cx = _this$props.cx, + isMulti = _this$props.isMulti, + getStyles = _this$props.getStyles, + hasValue = _this$props.hasValue; + return _react.default.createElement("div", { + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('valueContainer', this.props)), { + 'value-container': true, + 'value-container--is-multi': isMulti, + 'value-container--has-value': hasValue + }, className) + }, children); + } + }]); + + return ValueContainer; + }(_react.Component); // ============================== + // Indicator Container + // ============================== + + + exports.ValueContainer = ValueContainer; + + var indicatorsContainerCSS = function indicatorsContainerCSS() { + return { + alignItems: 'center', + alignSelf: 'stretch', + display: 'flex', + flexShrink: 0 + }; + }; + + exports.indicatorsContainerCSS = indicatorsContainerCSS; + + var IndicatorsContainer = function IndicatorsContainer(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles; + return _react.default.createElement("div", { + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('indicatorsContainer', props)), { + 'indicators': true + }, className) + }, children); + }; + + exports.IndicatorsContainer = IndicatorsContainer; + }); + + unwrapExports(containers); + var containers_1 = containers.IndicatorsContainer; + var containers_2 = containers.indicatorsContainerCSS; + var containers_3 = containers.ValueContainer; + var containers_4 = containers.valueContainerCSS; + var containers_5 = containers.SelectContainer; + var containers_6 = containers.containerCSS; + + var indicators = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.LoadingIndicator = exports.loadingIndicatorCSS = exports.IndicatorSeparator = exports.indicatorSeparatorCSS = exports.ClearIndicator = exports.clearIndicatorCSS = exports.DropdownIndicator = exports.dropdownIndicatorCSS = exports.DownChevron = exports.CrossIcon = void 0; + + var _react = _interopRequireDefault(React__default); + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + // ============================== + // Dropdown & Clear Icons + // ============================== + var Svg = function Svg(_ref) { + var size = _ref.size, + props = _objectWithoutProperties(_ref, ["size"]); + + return _react.default.createElement("svg", _extends({ + height: size, + width: size, + viewBox: "0 0 20 20", + "aria-hidden": "true", + focusable: "false", + className: + /*#__PURE__*/ + + /*#__PURE__*/ + (0, index_esm.css)({ + display: 'inline-block', + fill: 'currentColor', + lineHeight: 1, + stroke: 'currentColor', + strokeWidth: 0 + }) + }, props)); + }; + + var CrossIcon = function CrossIcon(props) { + return _react.default.createElement(Svg, _extends({ + size: 20 + }, props), _react.default.createElement("path", { + d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" + })); + }; + + exports.CrossIcon = CrossIcon; + + var DownChevron = function DownChevron(props) { + return _react.default.createElement(Svg, _extends({ + size: 20 + }, props), _react.default.createElement("path", { + d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" + })); + }; // ============================== + // Dropdown & Clear Buttons + // ============================== + + + exports.DownChevron = DownChevron; + + var baseCSS = function baseCSS(_ref2) { + var isFocused = _ref2.isFocused, + _ref2$theme = _ref2.theme, + baseUnit = _ref2$theme.spacing.baseUnit, + colors = _ref2$theme.colors; + return { + color: isFocused ? colors.neutral60 : colors.neutral20, + display: 'flex', + padding: baseUnit * 2, + transition: 'color 150ms', + ':hover': { + color: isFocused ? colors.neutral80 : colors.neutral40 + } + }; + }; + + var dropdownIndicatorCSS = baseCSS; + exports.dropdownIndicatorCSS = dropdownIndicatorCSS; + + var DropdownIndicator = function DropdownIndicator(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return _react.default.createElement("div", _extends({}, innerProps, { + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('dropdownIndicator', props)), { + 'indicator': true, + 'dropdown-indicator': true + }, className) + }), children || _react.default.createElement(DownChevron, null)); + }; + + exports.DropdownIndicator = DropdownIndicator; + var clearIndicatorCSS = baseCSS; + exports.clearIndicatorCSS = clearIndicatorCSS; + + var ClearIndicator = function ClearIndicator(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return _react.default.createElement("div", _extends({}, innerProps, { + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('clearIndicator', props)), { + 'indicator': true, + 'clear-indicator': true + }, className) + }), children || _react.default.createElement(CrossIcon, null)); + }; // ============================== + // Separator + // ============================== + + + exports.ClearIndicator = ClearIndicator; + + var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref3) { + var isDisabled = _ref3.isDisabled, + _ref3$theme = _ref3.theme, + baseUnit = _ref3$theme.spacing.baseUnit, + colors = _ref3$theme.colors; + return { + alignSelf: 'stretch', + backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20, + marginBottom: baseUnit * 2, + marginTop: baseUnit * 2, + width: 1 + }; + }; + + exports.indicatorSeparatorCSS = indicatorSeparatorCSS; + + var IndicatorSeparator = function IndicatorSeparator(props) { + var className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return _react.default.createElement("span", _extends({}, innerProps, { + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('indicatorSeparator', props)), { + 'indicator-separator': true + }, className) + })); + }; // ============================== + // Loading + // ============================== + + + exports.IndicatorSeparator = IndicatorSeparator; + var keyframesName = 'react-select-loading-indicator'; + var keyframesInjected = false; + + var loadingIndicatorCSS = function loadingIndicatorCSS(_ref4) { + var isFocused = _ref4.isFocused, + size = _ref4.size, + _ref4$theme = _ref4.theme, + colors = _ref4$theme.colors, + baseUnit = _ref4$theme.spacing.baseUnit; + return { + color: isFocused ? colors.neutral60 : colors.neutral20, + display: 'flex', + padding: baseUnit * 2, + transition: 'color 150ms', + alignSelf: 'center', + fontSize: size, + lineHeight: 1, + marginRight: size, + textAlign: 'center', + verticalAlign: 'middle' + }; + }; + + exports.loadingIndicatorCSS = loadingIndicatorCSS; + + var LoadingDot = function LoadingDot(_ref5) { + var color = _ref5.color, + delay = _ref5.delay, + offset = _ref5.offset; + return _react.default.createElement("span", { + className: + /*#__PURE__*/ + + /*#__PURE__*/ + (0, index_esm.css)({ + animationDuration: '1s', + animationDelay: "".concat(delay, "ms"), + animationIterationCount: 'infinite', + animationName: keyframesName, + animationTimingFunction: 'ease-in-out', + backgroundColor: color, + borderRadius: '1em', + display: 'inline-block', + marginLeft: offset ? '1em' : null, + height: '1em', + verticalAlign: 'top', + width: '1em' + }) + }); + }; + + var LoadingIndicator = function LoadingIndicator(props) { + var className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps, + isFocused = props.isFocused, + isRtl = props.isRtl, + colors = props.theme.colors; + var color = isFocused ? colors.neutral80 : colors.neutral20; + + if (!keyframesInjected) { + // eslint-disable-next-line no-unused-expressions + (0, index_esm.injectGlobal)("@keyframes ", keyframesName, "{0%,80%,100%{opacity:0;}40%{opacity:1;}};"); + keyframesInjected = true; + } + + return _react.default.createElement("div", _extends({}, innerProps, { + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('loadingIndicator', props)), { + 'indicator': true, + 'loading-indicator': true + }, className) + }), _react.default.createElement(LoadingDot, { + color: color, + delay: 0, + offset: isRtl + }), _react.default.createElement(LoadingDot, { + color: color, + delay: 160, + offset: true + }), _react.default.createElement(LoadingDot, { + color: color, + delay: 320, + offset: !isRtl + })); + }; + + exports.LoadingIndicator = LoadingIndicator; + LoadingIndicator.defaultProps = { + size: 4 + }; + }); + + unwrapExports(indicators); + var indicators_1 = indicators.LoadingIndicator; + var indicators_2 = indicators.loadingIndicatorCSS; + var indicators_3 = indicators.IndicatorSeparator; + var indicators_4 = indicators.indicatorSeparatorCSS; + var indicators_5 = indicators.ClearIndicator; + var indicators_6 = indicators.clearIndicatorCSS; + var indicators_7 = indicators.DropdownIndicator; + var indicators_8 = indicators.dropdownIndicatorCSS; + var indicators_9 = indicators.DownChevron; + var indicators_10 = indicators.CrossIcon; + + var Control_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.css = void 0; + + var _react = _interopRequireDefault(React__default); + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + var css = function css(_ref) { + var isDisabled = _ref.isDisabled, + isFocused = _ref.isFocused, + _ref$theme = _ref.theme, + colors = _ref$theme.colors, + borderRadius = _ref$theme.borderRadius, + spacing = _ref$theme.spacing; + return { + alignItems: 'center', + backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0, + borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20, + borderRadius: borderRadius, + borderStyle: 'solid', + borderWidth: 1, + boxShadow: isFocused ? "0 0 0 1px ".concat(colors.primary) : null, + cursor: 'default', + display: 'flex', + flexWrap: 'wrap', + justifyContent: 'space-between', + minHeight: spacing.controlHeight, + outline: '0 !important', + position: 'relative', + transition: 'all 100ms', + '&:hover': { + borderColor: isFocused ? colors.primary : colors.neutral30 + } + }; + }; + + exports.css = css; + + var Control = function Control(props) { + var children = props.children, + cx = props.cx, + getStyles = props.getStyles, + className = props.className, + isDisabled = props.isDisabled, + isFocused = props.isFocused, + innerRef = props.innerRef, + innerProps = props.innerProps, + menuIsOpen = props.menuIsOpen; + return _react.default.createElement("div", _extends({ + ref: innerRef, + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('control', props)), { + 'control': true, + 'control--is-disabled': isDisabled, + 'control--is-focused': isFocused, + 'control--menu-is-open': menuIsOpen + }, className) + }, innerProps), children); + }; + + var _default = Control; + exports.default = _default; + }); + + unwrapExports(Control_1); + var Control_2 = Control_1.css; + + var Group_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.GroupHeading = exports.groupHeadingCSS = exports.groupCSS = void 0; + + var _react = _interopRequireDefault(React__default); + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + var groupCSS = function groupCSS(_ref) { + var spacing = _ref.theme.spacing; + return { + paddingBottom: spacing.baseUnit * 2, + paddingTop: spacing.baseUnit * 2 + }; + }; + + exports.groupCSS = groupCSS; + + var Group = function Group(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + Heading = props.Heading, + headingProps = props.headingProps, + label = props.label, + theme = props.theme, + selectProps = props.selectProps; + return _react.default.createElement("div", { + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('group', props)), { + 'group': true + }, className) + }, _react.default.createElement(Heading, _extends({}, headingProps, { + selectProps: selectProps, + theme: theme, + getStyles: getStyles, + cx: cx + }), label), _react.default.createElement("div", null, children)); + }; + + var groupHeadingCSS = function groupHeadingCSS(_ref2) { + var spacing = _ref2.theme.spacing; + return { + color: '#999', + cursor: 'default', + display: 'block', + fontSize: '75%', + fontWeight: '500', + marginBottom: '0.25em', + paddingLeft: spacing.baseUnit * 3, + paddingRight: spacing.baseUnit * 3, + textTransform: 'uppercase' + }; + }; + + exports.groupHeadingCSS = groupHeadingCSS; + + var GroupHeading = function GroupHeading(props) { + var className = props.className, + cx = props.cx, + getStyles = props.getStyles, + theme = props.theme, + selectProps = props.selectProps, + cleanProps = _objectWithoutProperties(props, ["className", "cx", "getStyles", "theme", "selectProps"]); + + return _react.default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('groupHeading', _objectSpread({ + theme: theme + }, cleanProps))), { + 'group-heading': true + }, className) + }, cleanProps)); + }; + + exports.GroupHeading = GroupHeading; + var _default = Group; + exports.default = _default; + }); + + unwrapExports(Group_1); + var Group_2 = Group_1.GroupHeading; + var Group_3 = Group_1.groupHeadingCSS; + var Group_4 = Group_1.groupCSS; + + var Input_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.inputCSS = void 0; + + var _react = _interopRequireDefault(React__default); + + + + var _reactInputAutosize = _interopRequireDefault(AutosizeInput_1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + var inputCSS = function inputCSS(_ref) { + var isDisabled = _ref.isDisabled, + _ref$theme = _ref.theme, + spacing = _ref$theme.spacing, + colors = _ref$theme.colors; + return { + margin: spacing.baseUnit / 2, + paddingBottom: spacing.baseUnit / 2, + paddingTop: spacing.baseUnit / 2, + visibility: isDisabled ? 'hidden' : 'visible', + color: colors.neutral80 + }; + }; + + exports.inputCSS = inputCSS; + + var inputStyle = function inputStyle(isHidden) { + return { + background: 0, + border: 0, + fontSize: 'inherit', + opacity: isHidden ? 0 : 1, + outline: 0, + padding: 0, + color: 'inherit' + }; + }; + + var Input = function Input(_ref2) { + var className = _ref2.className, + cx = _ref2.cx, + getStyles = _ref2.getStyles, + innerRef = _ref2.innerRef, + isHidden = _ref2.isHidden, + isDisabled = _ref2.isDisabled, + theme = _ref2.theme, + selectProps = _ref2.selectProps, + props = _objectWithoutProperties(_ref2, ["className", "cx", "getStyles", "innerRef", "isHidden", "isDisabled", "theme", "selectProps"]); + + return _react.default.createElement("div", { + className: + /*#__PURE__*/ + + /*#__PURE__*/ + (0, index_esm.css)(getStyles('input', _objectSpread({ + theme: theme + }, props))) + }, _react.default.createElement(_reactInputAutosize.default, _extends({ + className: cx(null, { + 'input': true + }, className), + inputRef: innerRef, + inputStyle: inputStyle(isHidden), + disabled: isDisabled + }, props))); + }; + + var _default = Input; + exports.default = _default; + }); + + unwrapExports(Input_1); + var Input_2 = Input_1.inputCSS; + + var MultiValue_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.MultiValueRemove = exports.MultiValueLabel = exports.MultiValueContainer = exports.MultiValueGeneric = exports.multiValueRemoveCSS = exports.multiValueLabelCSS = exports.multiValueCSS = void 0; + + var _react = _interopRequireWildcard(React__default); + + + + + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + var multiValueCSS = function multiValueCSS(_ref) { + var _ref$theme = _ref.theme, + spacing = _ref$theme.spacing, + borderRadius = _ref$theme.borderRadius, + colors = _ref$theme.colors; + return { + backgroundColor: colors.neutral10, + borderRadius: borderRadius / 2, + display: 'flex', + margin: spacing.baseUnit / 2, + minWidth: 0 // resolves flex/text-overflow bug + + }; + }; + + exports.multiValueCSS = multiValueCSS; + + var multiValueLabelCSS = function multiValueLabelCSS(_ref2) { + var _ref2$theme = _ref2.theme, + borderRadius = _ref2$theme.borderRadius, + colors = _ref2$theme.colors, + cropWithEllipsis = _ref2.cropWithEllipsis; + return { + borderRadius: borderRadius / 2, + color: colors.neutral80, + fontSize: '85%', + overflow: 'hidden', + padding: 3, + paddingLeft: 6, + textOverflow: cropWithEllipsis ? 'ellipsis' : null, + whiteSpace: 'nowrap' + }; + }; + + exports.multiValueLabelCSS = multiValueLabelCSS; + + var multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) { + var _ref3$theme = _ref3.theme, + spacing = _ref3$theme.spacing, + borderRadius = _ref3$theme.borderRadius, + colors = _ref3$theme.colors, + isFocused = _ref3.isFocused; + return { + alignItems: 'center', + borderRadius: borderRadius / 2, + backgroundColor: isFocused && colors.dangerLight, + display: 'flex', + paddingLeft: spacing.baseUnit, + paddingRight: spacing.baseUnit, + ':hover': { + backgroundColor: colors.dangerLight, + color: colors.danger + } + }; + }; + + exports.multiValueRemoveCSS = multiValueRemoveCSS; + + var MultiValueGeneric = function MultiValueGeneric(_ref4) { + var children = _ref4.children, + innerProps = _ref4.innerProps; + return _react.default.createElement("div", innerProps, children); + }; + + exports.MultiValueGeneric = MultiValueGeneric; + var MultiValueContainer = MultiValueGeneric; + exports.MultiValueContainer = MultiValueContainer; + var MultiValueLabel = MultiValueGeneric; + exports.MultiValueLabel = MultiValueLabel; + + var MultiValueRemove = + /*#__PURE__*/ + function (_Component) { + _inherits(MultiValueRemove, _Component); + + function MultiValueRemove() { + _classCallCheck(this, MultiValueRemove); + + return _possibleConstructorReturn(this, _getPrototypeOf(MultiValueRemove).apply(this, arguments)); + } + + _createClass(MultiValueRemove, [{ + key: "render", + value: function render() { + var _this$props = this.props, + children = _this$props.children, + innerProps = _this$props.innerProps; + return _react.default.createElement("div", innerProps, children || _react.default.createElement(indicators.CrossIcon, { + size: 14 + })); + } + }]); + + return MultiValueRemove; + }(_react.Component); + + exports.MultiValueRemove = MultiValueRemove; + + var MultiValue = + /*#__PURE__*/ + function (_Component2) { + _inherits(MultiValue, _Component2); + + function MultiValue() { + _classCallCheck(this, MultiValue); + + return _possibleConstructorReturn(this, _getPrototypeOf(MultiValue).apply(this, arguments)); + } + + _createClass(MultiValue, [{ + key: "render", + value: function render() { + var _this$props2 = this.props, + children = _this$props2.children, + className = _this$props2.className, + components = _this$props2.components, + cx = _this$props2.cx, + data = _this$props2.data, + getStyles = _this$props2.getStyles, + innerProps = _this$props2.innerProps, + isDisabled = _this$props2.isDisabled, + removeProps = _this$props2.removeProps, + selectProps = _this$props2.selectProps; + var Container = components.Container, + Label = components.Label, + Remove = components.Remove; + + var containerInnerProps = _objectSpread({ + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('multiValue', this.props)), { + 'multi-value': true, + 'multi-value--is-disabled': isDisabled + }, className) + }, innerProps); + + var labelInnerProps = { + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('multiValueLabel', this.props)), { + 'multi-value__label': true + }, className) + }; + + var removeInnerProps = _objectSpread({ + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('multiValueRemove', this.props)), { + 'multi-value__remove': true + }, className) + }, removeProps); + + return _react.default.createElement(Container, { + data: data, + innerProps: containerInnerProps, + selectProps: selectProps + }, _react.default.createElement(Label, { + data: data, + innerProps: labelInnerProps, + selectProps: selectProps + }, children), _react.default.createElement(Remove, { + data: data, + innerProps: removeInnerProps, + selectProps: selectProps + })); + } + }]); + + return MultiValue; + }(_react.Component); + + _defineProperty(MultiValue, "defaultProps", { + cropWithEllipsis: true + }); + + var _default = MultiValue; + exports.default = _default; + }); + + unwrapExports(MultiValue_1); + var MultiValue_2 = MultiValue_1.MultiValueRemove; + var MultiValue_3 = MultiValue_1.MultiValueLabel; + var MultiValue_4 = MultiValue_1.MultiValueContainer; + var MultiValue_5 = MultiValue_1.MultiValueGeneric; + var MultiValue_6 = MultiValue_1.multiValueRemoveCSS; + var MultiValue_7 = MultiValue_1.multiValueLabelCSS; + var MultiValue_8 = MultiValue_1.multiValueCSS; + + var Option_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.optionCSS = void 0; + + var _react = _interopRequireDefault(React__default); + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + var optionCSS = function optionCSS(_ref) { + var isDisabled = _ref.isDisabled, + isFocused = _ref.isFocused, + isSelected = _ref.isSelected, + _ref$theme = _ref.theme, + spacing = _ref$theme.spacing, + colors = _ref$theme.colors; + return { + backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent', + color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit', + cursor: 'default', + display: 'block', + fontSize: 'inherit', + padding: "".concat(spacing.baseUnit * 2, "px ").concat(spacing.baseUnit * 3, "px"), + width: '100%', + userSelect: 'none', + WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)', + // provide some affordance on touch devices + ':active': { + backgroundColor: isSelected ? colors.primary : colors.primary50 + } + }; + }; + + exports.optionCSS = optionCSS; + + var Option = function Option(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + isDisabled = props.isDisabled, + isFocused = props.isFocused, + isSelected = props.isSelected, + innerRef = props.innerRef, + innerProps = props.innerProps; + return _react.default.createElement("div", _extends({ + ref: innerRef, + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('option', props)), { + 'option': true, + 'option--is-disabled': isDisabled, + 'option--is-focused': isFocused, + 'option--is-selected': isSelected + }, className) + }, innerProps), children); + }; + + var _default = Option; + exports.default = _default; + }); + + unwrapExports(Option_1); + var Option_2 = Option_1.optionCSS; + + var Placeholder_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.placeholderCSS = void 0; + + var _react = _interopRequireDefault(React__default); + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + var placeholderCSS = function placeholderCSS(_ref) { + var _ref$theme = _ref.theme, + spacing = _ref$theme.spacing, + colors = _ref$theme.colors; + return { + color: colors.neutral50, + marginLeft: spacing.baseUnit / 2, + marginRight: spacing.baseUnit / 2, + position: 'absolute', + top: '50%', + transform: 'translateY(-50%)' + }; + }; + + exports.placeholderCSS = placeholderCSS; + + var Placeholder = function Placeholder(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + innerProps = props.innerProps; + return _react.default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('placeholder', props)), { + 'placeholder': true + }, className) + }, innerProps), children); + }; + + var _default = Placeholder; + exports.default = _default; + }); + + unwrapExports(Placeholder_1); + var Placeholder_2 = Placeholder_1.placeholderCSS; + + var SingleValue_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.css = void 0; + + var _react = _interopRequireDefault(React__default); + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + var css = function css(_ref) { + var isDisabled = _ref.isDisabled, + _ref$theme = _ref.theme, + spacing = _ref$theme.spacing, + colors = _ref$theme.colors; + return { + color: isDisabled ? colors.neutral40 : colors.neutral80, + marginLeft: spacing.baseUnit / 2, + marginRight: spacing.baseUnit / 2, + maxWidth: "calc(100% - ".concat(spacing.baseUnit * 2, "px)"), + overflow: 'hidden', + position: 'absolute', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + top: '50%', + transform: 'translateY(-50%)' + }; + }; + + exports.css = css; + + var SingleValue = function SingleValue(props) { + var children = props.children, + className = props.className, + cx = props.cx, + getStyles = props.getStyles, + isDisabled = props.isDisabled, + innerProps = props.innerProps; + return _react.default.createElement("div", _extends({ + className: cx( + /*#__PURE__*/ + (0, index_esm.css)(getStyles('singleValue', props)), { + 'single-value': true, + 'single-value--is-disabled': isDisabled + }, className) + }, innerProps), children); + }; + + var _default = SingleValue; + exports.default = _default; + }); + + unwrapExports(SingleValue_1); + var SingleValue_2 = SingleValue_1.css; + + var components_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.defaultComponents = exports.components = void 0; + + + + + + var _Control = _interopRequireDefault(Control_1); + + var _Group = _interopRequireWildcard(Group_1); + + var _Input = _interopRequireDefault(Input_1); + + var _Menu = _interopRequireWildcard(Menu_1); + + var _MultiValue = _interopRequireWildcard(MultiValue_1); + + var _Option = _interopRequireDefault(Option_1); + + var _Placeholder = _interopRequireDefault(Placeholder_1); + + var _SingleValue = _interopRequireDefault(SingleValue_1); + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + var components = { + ClearIndicator: indicators.ClearIndicator, + Control: _Control.default, + DropdownIndicator: indicators.DropdownIndicator, + DownChevron: indicators.DownChevron, + CrossIcon: indicators.CrossIcon, + Group: _Group.default, + GroupHeading: _Group.GroupHeading, + IndicatorsContainer: containers.IndicatorsContainer, + IndicatorSeparator: indicators.IndicatorSeparator, + Input: _Input.default, + LoadingIndicator: indicators.LoadingIndicator, + Menu: _Menu.default, + MenuList: _Menu.MenuList, + MenuPortal: _Menu.MenuPortal, + LoadingMessage: _Menu.LoadingMessage, + NoOptionsMessage: _Menu.NoOptionsMessage, + MultiValue: _MultiValue.default, + MultiValueContainer: _MultiValue.MultiValueContainer, + MultiValueLabel: _MultiValue.MultiValueLabel, + MultiValueRemove: _MultiValue.MultiValueRemove, + Option: _Option.default, + Placeholder: _Placeholder.default, + SelectContainer: containers.SelectContainer, + SingleValue: _SingleValue.default, + ValueContainer: containers.ValueContainer + }; + exports.components = components; + + var defaultComponents = function defaultComponents(props) { + return _objectSpread({}, components, props.components); + }; + + exports.defaultComponents = defaultComponents; + }); + + unwrapExports(components_1); + var components_2 = components_1.defaultComponents; + var components_3 = components_1.components; + + var styles = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.mergeStyles = mergeStyles; + exports.defaultStyles = void 0; + + + + + + + + + + + + + + + + + + + + + + function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + var defaultStyles = { + clearIndicator: indicators.clearIndicatorCSS, + container: containers.containerCSS, + control: Control_1.css, + dropdownIndicator: indicators.dropdownIndicatorCSS, + group: Group_1.groupCSS, + groupHeading: Group_1.groupHeadingCSS, + indicatorsContainer: containers.indicatorsContainerCSS, + indicatorSeparator: indicators.indicatorSeparatorCSS, + input: Input_1.inputCSS, + loadingIndicator: indicators.loadingIndicatorCSS, + loadingMessage: Menu_1.loadingMessageCSS, + menu: Menu_1.menuCSS, + menuList: Menu_1.menuListCSS, + menuPortal: Menu_1.menuPortalCSS, + multiValue: MultiValue_1.multiValueCSS, + multiValueLabel: MultiValue_1.multiValueLabelCSS, + multiValueRemove: MultiValue_1.multiValueRemoveCSS, + noOptionsMessage: Menu_1.noOptionsMessageCSS, + option: Option_1.optionCSS, + placeholder: Placeholder_1.placeholderCSS, + singleValue: SingleValue_1.css, + valueContainer: containers.valueContainerCSS + }; // Merge Utility + // Allows consumers to extend a base Select with additional styles + + exports.defaultStyles = defaultStyles; + + function mergeStyles(source) { + var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + // initialize with source styles + var styles = _objectSpread({}, source); // massage in target styles + + + Object.keys(target).forEach(function (key) { + if (source[key]) { + styles[key] = function (rsCss, props) { + return target[key](source[key](rsCss, props), props); + }; + } else { + styles[key] = target[key]; + } + }); + return styles; + } + }); + + unwrapExports(styles); + var styles_1 = styles.mergeStyles; + var styles_2 = styles.defaultStyles; + + var theme = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.defaultTheme = exports.spacing = exports.colors = void 0; + var colors = { + primary: '#2684FF', + primary75: '#4C9AFF', + primary50: '#B2D4FF', + primary25: '#DEEBFF', + danger: '#DE350B', + dangerLight: '#FFBDAD', + neutral0: 'hsl(0, 0%, 100%)', + neutral5: 'hsl(0, 0%, 95%)', + neutral10: 'hsl(0, 0%, 90%)', + neutral20: 'hsl(0, 0%, 80%)', + neutral30: 'hsl(0, 0%, 70%)', + neutral40: 'hsl(0, 0%, 60%)', + neutral50: 'hsl(0, 0%, 50%)', + neutral60: 'hsl(0, 0%, 40%)', + neutral70: 'hsl(0, 0%, 30%)', + neutral80: 'hsl(0, 0%, 20%)', + neutral90: 'hsl(0, 0%, 10%)' + }; + exports.colors = colors; + var borderRadius = 4; + var baseUnit = 4; + /* Used to calculate consistent margin/padding on elements */ + + var controlHeight = 38; + /* The minimum height of the control */ + + var menuGutter = baseUnit * 2; + /* The amount of space between the control and menu */ + + var spacing = { + baseUnit: baseUnit, + controlHeight: controlHeight, + menuGutter: menuGutter + }; + exports.spacing = spacing; + var defaultTheme = { + borderRadius: borderRadius, + colors: colors, + spacing: spacing + }; + exports.defaultTheme = defaultTheme; + }); + + unwrapExports(theme); + var theme_1 = theme.defaultTheme; + var theme_2 = theme.spacing; + var theme_3 = theme.colors; + + var Select_1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.defaultProps = void 0; + + var _react = _interopRequireWildcard(React__default); + + var _memoizeOne = _interopRequireDefault(index); + + + + var _reactFastCompare = _interopRequireDefault(reactFastCompare); + + + + + + + + + + + + + + + + + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + + function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + + function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } + + function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + + function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + var defaultProps = { + backspaceRemovesValue: true, + blurInputOnSelect: (0, utils.isTouchCapable)(), + captureMenuScroll: !(0, utils.isTouchCapable)(), + closeMenuOnSelect: true, + closeMenuOnScroll: false, + components: {}, + controlShouldRenderValue: true, + escapeClearsValue: false, + filterOption: (0, filters.createFilter)(), + formatGroupLabel: builtins$1.formatGroupLabel, + getOptionLabel: builtins$1.getOptionLabel, + getOptionValue: builtins$1.getOptionValue, + isDisabled: false, + isLoading: false, + isMulti: false, + isRtl: false, + isSearchable: true, + isOptionDisabled: builtins$1.isOptionDisabled, + loadingMessage: function loadingMessage() { + return 'Loading...'; + }, + maxMenuHeight: 300, + minMenuHeight: 140, + menuIsOpen: false, + menuPlacement: 'bottom', + menuPosition: 'absolute', + menuShouldBlockScroll: false, + menuShouldScrollIntoView: !(0, utils.isMobileDevice)(), + noOptionsMessage: function noOptionsMessage() { + return 'No options'; + }, + openMenuOnFocus: false, + openMenuOnClick: true, + options: [], + pageSize: 5, + placeholder: 'Select...', + screenReaderStatus: function screenReaderStatus(_ref) { + var count = _ref.count; + return "".concat(count, " result").concat(count !== 1 ? 's' : '', " available"); + }, + styles: {}, + tabIndex: '0', + tabSelectsValue: true + }; + exports.defaultProps = defaultProps; + var instanceId = 1; + + var Select = + /*#__PURE__*/ + function (_Component) { + _inherits(Select, _Component); + + // Misc. Instance Properties + // ------------------------------ + // TODO + // Refs + // ------------------------------ + // Lifecycle + // ------------------------------ + function Select(_props) { + var _this; + + _classCallCheck(this, Select); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Select).call(this, _props)); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { + ariaLiveSelection: '', + ariaLiveContext: '', + focusedOption: null, + focusedValue: null, + inputIsHidden: false, + isFocused: false, + isComposing: false, + menuOptions: { + render: [], + focusable: [] + }, + selectValue: [] + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blockOptionHover", false); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "clearFocusValueOnUpdate", false); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "commonProps", void 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "components", void 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "hasGroups", false); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "initialTouchX", 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "initialTouchY", 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "inputIsHiddenAfterUpdate", void 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "instancePrefix", ''); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "openAfterFocus", false); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "scrollToFocusedOptionOnUpdate", false); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "userIsDragging", void 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "controlRef", null); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getControlRef", function (ref) { + _this.controlRef = ref; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "focusedOptionRef", null); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getFocusedOptionRef", function (ref) { + _this.focusedOptionRef = ref; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "menuListRef", null); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getMenuListRef", function (ref) { + _this.menuListRef = ref; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "inputRef", null); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getInputRef", function (ref) { + _this.inputRef = ref; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "cacheComponents", function (components) { + _this.components = (0, components_1.defaultComponents)({ + components: components + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "focus", _this.focusInput); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blur", _this.blurInput); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (newValue, actionMeta) { + var _this$props = _this.props, + onChange = _this$props.onChange, + name = _this$props.name; + onChange(newValue, _objectSpread({}, actionMeta, { + name: name + })); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "setValue", function (newValue) { + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'set-value'; + var option = arguments.length > 2 ? arguments[2] : undefined; + var _this$props2 = _this.props, + closeMenuOnSelect = _this$props2.closeMenuOnSelect, + isMulti = _this$props2.isMulti; + + _this.onInputChange('', { + action: 'set-value' + }); + + if (closeMenuOnSelect) { + _this.inputIsHiddenAfterUpdate = !isMulti; + + _this.onMenuClose(); + } // when the select value should change, we should reset focusedValue + + + _this.clearFocusValueOnUpdate = true; + + _this.onChange(newValue, { + action: action, + option: option + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "selectOption", function (newValue) { + var _this$props3 = _this.props, + blurInputOnSelect = _this$props3.blurInputOnSelect, + isMulti = _this$props3.isMulti; + var selectValue = _this.state.selectValue; + + if (isMulti) { + if (_this.isOptionSelected(newValue, selectValue)) { + var candidate = _this.getOptionValue(newValue); + + _this.setValue(selectValue.filter(function (i) { + return _this.getOptionValue(i) !== candidate; + }), 'deselect-option', newValue); + + _this.announceAriaLiveSelection({ + event: 'deselect-option', + context: { + value: _this.getOptionLabel(newValue) + } + }); + } else { + if (!_this.isOptionDisabled(newValue, selectValue)) { + _this.setValue([].concat(_toConsumableArray(selectValue), [newValue]), 'select-option', newValue); + + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue) + } + }); + } else { + // announce that option is disabled + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue), + isDisabled: true + } + }); + } + } + } else { + if (!_this.isOptionDisabled(newValue, selectValue)) { + _this.setValue(newValue, 'select-option'); + + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue) + } + }); + } else { + // announce that option is disabled + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue), + isDisabled: true + } + }); + } + } + + if (blurInputOnSelect) { + _this.blurInput(); + } + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "removeValue", function (removedValue) { + var selectValue = _this.state.selectValue; + + var candidate = _this.getOptionValue(removedValue); + + _this.onChange(selectValue.filter(function (i) { + return _this.getOptionValue(i) !== candidate; + }), { + action: 'remove-value', + removedValue: removedValue + }); + + _this.announceAriaLiveSelection({ + event: 'remove-value', + context: { + value: removedValue ? _this.getOptionLabel(removedValue) : '' + } + }); + + _this.focusInput(); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "clearValue", function () { + var isMulti = _this.props.isMulti; + + _this.onChange(isMulti ? [] : null, { + action: 'clear' + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "popValue", function () { + var selectValue = _this.state.selectValue; + var lastSelectedValue = selectValue[selectValue.length - 1]; + + _this.announceAriaLiveSelection({ + event: 'pop-value', + context: { + value: lastSelectedValue ? _this.getOptionLabel(lastSelectedValue) : '' + } + }); + + _this.onChange(selectValue.slice(0, selectValue.length - 1), { + action: 'pop-value', + removedValue: lastSelectedValue + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getOptionLabel", function (data) { + return _this.props.getOptionLabel(data); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getOptionValue", function (data) { + return _this.props.getOptionValue(data); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getStyles", function (key, props) { + var base = styles.defaultStyles[key](props); + + base.boxSizing = 'border-box'; + var custom = _this.props.styles[key]; + return custom ? custom(base, props) : base; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getElementId", function (element) { + return "".concat(_this.instancePrefix, "-").concat(element); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getActiveDescendentId", function () { + var menuIsOpen = _this.props.menuIsOpen; + var _this$state = _this.state, + menuOptions = _this$state.menuOptions, + focusedOption = _this$state.focusedOption; + if (!focusedOption || !menuIsOpen) return undefined; + var index = menuOptions.focusable.indexOf(focusedOption); + var option = menuOptions.render[index]; + return option && option.key; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "announceAriaLiveSelection", function (_ref2) { + var event = _ref2.event, + context = _ref2.context; + + _this.setState({ + ariaLiveSelection: (0, accessibility.valueEventAriaMessage)(event, context) + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "announceAriaLiveContext", function (_ref3) { + var event = _ref3.event, + context = _ref3.context; + + _this.setState({ + ariaLiveContext: (0, accessibility.instructionsAriaMessage)(event, _objectSpread({}, context, { + label: _this.props['aria-label'] + })) + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuMouseDown", function (event) { + if (event.button !== 0) { + return; + } + + event.stopPropagation(); + event.preventDefault(); + + _this.focusInput(); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuMouseMove", function (event) { + _this.blockOptionHover = false; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onControlMouseDown", function (event) { + var openMenuOnClick = _this.props.openMenuOnClick; + + if (!_this.state.isFocused) { + if (openMenuOnClick) { + _this.openAfterFocus = true; + } + + _this.focusInput(); + } else if (!_this.props.menuIsOpen) { + if (openMenuOnClick) { + _this.openMenu('first'); + } + } else { + //$FlowFixMe + if (event.target.tagName !== 'INPUT') { + _this.onMenuClose(); + } + } //$FlowFixMe + + + if (event.target.tagName !== 'INPUT') { + event.preventDefault(); + } + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onDropdownIndicatorMouseDown", function (event) { + // ignore mouse events that weren't triggered by the primary button + if (event && event.type === 'mousedown' && event.button !== 0) { + return; + } + + if (_this.props.isDisabled) return; + var _this$props4 = _this.props, + isMulti = _this$props4.isMulti, + menuIsOpen = _this$props4.menuIsOpen; + + _this.focusInput(); + + if (menuIsOpen) { + _this.inputIsHiddenAfterUpdate = !isMulti; + + _this.onMenuClose(); + } else { + _this.openMenu('first'); + } + + event.preventDefault(); + event.stopPropagation(); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onClearIndicatorMouseDown", function (event) { + // ignore mouse events that weren't triggered by the primary button + if (event && event.type === 'mousedown' && event.button !== 0) { + return; + } + + _this.clearValue(); + + event.stopPropagation(); + _this.openAfterFocus = false; + setTimeout(function () { + return _this.focusInput(); + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onScroll", function (event) { + if (typeof _this.props.closeMenuOnScroll === 'boolean') { + if (event.target instanceof HTMLElement && (0, utils.isDocumentElement)(event.target)) { + _this.props.onMenuClose(); + } + } else if (typeof _this.props.closeMenuOnScroll === 'function') { + if (_this.props.closeMenuOnScroll(event)) { + _this.props.onMenuClose(); + } + } + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onCompositionStart", function () { + _this.setState({ + isComposing: true + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onCompositionEnd", function () { + _this.setState({ + isComposing: false + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchStart", function (_ref4) { + var touches = _ref4.touches; + var touch = touches.item(0); + + if (!touch) { + return; + } + + _this.initialTouchX = touch.clientX; + _this.initialTouchY = touch.clientY; + _this.userIsDragging = false; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchMove", function (_ref5) { + var touches = _ref5.touches; + var touch = touches.item(0); + + if (!touch) { + return; + } + + var deltaX = Math.abs(touch.clientX - _this.initialTouchX); + var deltaY = Math.abs(touch.clientY - _this.initialTouchY); + var moveThreshold = 5; + _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchEnd", function (event) { + if (_this.userIsDragging) return; // close the menu if the user taps outside + // we're checking on event.target here instead of event.currentTarget, because we want to assert information + // on events on child elements, not the document (which we've attached this handler to). + + if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) { + _this.blurInput(); + } // reset move vars + + + _this.initialTouchX = 0; + _this.initialTouchY = 0; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onControlTouchEnd", function (event) { + if (_this.userIsDragging) return; + + _this.onControlMouseDown(event); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onClearIndicatorTouchEnd", function (event) { + if (_this.userIsDragging) return; + + _this.onClearIndicatorMouseDown(event); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onDropdownIndicatorTouchEnd", function (event) { + if (_this.userIsDragging) return; + + _this.onDropdownIndicatorMouseDown(event); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleInputChange", function (event) { + var inputValue = event.currentTarget.value; + _this.inputIsHiddenAfterUpdate = false; + + _this.onInputChange(inputValue, { + action: 'input-change' + }); + + _this.onMenuOpen(); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputFocus", function (event) { + var _this$props5 = _this.props, + isSearchable = _this$props5.isSearchable, + isMulti = _this$props5.isMulti; + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + + _this.inputIsHiddenAfterUpdate = false; + + _this.announceAriaLiveContext({ + event: 'input', + context: { + isSearchable: isSearchable, + isMulti: isMulti + } + }); + + _this.setState({ + isFocused: true + }); + + if (_this.openAfterFocus || _this.props.openMenuOnFocus) { + _this.openMenu('first'); + } + + _this.openAfterFocus = false; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputBlur", function (event) { + if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) { + _this.inputRef.focus(); + + return; + } + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + + _this.onInputChange('', { + action: 'input-blur' + }); + + _this.onMenuClose(); + + _this.setState({ + focusedValue: null, + isFocused: false + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onOptionHover", function (focusedOption) { + if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) { + return; + } + + _this.setState({ + focusedOption: focusedOption + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "shouldHideSelectedOptions", function () { + var _this$props6 = _this.props, + hideSelectedOptions = _this$props6.hideSelectedOptions, + isMulti = _this$props6.isMulti; + if (hideSelectedOptions === undefined) return isMulti; + return hideSelectedOptions; + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onKeyDown", function (event) { + var _this$props7 = _this.props, + isMulti = _this$props7.isMulti, + backspaceRemovesValue = _this$props7.backspaceRemovesValue, + escapeClearsValue = _this$props7.escapeClearsValue, + inputValue = _this$props7.inputValue, + isClearable = _this$props7.isClearable, + isDisabled = _this$props7.isDisabled, + menuIsOpen = _this$props7.menuIsOpen, + onKeyDown = _this$props7.onKeyDown, + tabSelectsValue = _this$props7.tabSelectsValue, + openMenuOnFocus = _this$props7.openMenuOnFocus; + var _this$state2 = _this.state, + isComposing = _this$state2.isComposing, + focusedOption = _this$state2.focusedOption, + focusedValue = _this$state2.focusedValue, + selectValue = _this$state2.selectValue; + if (isDisabled) return; + + if (typeof onKeyDown === 'function') { + onKeyDown(event); + + if (event.defaultPrevented) { + return; + } + } // Block option hover events when the user has just pressed a key + + + _this.blockOptionHover = true; + + switch (event.key) { + case 'ArrowLeft': + if (!isMulti || inputValue) return; + + _this.focusValue('previous'); + + break; + + case 'ArrowRight': + if (!isMulti || inputValue) return; + + _this.focusValue('next'); + + break; + + case 'Delete': + case 'Backspace': + if (inputValue) return; + + if (focusedValue) { + _this.removeValue(focusedValue); + } else { + if (!backspaceRemovesValue) return; + + if (isMulti) { + _this.popValue(); + } else if (isClearable) { + _this.clearValue(); + } + } + + break; + + case 'Tab': + if (isComposing) return; + + if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused + // option is already selected; it breaks the flow of navigation + openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) { + return; + } + + _this.selectOption(focusedOption); + + break; + + case 'Enter': + if (menuIsOpen) { + if (!focusedOption) return; + if (isComposing) return; + + _this.selectOption(focusedOption); + + break; + } + + return; + + case 'Escape': + if (menuIsOpen) { + _this.inputIsHiddenAfterUpdate = false; + + _this.onInputChange('', { + action: 'menu-close' + }); + + _this.onMenuClose(); + } else if (isClearable && escapeClearsValue) { + _this.clearValue(); + } + + break; + + case ' ': + // space + if (inputValue) { + return; + } + + if (!menuIsOpen) { + _this.openMenu('first'); + + break; + } + + if (!focusedOption) return; + + _this.selectOption(focusedOption); + + break; + + case 'ArrowUp': + if (menuIsOpen) { + _this.focusOption('up'); + } else { + _this.openMenu('last'); + } + + break; + + case 'ArrowDown': + if (menuIsOpen) { + _this.focusOption('down'); + } else { + _this.openMenu('first'); + } + + break; + + case 'PageUp': + if (!menuIsOpen) return; + + _this.focusOption('pageup'); + + break; + + case 'PageDown': + if (!menuIsOpen) return; + + _this.focusOption('pagedown'); + + break; + + case 'Home': + if (!menuIsOpen) return; + + _this.focusOption('first'); + + break; + + case 'End': + if (!menuIsOpen) return; + + _this.focusOption('last'); + + break; + + default: + return; + } + + event.preventDefault(); + }); + + var value = _props.value; + _this.cacheComponents = (0, _memoizeOne.default)(_this.cacheComponents, _reactFastCompare.default).bind(_assertThisInitialized(_assertThisInitialized(_this))); + + _this.cacheComponents(_props.components); + + _this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId); + + var _selectValue = (0, utils.cleanValue)(value); + + var _menuOptions = _this.buildMenuOptions(_props, _selectValue); + + _this.state.menuOptions = _menuOptions; + _this.state.selectValue = _selectValue; + return _this; + } + + _createClass(Select, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.startListeningComposition(); + this.startListeningToTouch(); + + if (this.props.closeMenuOnScroll && document && document.addEventListener) { + // Listen to all scroll events, and filter them out inside of 'onScroll' + document.addEventListener('scroll', this.onScroll, true); + } + + if (this.props.autoFocus) { + this.focusInput(); + } + } + }, { + key: "componentWillReceiveProps", + value: function componentWillReceiveProps(nextProps) { + var _this$props8 = this.props, + options = _this$props8.options, + value = _this$props8.value, + inputValue = _this$props8.inputValue; // re-cache custom components + + this.cacheComponents(nextProps.components); // rebuild the menu options + + if (nextProps.value !== value || nextProps.options !== options || nextProps.inputValue !== inputValue) { + var selectValue = (0, utils.cleanValue)(nextProps.value); + var menuOptions = this.buildMenuOptions(nextProps, selectValue); + var focusedValue = this.getNextFocusedValue(selectValue); + var focusedOption = this.getNextFocusedOption(menuOptions.focusable); + this.setState({ + menuOptions: menuOptions, + selectValue: selectValue, + focusedOption: focusedOption, + focusedValue: focusedValue + }); + } // some updates should toggle the state of the input visibility + + + if (this.inputIsHiddenAfterUpdate != null) { + this.setState({ + inputIsHidden: this.inputIsHiddenAfterUpdate + }); + delete this.inputIsHiddenAfterUpdate; + } + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + var _this$props9 = this.props, + isDisabled = _this$props9.isDisabled, + menuIsOpen = _this$props9.menuIsOpen; + var isFocused = this.state.isFocused; + + if ( // ensure focus is restored correctly when the control becomes enabled + isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens + isFocused && menuIsOpen && !prevProps.menuIsOpen) { + this.focusInput(); + } // scroll the focused option into view if necessary + + + if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) { + (0, utils.scrollIntoView)(this.menuListRef, this.focusedOptionRef); + } + + this.scrollToFocusedOptionOnUpdate = false; + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.stopListeningComposition(); + this.stopListeningToTouch(); + document.removeEventListener('scroll', this.onScroll, true); + } + }, { + key: "onMenuOpen", + // ============================== + // Consumer Handlers + // ============================== + value: function onMenuOpen() { + this.props.onMenuOpen(); + } + }, { + key: "onMenuClose", + value: function onMenuClose() { + var _this$props10 = this.props, + isSearchable = _this$props10.isSearchable, + isMulti = _this$props10.isMulti; + this.announceAriaLiveContext({ + event: 'input', + context: { + isSearchable: isSearchable, + isMulti: isMulti + } + }); + this.onInputChange('', { + action: 'menu-close' + }); + this.props.onMenuClose(); + } + }, { + key: "onInputChange", + value: function onInputChange(newValue, actionMeta) { + this.props.onInputChange(newValue, actionMeta); + } // ============================== + // Methods + // ============================== + + }, { + key: "focusInput", + value: function focusInput() { + if (!this.inputRef) return; + this.inputRef.focus(); + } + }, { + key: "blurInput", + value: function blurInput() { + if (!this.inputRef) return; + this.inputRef.blur(); + } // aliased for consumers + + }, { + key: "openMenu", + value: function openMenu(focusOption) { + var _this$state3 = this.state, + menuOptions = _this$state3.menuOptions, + selectValue = _this$state3.selectValue, + isFocused = _this$state3.isFocused; + var isMulti = this.props.isMulti; + var openAtIndex = focusOption === 'first' ? 0 : menuOptions.focusable.length - 1; + + if (!isMulti) { + var selectedIndex = menuOptions.focusable.indexOf(selectValue[0]); + + if (selectedIndex > -1) { + openAtIndex = selectedIndex; + } + } // only scroll if the menu isn't already open + + + this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef); + this.inputIsHiddenAfterUpdate = false; + this.onMenuOpen(); + this.setState({ + focusedValue: null, + focusedOption: menuOptions.focusable[openAtIndex] + }); + this.announceAriaLiveContext({ + event: 'menu' + }); + } + }, { + key: "focusValue", + value: function focusValue(direction) { + var _this$props11 = this.props, + isMulti = _this$props11.isMulti, + isSearchable = _this$props11.isSearchable; + var _this$state4 = this.state, + selectValue = _this$state4.selectValue, + focusedValue = _this$state4.focusedValue; // Only multiselects support value focusing + + if (!isMulti) return; + this.setState({ + focusedOption: null + }); + var focusedIndex = selectValue.indexOf(focusedValue); + + if (!focusedValue) { + focusedIndex = -1; + this.announceAriaLiveContext({ + event: 'value' + }); + } + + var lastIndex = selectValue.length - 1; + var nextFocus = -1; + if (!selectValue.length) return; + + switch (direction) { + case 'previous': + if (focusedIndex === 0) { + // don't cycle from the start to the end + nextFocus = 0; + } else if (focusedIndex === -1) { + // if nothing is focused, focus the last value first + nextFocus = lastIndex; + } else { + nextFocus = focusedIndex - 1; + } + + break; + + case 'next': + if (focusedIndex > -1 && focusedIndex < lastIndex) { + nextFocus = focusedIndex + 1; + } + + break; + } + + if (nextFocus === -1) { + this.announceAriaLiveContext({ + event: 'input', + context: { + isSearchable: isSearchable, + isMulti: isMulti + } + }); + } + + this.setState({ + inputIsHidden: nextFocus === -1 ? false : true, + focusedValue: selectValue[nextFocus] + }); + } + }, { + key: "focusOption", + value: function focusOption() { + var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first'; + var pageSize = this.props.pageSize; + var _this$state5 = this.state, + focusedOption = _this$state5.focusedOption, + menuOptions = _this$state5.menuOptions; + var options = menuOptions.focusable; + if (!options.length) return; + var nextFocus = 0; // handles 'first' + + var focusedIndex = options.indexOf(focusedOption); + + if (!focusedOption) { + focusedIndex = -1; + this.announceAriaLiveContext({ + event: 'menu' + }); + } + + if (direction === 'up') { + nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1; + } else if (direction === 'down') { + nextFocus = (focusedIndex + 1) % options.length; + } else if (direction === 'pageup') { + nextFocus = focusedIndex - pageSize; + if (nextFocus < 0) nextFocus = 0; + } else if (direction === 'pagedown') { + nextFocus = focusedIndex + pageSize; + if (nextFocus > options.length - 1) nextFocus = options.length - 1; + } else if (direction === 'last') { + nextFocus = options.length - 1; + } + + this.scrollToFocusedOptionOnUpdate = true; + this.setState({ + focusedOption: options[nextFocus], + focusedValue: null + }); + this.announceAriaLiveContext({ + event: 'menu', + context: { + isDisabled: (0, builtins$1.isOptionDisabled)(options[nextFocus]) + } + }); + } + }, { + key: "getTheme", + // ============================== + // Getters + // ============================== + value: function getTheme() { + // Use the default theme if there are no customizations. + if (!this.props.theme) { + return theme.defaultTheme; + } // If the theme prop is a function, assume the function + // knows how to merge the passed-in default theme with + // its own modifications. + + + if (typeof this.props.theme === 'function') { + return this.props.theme(theme.defaultTheme); + } // Otherwise, if a plain theme object was passed in, + // overlay it with the default theme. + + + return _objectSpread({}, theme.defaultTheme, this.props.theme); + } + }, { + key: "getCommonProps", + value: function getCommonProps() { + var clearValue = this.clearValue, + getStyles = this.getStyles, + setValue = this.setValue, + selectOption = this.selectOption, + props = this.props; + var classNamePrefix = props.classNamePrefix, + isMulti = props.isMulti, + isRtl = props.isRtl, + options = props.options; + var selectValue = this.state.selectValue; + var hasValue = this.hasValue(); + + var getValue = function getValue() { + return selectValue; + }; + + var cx = utils.classNames.bind(null, classNamePrefix); + + return { + cx: cx, + clearValue: clearValue, + getStyles: getStyles, + getValue: getValue, + hasValue: hasValue, + isMulti: isMulti, + isRtl: isRtl, + options: options, + selectOption: selectOption, + setValue: setValue, + selectProps: props, + theme: this.getTheme() + }; + } + }, { + key: "getNextFocusedValue", + value: function getNextFocusedValue(nextSelectValue) { + if (this.clearFocusValueOnUpdate) { + this.clearFocusValueOnUpdate = false; + return null; + } + + var _this$state6 = this.state, + focusedValue = _this$state6.focusedValue, + lastSelectValue = _this$state6.selectValue; + var lastFocusedIndex = lastSelectValue.indexOf(focusedValue); + + if (lastFocusedIndex > -1) { + var nextFocusedIndex = nextSelectValue.indexOf(focusedValue); + + if (nextFocusedIndex > -1) { + // the focused value is still in the selectValue, return it + return focusedValue; + } else if (lastFocusedIndex < nextSelectValue.length) { + // the focusedValue is not present in the next selectValue array by + // reference, so return the new value at the same index + return nextSelectValue[lastFocusedIndex]; + } + } + + return null; + } + }, { + key: "getNextFocusedOption", + value: function getNextFocusedOption(options) { + var lastFocusedOption = this.state.focusedOption; + return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0]; + } + }, { + key: "hasValue", + value: function hasValue() { + var selectValue = this.state.selectValue; + return selectValue.length > 0; + } + }, { + key: "hasOptions", + value: function hasOptions() { + return !!this.state.menuOptions.render.length; + } + }, { + key: "countOptions", + value: function countOptions() { + return this.state.menuOptions.focusable.length; + } + }, { + key: "isClearable", + value: function isClearable() { + var _this$props12 = this.props, + isClearable = _this$props12.isClearable, + isMulti = _this$props12.isMulti; // single select, by default, IS NOT clearable + // multi select, by default, IS clearable + + if (isClearable === undefined) return isMulti; + return isClearable; + } + }, { + key: "isOptionDisabled", + value: function isOptionDisabled(option, selectValue) { + return typeof this.props.isOptionDisabled === 'function' ? this.props.isOptionDisabled(option, selectValue) : false; + } + }, { + key: "isOptionSelected", + value: function isOptionSelected(option, selectValue) { + var _this2 = this; + + if (selectValue.indexOf(option) > -1) return true; + + if (typeof this.props.isOptionSelected === 'function') { + return this.props.isOptionSelected(option, selectValue); + } + + var candidate = this.getOptionValue(option); + return selectValue.some(function (i) { + return _this2.getOptionValue(i) === candidate; + }); + } + }, { + key: "filterOption", + value: function filterOption(option, inputValue) { + return this.props.filterOption ? this.props.filterOption(option, inputValue) : true; + } + }, { + key: "formatOptionLabel", + value: function formatOptionLabel(data, context) { + if (typeof this.props.formatOptionLabel === 'function') { + var inputValue = this.props.inputValue; + var selectValue = this.state.selectValue; + return this.props.formatOptionLabel(data, { + context: context, + inputValue: inputValue, + selectValue: selectValue + }); + } else { + return this.getOptionLabel(data); + } + } + }, { + key: "formatGroupLabel", + value: function formatGroupLabel(data) { + return this.props.formatGroupLabel(data); + } // ============================== + // Mouse Handlers + // ============================== + + }, { + key: "startListeningComposition", + // ============================== + // Composition Handlers + // ============================== + value: function startListeningComposition() { + if (document && document.addEventListener) { + document.addEventListener('compositionstart', this.onCompositionStart, false); + document.addEventListener('compositionend', this.onCompositionEnd, false); + } + } + }, { + key: "stopListeningComposition", + value: function stopListeningComposition() { + if (document && document.removeEventListener) { + document.removeEventListener('compositionstart', this.onCompositionStart); + document.removeEventListener('compositionend', this.onCompositionEnd); + } + } + }, { + key: "startListeningToTouch", + // ============================== + // Touch Handlers + // ============================== + value: function startListeningToTouch() { + if (document && document.addEventListener) { + document.addEventListener('touchstart', this.onTouchStart, false); + document.addEventListener('touchmove', this.onTouchMove, false); + document.addEventListener('touchend', this.onTouchEnd, false); + } + } + }, { + key: "stopListeningToTouch", + value: function stopListeningToTouch() { + if (document && document.removeEventListener) { + document.removeEventListener('touchstart', this.onTouchStart); + document.removeEventListener('touchmove', this.onTouchMove); + document.removeEventListener('touchend', this.onTouchEnd); + } + } + }, { + key: "buildMenuOptions", + // ============================== + // Menu Options + // ============================== + value: function buildMenuOptions(props, selectValue) { + var _this3 = this; + + var _props$inputValue = props.inputValue, + inputValue = _props$inputValue === void 0 ? '' : _props$inputValue, + options = props.options; + + var toOption = function toOption(option, id) { + var isDisabled = _this3.isOptionDisabled(option, selectValue); + + var isSelected = _this3.isOptionSelected(option, selectValue); + + var label = _this3.getOptionLabel(option); + + var value = _this3.getOptionValue(option); + + if (_this3.shouldHideSelectedOptions() && isSelected || !_this3.filterOption({ + label: label, + value: value, + data: option + }, inputValue)) { + return; + } + + var onHover = isDisabled ? undefined : function () { + return _this3.onOptionHover(option); + }; + var onSelect = isDisabled ? undefined : function () { + return _this3.selectOption(option); + }; + var optionId = "".concat(_this3.getElementId('option'), "-").concat(id); + return { + innerProps: { + id: optionId, + onClick: onSelect, + onMouseMove: onHover, + onMouseOver: onHover, + tabIndex: -1 + }, + data: option, + isDisabled: isDisabled, + isSelected: isSelected, + key: optionId, + label: label, + type: 'option', + value: value + }; + }; + + return options.reduce(function (acc, item, itemIndex) { + if (item.options) { + // TODO needs a tidier implementation + if (!_this3.hasGroups) _this3.hasGroups = true; + var items = item.options; + var children = items.map(function (child, i) { + var option = toOption(child, "".concat(itemIndex, "-").concat(i)); + if (option) acc.focusable.push(child); + return option; + }).filter(Boolean); + + if (children.length) { + var groupId = "".concat(_this3.getElementId('group'), "-").concat(itemIndex); + acc.render.push({ + type: 'group', + key: groupId, + data: item, + options: children + }); + } + } else { + var option = toOption(item, "".concat(itemIndex)); + + if (option) { + acc.render.push(option); + acc.focusable.push(item); + } + } + + return acc; + }, { + render: [], + focusable: [] + }); + } // ============================== + // Renderers + // ============================== + + }, { + key: "constructAriaLiveMessage", + value: function constructAriaLiveMessage() { + var _this$state7 = this.state, + ariaLiveContext = _this$state7.ariaLiveContext, + selectValue = _this$state7.selectValue, + focusedValue = _this$state7.focusedValue, + focusedOption = _this$state7.focusedOption; + var _this$props13 = this.props, + options = _this$props13.options, + menuIsOpen = _this$props13.menuIsOpen, + inputValue = _this$props13.inputValue, + screenReaderStatus = _this$props13.screenReaderStatus; // An aria live message representing the currently focused value in the select. + + var focusedValueMsg = focusedValue ? (0, accessibility.valueFocusAriaMessage)({ + focusedValue: focusedValue, + getOptionLabel: this.getOptionLabel, + selectValue: selectValue + }) : ''; // An aria live message representing the currently focused option in the select. + + var focusedOptionMsg = focusedOption && menuIsOpen ? (0, accessibility.optionFocusAriaMessage)({ + focusedOption: focusedOption, + getOptionLabel: this.getOptionLabel, + options: options + }) : ''; // An aria live message representing the set of focusable results and current searchterm/inputvalue. + + var resultsMsg = (0, accessibility.resultsAriaMessage)({ + inputValue: inputValue, + screenReaderMessage: screenReaderStatus({ + count: this.countOptions() + }) + }); + return "".concat(focusedValueMsg, " ").concat(focusedOptionMsg, " ").concat(resultsMsg, " ").concat(ariaLiveContext); + } + }, { + key: "renderInput", + value: function renderInput() { + var _this$props14 = this.props, + isDisabled = _this$props14.isDisabled, + isSearchable = _this$props14.isSearchable, + inputId = _this$props14.inputId, + inputValue = _this$props14.inputValue, + tabIndex = _this$props14.tabIndex; + var Input = this.components.Input; + var inputIsHidden = this.state.inputIsHidden; + var id = inputId || this.getElementId('input'); + + if (!isSearchable) { + // use a dummy input to maintain focus/blur functionality + return _react.default.createElement(internal.DummyInput, { + id: id, + innerRef: this.getInputRef, + onBlur: this.onInputBlur, + onChange: utils.noop, + onFocus: this.onInputFocus, + readOnly: true, + disabled: isDisabled, + tabIndex: tabIndex, + value: "" + }); + } // aria attributes makes the JSX "noisy", separated for clarity + + + var ariaAttributes = { + 'aria-autocomplete': 'list', + 'aria-label': this.props['aria-label'], + 'aria-labelledby': this.props['aria-labelledby'] + }; + var _this$commonProps = this.commonProps, + cx = _this$commonProps.cx, + theme = _this$commonProps.theme, + selectProps = _this$commonProps.selectProps; + return _react.default.createElement(Input, _extends({ + autoCapitalize: "none", + autoComplete: "off", + autoCorrect: "off", + cx: cx, + getStyles: this.getStyles, + id: id, + innerRef: this.getInputRef, + isDisabled: isDisabled, + isHidden: inputIsHidden, + onBlur: this.onInputBlur, + onChange: this.handleInputChange, + onFocus: this.onInputFocus, + selectProps: selectProps, + spellCheck: "false", + tabIndex: tabIndex, + theme: theme, + type: "text", + value: inputValue + }, ariaAttributes)); + } + }, { + key: "renderPlaceholderOrValue", + value: function renderPlaceholderOrValue() { + var _this4 = this; + + var _this$components = this.components, + MultiValue = _this$components.MultiValue, + MultiValueContainer = _this$components.MultiValueContainer, + MultiValueLabel = _this$components.MultiValueLabel, + MultiValueRemove = _this$components.MultiValueRemove, + SingleValue = _this$components.SingleValue, + Placeholder = _this$components.Placeholder; + var commonProps = this.commonProps; + var _this$props15 = this.props, + controlShouldRenderValue = _this$props15.controlShouldRenderValue, + isDisabled = _this$props15.isDisabled, + isMulti = _this$props15.isMulti, + inputValue = _this$props15.inputValue, + placeholder = _this$props15.placeholder; + var _this$state8 = this.state, + selectValue = _this$state8.selectValue, + focusedValue = _this$state8.focusedValue, + isFocused = _this$state8.isFocused; + + if (!this.hasValue() || !controlShouldRenderValue) { + return inputValue ? null : _react.default.createElement(Placeholder, _extends({}, commonProps, { + key: "placeholder", + isDisabled: isDisabled, + isFocused: isFocused + }), placeholder); + } + + if (isMulti) { + var selectValues = selectValue.map(function (opt) { + var isFocused = opt === focusedValue; + return _react.default.createElement(MultiValue, _extends({}, commonProps, { + components: { + Container: MultiValueContainer, + Label: MultiValueLabel, + Remove: MultiValueRemove + }, + isFocused: isFocused, + isDisabled: isDisabled, + key: _this4.getOptionValue(opt), + removeProps: { + onClick: function onClick() { + return _this4.removeValue(opt); + }, + onTouchEnd: function onTouchEnd() { + return _this4.removeValue(opt); + }, + onMouseDown: function onMouseDown(e) { + e.preventDefault(); + e.stopPropagation(); + } + }, + data: opt + }), _this4.formatOptionLabel(opt, 'value')); + }); + return selectValues; + } + + if (inputValue) { + return null; + } + + var singleValue = selectValue[0]; + return _react.default.createElement(SingleValue, _extends({}, commonProps, { + data: singleValue, + isDisabled: isDisabled + }), this.formatOptionLabel(singleValue, 'value')); + } + }, { + key: "renderClearIndicator", + value: function renderClearIndicator() { + var ClearIndicator = this.components.ClearIndicator; + var commonProps = this.commonProps; + var _this$props16 = this.props, + isDisabled = _this$props16.isDisabled, + isLoading = _this$props16.isLoading; + var isFocused = this.state.isFocused; + + if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) { + return null; + } + + var innerProps = { + onMouseDown: this.onClearIndicatorMouseDown, + onTouchEnd: this.onClearIndicatorTouchEnd, + 'aria-hidden': 'true' + }; + return _react.default.createElement(ClearIndicator, _extends({}, commonProps, { + innerProps: innerProps, + isFocused: isFocused + })); + } + }, { + key: "renderLoadingIndicator", + value: function renderLoadingIndicator() { + var LoadingIndicator = this.components.LoadingIndicator; + var commonProps = this.commonProps; + var _this$props17 = this.props, + isDisabled = _this$props17.isDisabled, + isLoading = _this$props17.isLoading; + var isFocused = this.state.isFocused; + if (!LoadingIndicator || !isLoading) return null; + var innerProps = { + 'aria-hidden': 'true' + }; + return _react.default.createElement(LoadingIndicator, _extends({}, commonProps, { + innerProps: innerProps, + isDisabled: isDisabled, + isFocused: isFocused + })); + } + }, { + key: "renderIndicatorSeparator", + value: function renderIndicatorSeparator() { + var _this$components2 = this.components, + DropdownIndicator = _this$components2.DropdownIndicator, + IndicatorSeparator = _this$components2.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator + + if (!DropdownIndicator || !IndicatorSeparator) return null; + var commonProps = this.commonProps; + var isDisabled = this.props.isDisabled; + var isFocused = this.state.isFocused; + return _react.default.createElement(IndicatorSeparator, _extends({}, commonProps, { + isDisabled: isDisabled, + isFocused: isFocused + })); + } + }, { + key: "renderDropdownIndicator", + value: function renderDropdownIndicator() { + var DropdownIndicator = this.components.DropdownIndicator; + if (!DropdownIndicator) return null; + var commonProps = this.commonProps; + var isDisabled = this.props.isDisabled; + var isFocused = this.state.isFocused; + var innerProps = { + onMouseDown: this.onDropdownIndicatorMouseDown, + onTouchEnd: this.onDropdownIndicatorTouchEnd, + 'aria-hidden': 'true' + }; + return _react.default.createElement(DropdownIndicator, _extends({}, commonProps, { + innerProps: innerProps, + isDisabled: isDisabled, + isFocused: isFocused + })); + } + }, { + key: "renderMenu", + value: function renderMenu() { + var _this5 = this; + + var _this$components3 = this.components, + Group = _this$components3.Group, + GroupHeading = _this$components3.GroupHeading, + Menu = _this$components3.Menu, + MenuList = _this$components3.MenuList, + MenuPortal = _this$components3.MenuPortal, + LoadingMessage = _this$components3.LoadingMessage, + NoOptionsMessage = _this$components3.NoOptionsMessage, + Option = _this$components3.Option; + var commonProps = this.commonProps; + var _this$state9 = this.state, + focusedOption = _this$state9.focusedOption, + menuOptions = _this$state9.menuOptions; + var _this$props18 = this.props, + captureMenuScroll = _this$props18.captureMenuScroll, + inputValue = _this$props18.inputValue, + isLoading = _this$props18.isLoading, + loadingMessage = _this$props18.loadingMessage, + minMenuHeight = _this$props18.minMenuHeight, + maxMenuHeight = _this$props18.maxMenuHeight, + menuIsOpen = _this$props18.menuIsOpen, + menuPlacement = _this$props18.menuPlacement, + menuPosition = _this$props18.menuPosition, + menuPortalTarget = _this$props18.menuPortalTarget, + menuShouldBlockScroll = _this$props18.menuShouldBlockScroll, + menuShouldScrollIntoView = _this$props18.menuShouldScrollIntoView, + noOptionsMessage = _this$props18.noOptionsMessage, + onMenuScrollToTop = _this$props18.onMenuScrollToTop, + onMenuScrollToBottom = _this$props18.onMenuScrollToBottom; + if (!menuIsOpen) return null; // TODO: Internal Option Type here + + var render = function render(props) { + // for performance, the menu options in state aren't changed when the + // focused option changes so we calculate additional props based on that + var isFocused = focusedOption === props.data; + props.innerRef = isFocused ? _this5.getFocusedOptionRef : undefined; + return _react.default.createElement(Option, _extends({}, commonProps, props, { + isFocused: isFocused + }), _this5.formatOptionLabel(props.data, 'menu')); + }; + + var menuUI; + + if (this.hasOptions()) { + menuUI = menuOptions.render.map(function (item) { + if (item.type === 'group') { + var type = item.type, + group = _objectWithoutProperties(item, ["type"]); + + var headingId = "".concat(item.key, "-heading"); + return _react.default.createElement(Group, _extends({}, commonProps, group, { + Heading: GroupHeading, + headingProps: { + id: headingId + }, + label: _this5.formatGroupLabel(item.data) + }), item.options.map(function (option) { + return render(option); + })); + } else if (item.type === 'option') { + return render(item); + } + }); + } else if (isLoading) { + var message = loadingMessage({ + inputValue: inputValue + }); + if (message === null) return null; + menuUI = _react.default.createElement(LoadingMessage, commonProps, message); + } else { + var _message = noOptionsMessage({ + inputValue: inputValue + }); + + if (_message === null) return null; + menuUI = _react.default.createElement(NoOptionsMessage, commonProps, _message); + } + + var menuPlacementProps = { + minMenuHeight: minMenuHeight, + maxMenuHeight: maxMenuHeight, + menuPlacement: menuPlacement, + menuPosition: menuPosition, + menuShouldScrollIntoView: menuShouldScrollIntoView + }; + + var menuElement = _react.default.createElement(Menu_1.MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref6) { + var ref = _ref6.ref, + _ref6$placerProps = _ref6.placerProps, + placement = _ref6$placerProps.placement, + maxHeight = _ref6$placerProps.maxHeight; + return _react.default.createElement(Menu, _extends({}, commonProps, menuPlacementProps, { + innerRef: ref, + innerProps: { + onMouseDown: _this5.onMenuMouseDown, + onMouseMove: _this5.onMenuMouseMove + }, + isLoading: isLoading, + placement: placement + }), _react.default.createElement(internal.ScrollCaptor, { + isEnabled: captureMenuScroll, + onTopArrive: onMenuScrollToTop, + onBottomArrive: onMenuScrollToBottom + }, _react.default.createElement(internal.ScrollBlock, { + isEnabled: menuShouldBlockScroll + }, _react.default.createElement(MenuList, _extends({}, commonProps, { + innerRef: _this5.getMenuListRef, + isLoading: isLoading, + maxHeight: maxHeight + }), menuUI)))); + }); // positioning behaviour is almost identical for portalled and fixed, + // so we use the same component. the actual portalling logic is forked + // within the component based on `menuPosition` + + + return menuPortalTarget || menuPosition === 'fixed' ? _react.default.createElement(MenuPortal, _extends({}, commonProps, { + appendTo: menuPortalTarget, + controlElement: this.controlRef, + menuPlacement: menuPlacement, + menuPosition: menuPosition + }), menuElement) : menuElement; + } + }, { + key: "renderFormField", + value: function renderFormField() { + var _this6 = this; + + var _this$props19 = this.props, + delimiter = _this$props19.delimiter, + isDisabled = _this$props19.isDisabled, + isMulti = _this$props19.isMulti, + name = _this$props19.name; + var selectValue = this.state.selectValue; + if (!name || isDisabled) return; + + if (isMulti) { + if (delimiter) { + var value = selectValue.map(function (opt) { + return _this6.getOptionValue(opt); + }).join(delimiter); + return _react.default.createElement("input", { + name: name, + type: "hidden", + value: value + }); + } else { + var input = selectValue.length > 0 ? selectValue.map(function (opt, i) { + return _react.default.createElement("input", { + key: "i-".concat(i), + name: name, + type: "hidden", + value: _this6.getOptionValue(opt) + }); + }) : _react.default.createElement("input", { + name: name, + type: "hidden" + }); + return _react.default.createElement("div", null, input); + } + } else { + var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : ''; + + return _react.default.createElement("input", { + name: name, + type: "hidden", + value: _value + }); + } + } + }, { + key: "renderLiveRegion", + value: function renderLiveRegion() { + if (!this.state.isFocused) return null; + return _react.default.createElement(internal.A11yText, { + "aria-live": "assertive" + }, _react.default.createElement("p", { + id: "aria-selection-event" + }, "\xA0", this.state.ariaLiveSelection), _react.default.createElement("p", { + id: "aria-context" + }, "\xA0", this.constructAriaLiveMessage())); + } + }, { + key: "render", + value: function render() { + var _this$components4 = this.components, + Control = _this$components4.Control, + IndicatorsContainer = _this$components4.IndicatorsContainer, + SelectContainer = _this$components4.SelectContainer, + ValueContainer = _this$components4.ValueContainer; + var _this$props20 = this.props, + className = _this$props20.className, + id = _this$props20.id, + isDisabled = _this$props20.isDisabled, + menuIsOpen = _this$props20.menuIsOpen; + var isFocused = this.state.isFocused; + var commonProps = this.commonProps = this.getCommonProps(); + return _react.default.createElement(SelectContainer, _extends({}, commonProps, { + className: className, + innerProps: { + id: id, + onKeyDown: this.onKeyDown + }, + isDisabled: isDisabled, + isFocused: isFocused + }), this.renderLiveRegion(), _react.default.createElement(Control, _extends({}, commonProps, { + innerRef: this.getControlRef, + innerProps: { + onMouseDown: this.onControlMouseDown, + onTouchEnd: this.onControlTouchEnd + }, + isDisabled: isDisabled, + isFocused: isFocused, + menuIsOpen: menuIsOpen + }), _react.default.createElement(ValueContainer, _extends({}, commonProps, { + isDisabled: isDisabled + }), this.renderPlaceholderOrValue(), this.renderInput()), _react.default.createElement(IndicatorsContainer, _extends({}, commonProps, { + isDisabled: isDisabled + }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField()); + } + }]); + + return Select; + }(_react.Component); + + exports.default = Select; + + _defineProperty(Select, "defaultProps", defaultProps); + }); + + unwrapExports(Select_1); + var Select_2 = Select_1.defaultProps; + + var stateManager = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.defaultProps = void 0; + + var _react = _interopRequireWildcard(React__default); + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + var defaultProps = { + defaultInputValue: '', + defaultMenuIsOpen: false, + defaultValue: null + }; + exports.defaultProps = defaultProps; + + var manageState = function manageState(SelectComponent) { + var _class, _temp; + + return _temp = _class = + /*#__PURE__*/ + function (_Component) { + _inherits(StateManager, _Component); + + function StateManager() { + var _getPrototypeOf2; + + var _this; + + _classCallCheck(this, StateManager); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(StateManager)).call.apply(_getPrototypeOf2, [this].concat(args))); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { + inputValue: _this.props.inputValue !== undefined ? _this.props.inputValue : _this.props.defaultInputValue, + menuIsOpen: _this.props.menuIsOpen !== undefined ? _this.props.menuIsOpen : _this.props.defaultMenuIsOpen, + value: _this.props.value !== undefined ? _this.props.value : _this.props.defaultValue + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (value, actionMeta) { + _this.callProp('onChange', value, actionMeta); + + _this.setState({ + value: value + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputChange", function (value, actionMeta) { + // TODO: for backwards compatibility, we allow the prop to return a new + // value, but now inputValue is a controllable prop we probably shouldn't + var newValue = _this.callProp('onInputChange', value, actionMeta); + + _this.setState({ + inputValue: newValue !== undefined ? newValue : value + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuOpen", function () { + _this.callProp('onMenuOpen'); + + _this.setState({ + menuIsOpen: true + }); + }); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuClose", function () { + _this.callProp('onMenuClose'); + + _this.setState({ + menuIsOpen: false + }); + }); + + return _this; + } + + _createClass(StateManager, [{ + key: "focus", + value: function focus() { + this.select.focus(); + } + }, { + key: "blur", + value: function blur() { + this.select.blur(); + } // FIXME: untyped flow code, return any + + }, { + key: "getProp", + value: function getProp(key) { + return this.props[key] !== undefined ? this.props[key] : this.state[key]; + } // FIXME: untyped flow code, return any + + }, { + key: "callProp", + value: function callProp(name) { + if (typeof this.props[name] === 'function') { + var _this$props; + + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + + return (_this$props = this.props)[name].apply(_this$props, args); + } + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props2 = this.props, + defaultInputValue = _this$props2.defaultInputValue, + defaultMenuIsOpen = _this$props2.defaultMenuIsOpen, + defaultValue = _this$props2.defaultValue, + props = _objectWithoutProperties(_this$props2, ["defaultInputValue", "defaultMenuIsOpen", "defaultValue"]); + + return _react.default.createElement(SelectComponent, _extends({}, props, { + ref: function ref(_ref) { + _this2.select = _ref; + }, + inputValue: this.getProp('inputValue'), + menuIsOpen: this.getProp('menuIsOpen'), + onChange: this.onChange, + onInputChange: this.onInputChange, + onMenuClose: this.onMenuClose, + onMenuOpen: this.onMenuOpen, + value: this.getProp('value') + })); + } + }]); + + return StateManager; + }(_react.Component), _defineProperty(_class, "defaultProps", defaultProps), _temp; + }; + + var _default = manageState; + exports.default = _default; + }); + + unwrapExports(stateManager); + var stateManager_1 = stateManager.defaultProps; + + var Async$1 = createCommonjsModule(function (module, exports) { + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = exports.makeAsyncSelect = exports.defaultProps = void 0; + + var _react = _interopRequireWildcard(React__default); + + var _Select = _interopRequireDefault(Select_1); + + + + var _stateManager = _interopRequireDefault(stateManager); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + + function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + + function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + + function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + var defaultProps = { + cacheOptions: false, + defaultOptions: false, + filterOption: null + }; + exports.defaultProps = defaultProps; + + var makeAsyncSelect = function makeAsyncSelect(SelectComponent) { + var _class, _temp; + + return _temp = _class = + /*#__PURE__*/ + function (_Component) { + _inherits(Async, _Component); + + function Async(props) { + var _this; + + _classCallCheck(this, Async); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(Async).call(this)); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "lastRequest", void 0); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "mounted", false); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "optionsCache", {}); + + _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleInputChange", function (newValue, actionMeta) { + var _this$props = _this.props, + cacheOptions = _this$props.cacheOptions, + onInputChange = _this$props.onInputChange; // TODO + + var inputValue = (0, utils.handleInputChange)(newValue, actionMeta, onInputChange); + + if (!inputValue) { + delete _this.lastRequest; + + _this.setState({ + inputValue: '', + loadedInputValue: '', + loadedOptions: [], + isLoading: false, + passEmptyOptions: false + }); + + return; + } + + if (cacheOptions && _this.optionsCache[inputValue]) { + _this.setState({ + inputValue: inputValue, + loadedInputValue: inputValue, + loadedOptions: _this.optionsCache[inputValue], + isLoading: false, + passEmptyOptions: false + }); + } else { + var request = _this.lastRequest = {}; + + _this.setState({ + inputValue: inputValue, + isLoading: true, + passEmptyOptions: !_this.state.loadedInputValue + }, function () { + _this.loadOptions(inputValue, function (options) { + if (!_this.mounted) return; + + if (options) { + _this.optionsCache[inputValue] = options; + } + + if (request !== _this.lastRequest) return; + delete _this.lastRequest; + + _this.setState({ + isLoading: false, + loadedInputValue: inputValue, + loadedOptions: options || [], + passEmptyOptions: false + }); + }); + }); + } + + return inputValue; + }); + + _this.state = { + defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined, + inputValue: typeof props.inputValue !== 'undefined' ? props.inputValue : '', + isLoading: props.defaultOptions === true ? true : false, + loadedOptions: [], + passEmptyOptions: false + }; + return _this; + } + + _createClass(Async, [{ + key: "componentDidMount", + value: function componentDidMount() { + var _this2 = this; + + this.mounted = true; + var defaultOptions = this.props.defaultOptions; + var inputValue = this.state.inputValue; + + if (defaultOptions === true) { + this.loadOptions(inputValue, function (options) { + if (!_this2.mounted) return; + var isLoading = !!_this2.lastRequest; + + _this2.setState({ + defaultOptions: options || [], + isLoading: isLoading + }); + }); + } + } + }, { + key: "componentWillReceiveProps", + value: function componentWillReceiveProps(nextProps) { + // if the cacheOptions prop changes, clear the cache + if (nextProps.cacheOptions !== this.props.cacheOptions) { + this.optionsCache = {}; + } + + if (nextProps.defaultOptions !== this.props.defaultOptions) { + this.setState({ + defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined + }); + } + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.mounted = false; + } + }, { + key: "focus", + value: function focus() { + this.select.focus(); + } + }, { + key: "blur", + value: function blur() { + this.select.blur(); + } + }, { + key: "loadOptions", + value: function loadOptions(inputValue, callback) { + var loadOptions = this.props.loadOptions; + if (!loadOptions) return callback(); + var loader = loadOptions(inputValue, callback); + + if (loader && typeof loader.then === 'function') { + loader.then(callback, function () { + return callback(); + }); + } + } + }, { + key: "render", + value: function render() { + var _this3 = this; + + var _this$props2 = this.props, + loadOptions = _this$props2.loadOptions, + props = _objectWithoutProperties(_this$props2, ["loadOptions"]); + + var _this$state = this.state, + defaultOptions = _this$state.defaultOptions, + inputValue = _this$state.inputValue, + isLoading = _this$state.isLoading, + loadedInputValue = _this$state.loadedInputValue, + loadedOptions = _this$state.loadedOptions, + passEmptyOptions = _this$state.passEmptyOptions; + var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || []; + return _react.default.createElement(SelectComponent, _extends({}, props, { + ref: function ref(_ref) { + _this3.select = _ref; + }, + options: options, + isLoading: isLoading, + onInputChange: this.handleInputChange + })); + } + }]); + + return Async; + }(_react.Component), _defineProperty(_class, "defaultProps", defaultProps), _temp; + }; + + exports.makeAsyncSelect = makeAsyncSelect; + var SelectState = (0, _stateManager.default)(_Select.default); + + var _default = makeAsyncSelect(SelectState); + + exports.default = _default; + }); + + var Select$1 = unwrapExports(Async$1); + var Async_1 = Async$1.makeAsyncSelect; + var Async_2 = Async$1.defaultProps; + + var Edit$4 = + /*#__PURE__*/ + function (_React$Component) { + inherits(Edit, _React$Component); + + function Edit(props) { + var _this; + + classCallCheck(this, Edit); + + _this = possibleConstructorReturn(this, getPrototypeOf(Edit).call(this, props)); + _this.api = new ApiClient(); + return _this; + } + + createClass(Edit, [{ + key: "handleChange", + value: function handleChange(selected) { + this.props.onChange(this.props.property.name, selected.value); + } + }, { + key: "loadOptions", + value: function () { + var _loadOptions = asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee(inputValue) { + var property, records; + return regenerator.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + property = this.props.property; + _context.next = 3; + return this.api.searchRecords({ + resourceId: property.reference, + query: inputValue + }); + + case 3: + records = _context.sent; + return _context.abrupt("return", records.map(function (r) { + return { + value: r.id, + label: r.title + }; + })); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function loadOptions(_x) { + return _loadOptions.apply(this, arguments); + } + + return loadOptions; + }() + }, { + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + resource = _this$props.resource, + record = _this$props.record; + var value = record.params && record.params[property.name] || ''; + var error = record.errors && record.errors[property.name]; + return React__default.createElement("div", { + className: "field" + }, React__default.createElement("label", { + htmlFor: property.name, + className: "label" + }, property.label), React__default.createElement("div", { + className: "control" + }, React__default.createElement(Select$1, { + cacheOptions: true, + defaultOptions: true, + loadOptions: this.loadOptions.bind(this), + onChange: this.handleChange.bind(this) + })), error && React__default.createElement("div", { + className: "help is-danger" + }, error.message)); + } + }]); + + return Edit; + }(React__default.Component); + + var Show$4 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Show, _React$PureComponent); + + function Show() { + classCallCheck(this, Show); + + return possibleConstructorReturn(this, getPrototypeOf(Show).apply(this, arguments)); + } + + createClass(Show, [{ + key: "valueElement", + value: function valueElement() { + var h = new viewHelpers(); + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record, + resource = _this$props.resource; + var refId = record.params[property.name]; + var populated = record.populated[property.name]; + var value = populated && populated.title || refId; + + if (resource.recordActions.find(function (a) { + return a.name === 'show'; + }) && populated) { + var href = h.recordActionUrl({ + resourceId: property.reference, + recordId: refId, + actionName: 'show' + }); + return React__default.createElement(reactRouterDom.Link, { + to: href + }, value); + } + + return React__default.createElement("span", null, value); + } + }, { + key: "render", + value: function render() { + var property = this.props.property; + var label = property.label; + return React__default.createElement("div", { + className: "property" + }, React__default.createElement("div", { + className: "card-content" + }, React__default.createElement("div", { + className: "text-small" + }, label), React__default.createElement("div", null, this.valueElement()))); + } + }]); + + return Show; + }(React__default.PureComponent); + + var List$4 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(List, _React$PureComponent); + + function List() { + classCallCheck(this, List); + + return possibleConstructorReturn(this, getPrototypeOf(List).apply(this, arguments)); + } + + createClass(List, [{ + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + record = _this$props.record, + resource = _this$props.resource; + var refId = record.params[property.name]; + var populated = record.populated[property.name]; + var value = populated && populated.title || refId; + + if (resource.recordActions.find(function (a) { + return a.name === 'show'; + }) && populated) { + var h = new viewHelpers(); + var href = h.recordActionUrl({ + resourceId: property.reference, + recordId: refId, + actionName: 'show' + }); + return React__default.createElement(reactRouterDom.Link, { + to: href + }, value); + } + + return React__default.createElement("span", null, value); + } + }]); + + return List; + }(React__default.PureComponent); + + var Filter$3 = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Filter, _React$PureComponent); + + function Filter() { + classCallCheck(this, Filter); + + return possibleConstructorReturn(this, getPrototypeOf(Filter).apply(this, arguments)); + } + + createClass(Filter, [{ + key: "handleChange", + value: function handleChange(selected) { + this.props.onChange(this.props.property.name, selected ? selected.value : ''); + } + }, { + key: "loadOptions", + value: function () { + var _loadOptions = asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee(inputValue) { + var property, records; + return regenerator.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + this.api = new ApiClient(); + property = this.props.property; + _context.next = 4; + return this.api.searchRecords({ + resourceId: property.reference, + query: inputValue + }); + + case 4: + records = _context.sent; + return _context.abrupt("return", records.map(function (r) { + return { + value: r.id, + label: r.title + }; + })); + + case 6: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function loadOptions(_x) { + return _loadOptions.apply(this, arguments); + } + + return loadOptions; + }() + }, { + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + filter = _this$props.filter; + var filterKey = "filter-".concat(property.name); + var value = { + value: filter[property.name] || '' + }; + return React__default.createElement("div", { + className: "filter" + }, React__default.createElement("label", { + htmlFor: filterKey, + className: "label" + }, property.label, " contains:"), React__default.createElement("div", { + className: "control" + }, React__default.createElement(Select$1, { + isClearable: true, + cacheOptions: true, + loadOptions: this.loadOptions.bind(this), + onChange: this.handleChange.bind(this), + defaultOptions: true + }))); + } + }]); + + return Filter; + }(React__default.PureComponent); + + var reference = { + edit: Edit$4, + show: Show$4, + list: List$4, + filter: Filter$3 + }; + + var types = { + boolean: boolean, + datetime: datetime, + reference: reference, + date: datetime, + richtext: richtext + }; + + var PropertyType = + /*#__PURE__*/ + function (_React$Component) { + inherits(PropertyType, _React$Component); + + function PropertyType(props) { + var _this; + + classCallCheck(this, PropertyType); + + _this = possibleConstructorReturn(this, getPrototypeOf(PropertyType).call(this, props)); + _this.state = { + isClient: false + }; + return _this; + } + + createClass(PropertyType, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.setState({ + isClient: true + }); + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + property = _this$props.property, + resource = _this$props.resource, + record = _this$props.record, + filter = _this$props.filter, + where = _this$props.where, + paths = _this$props.paths; + var PropertyRenderer = types[property.type] && types[property.type][where] || defaultType[where]; + + if (property.components && property.components[where] && this.state.isClient) { + PropertyRenderer = AdminBro.Components[property.components[where]]; + } + + return React__default.createElement(PropertyRenderer, { + property: property, + resource: resource, + paths: paths, + record: record, + filter: filter, + onChange: this.props.onChange + }); + } + }]); + + return PropertyType; + }(React__default.Component); + + var RecordInList = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(RecordInList, _React$PureComponent); + + function RecordInList() { + classCallCheck(this, RecordInList); + + return possibleConstructorReturn(this, getPrototypeOf(RecordInList).apply(this, arguments)); + } + + createClass(RecordInList, [{ + key: "renderActionBtn", + value: function renderActionBtn(action, record) { + return React__default.createElement(ActionBtn$1, { + action: action, + key: action.name, + resourceId: this.props.resource.id, + recordId: record.id, + actionPerformed: this.props.actionPerformed, + className: "is-white" + }); + } + }, { + key: "render", + value: function render() { + var _this = this; + + var resource = this.props.resource; + var record = this.props.record; + var recordActions = resource.recordActions; + return React__default.createElement("tr", null, resource.listProperties.map(function (property) { + return React__default.createElement("td", { + key: property.name + }, React__default.createElement(PropertyType, { + key: property.name, + where: "list", + property: property, + resource: resource, + record: record + })); + }), React__default.createElement("td", { + key: 'options' + }, React__default.createElement("div", { + className: "dropdown is-right is-hoverable" + }, React__default.createElement("div", { + className: "dropdown-trigger" + }, React__default.createElement("div", { + className: "dots" + }, React__default.createElement("span", { + className: "icon" + }, React__default.createElement("i", { + className: "icomoon-options" + })))), React__default.createElement("div", { + className: "dropdown-menu" + }, React__default.createElement("div", { + className: "dropdown-content" + }, recordActions.map(function (action) { + return _this.renderActionBtn(action, record); + })))))); + } + }]); + + return RecordInList; + }(React__default.PureComponent); + + var RecordsTable = + /*#__PURE__*/ + function (_React$Component) { + inherits(RecordsTable, _React$Component); + + function RecordsTable() { + classCallCheck(this, RecordsTable); + + return possibleConstructorReturn(this, getPrototypeOf(RecordsTable).apply(this, arguments)); + } + + createClass(RecordsTable, [{ + key: "renderPropertyHeader", + value: function renderPropertyHeader(property) { + var isMain = property.name === this.props.resource.titleProperty.name; + var isSortedBy = property.name === this.props.sortBy; + var direction = 'asc'; + + if (isSortedBy && this.props.direction === 'asc') { + direction = 'desc'; + } + + var search = new URLSearchParams("sortBy=".concat(property.name, "&direction=").concat(direction)); + var sortedByClass = "icomoon-dropdown-".concat(this.props.direction === 'asc' ? 'open' : 'close'); + var indicator = React__default.createElement("span", { + className: "sorting-icons" + }, React__default.createElement("i", { + className: sortedByClass + })); + var link = React__default.createElement(reactRouterDom.Link, { + to: { + search: search.toString() + }, + className: "is-sortable text-small" + }, property.label, isSortedBy && indicator); + return React__default.createElement("th", { + key: property.name, + className: isMain ? 'main' : '' + }, React__default.createElement("div", { + className: "text-small" + }, property.isSortable ? link : property.label)); + } + }, { + key: "render", + value: function render() { + var _this = this; + + var resource = this.props.resource; + var paths = this.props.paths; + var records = this.props.records; + return React__default.createElement("table", { + className: "table is-fullwidth" + }, React__default.createElement("thead", null, React__default.createElement("tr", { + key: "header" + }, resource.listProperties.map(function (property) { + return _this.renderPropertyHeader(property); + }), React__default.createElement("th", { + kay: "actions" + }))), React__default.createElement("tbody", null, records.map(function (record) { + return React__default.createElement(RecordInList, { + record: record, + resource: resource, + paths: paths, + key: record.id, + actionPerformed: _this.props.actionPerformed + }); + }))); + } + }]); + + return RecordsTable; + }(React__default.Component); + + function paginate(totalItems, currentPage, pageSize, maxPages) { + if (currentPage === void 0) { currentPage = 1; } + if (pageSize === void 0) { pageSize = 10; } + if (maxPages === void 0) { maxPages = 10; } + // calculate total pages + var totalPages = Math.ceil(totalItems / pageSize); + // ensure current page isn't out of range + if (currentPage < 1) { + currentPage = 1; + } + else if (currentPage > totalPages) { + currentPage = totalPages; + } + var startPage, endPage; + if (totalPages <= maxPages) { + // total pages less than max so show all pages + startPage = 1; + endPage = totalPages; + } + else { + // total pages more than max so calculate start and end pages + var maxPagesBeforeCurrentPage = Math.floor(maxPages / 2); + var maxPagesAfterCurrentPage = Math.ceil(maxPages / 2) - 1; + if (currentPage <= maxPagesBeforeCurrentPage) { + // current page near the start + startPage = 1; + endPage = maxPages; + } + else if (currentPage + maxPagesAfterCurrentPage >= totalPages) { + // current page near the end + startPage = totalPages - maxPages + 1; + endPage = totalPages; + } + else { + // current page somewhere in the middle + startPage = currentPage - maxPagesBeforeCurrentPage; + endPage = currentPage + maxPagesAfterCurrentPage; + } + } + // calculate start and end item indexes + var startIndex = (currentPage - 1) * pageSize; + var endIndex = Math.min(startIndex + pageSize - 1, totalItems - 1); + // create an array of pages to ng-repeat in the pager control + var pages = Array.from(Array((endPage + 1) - startPage).keys()).map(function (i) { return startPage + i; }); + // return object with all pager properties required by the view + return { + totalItems: totalItems, + currentPage: currentPage, + pageSize: pageSize, + totalPages: totalPages, + startPage: startPage, + endPage: endPage, + startIndex: startIndex, + endIndex: endIndex, + pages: pages + }; + } + var jwPaginate = paginate; + + var Paginate = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Paginate, _React$PureComponent); + + function Paginate() { + classCallCheck(this, Paginate); + + return possibleConstructorReturn(this, getPrototypeOf(Paginate).apply(this, arguments)); + } + + createClass(Paginate, [{ + key: "linkToPage", + value: function linkToPage(page) { + var search = new URLSearchParams(this.props.location.search); + search.set('page', page); + return search.toString(); + } + }, { + key: "render", + value: function render() { + var _this = this; + + var paginate = jwPaginate(this.props.total, parseInt(this.props.page || 1), parseInt(this.props.perPage)); + var isFirstPage = paginate.currentPage == paginate.startPage; + var isLastPage = paginate.currentPage == paginate.endPage; + + if (paginate.totalPages === 1) { + return null; + } + + return React__default.createElement("div", { + className: "level-item pagination-content" + }, React__default.createElement("div", { + className: "pagination" + }, React__default.createElement(reactRouterDom.Link, { + to: { + search: this.linkToPage(parseInt(paginate.currentPage) - 1) + }, + className: "button is-white".concat(isFirstPage ? ' disabled' : '') + }, React__default.createElement("i", { + className: "icomoon-pagination-left" + })), paginate.pages.map(function (page) { + return React__default.createElement(reactRouterDom.Link, { + key: page, + to: { + search: _this.linkToPage(page) + }, + className: "pages button is-white".concat(page == paginate.currentPage ? ' active' : '') + }, page); + }), React__default.createElement(reactRouterDom.Link, { + to: { + search: this.linkToPage(parseInt(paginate.currentPage) + 1) + }, + className: "button is-white".concat(isLastPage ? ' disabled' : '') + }, React__default.createElement("i", { + className: "icomoon-pagination-right" + })))); + } + }]); + + return Paginate; + }(React__default.PureComponent); + + var Paginate$1 = reactRouterDom.withRouter(Paginate); + + var Filter$4 = + /*#__PURE__*/ + function (_React$Component) { + inherits(Filter, _React$Component); + + function Filter(props) { + var _this; + + classCallCheck(this, Filter); + + _this = possibleConstructorReturn(this, getPrototypeOf(Filter).call(this, props)); + _this.state = { + filter: _this.parseQuery() + }; + return _this; + } + + createClass(Filter, [{ + key: "parseQuery", + value: function parseQuery() { + var filter = {}; + var query = new URLSearchParams(this.props.location.search); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = query.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var entry = _step.value; + + if (entry[0].match('filters.')) { + filter[entry[0].replace('filters.', '')] = entry[1]; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return filter; + } + }, { + key: "handleSubmit", + value: function handleSubmit(event) { + var _this2 = this; + + event.preventDefault(); + var search = new URLSearchParams(window.location.search); + Object.keys(this.state.filter).forEach(function (key) { + if (_this2.state.filter[key] !== '') { + search.set("filters.".concat(key), _this2.state.filter[key]); + } else { + search.delete("filters.".concat(key)); + } + }); + this.props.history.push(this.props.history.location.pathname + '?' + search.toString()); + return false; + } + }, { + key: "resetFilter", + value: function resetFilter(event) { + event.preventDefault(); + var filteredSearch = new URLSearchParams(); + var search = new URLSearchParams(window.location.search); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = search.keys()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var key = _step2.value; + + if (!key.match('filters.')) { + filteredSearch.set(key, search.get(key)); + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var query = filteredSearch.toString() === '' ? '?' + filteredSearch.toString() : ''; + this.props.history.push(this.props.history.location.pathname + query); + this.setState({ + filter: {} + }); + } + }, { + key: "handleChange", + value: function handleChange(propertyName, value) { + var filter = objectSpread({}, this.state.filter, defineProperty({}, propertyName, value)); + + this.setState({ + filter: filter + }); + } + }, { + key: "render", + value: function render() { + var _this3 = this; + + var resource = this.props.resource; + var properties = resource.editProperties; + return React__default.createElement("div", { + className: "filters-bar-wrapper" + }, React__default.createElement("div", { + className: "filters-bar".concat(this.props.isVisible ? ' filters-show' : '') + }, React__default.createElement("a", { + className: "filters-close", + onClick: this.props.toggleFilter + }, React__default.createElement("span", { + className: "arrow-right" + }, React__default.createElement("i", { + className: "fas fa-arrow-right" + })), React__default.createElement("span", null, "Filter")), React__default.createElement("form", { + onSubmit: this.handleSubmit.bind(this) + }, properties.map(function (property) { + return React__default.createElement(PropertyType, { + key: property.name, + where: "filter", + onChange: _this3.handleChange.bind(_this3), + property: property, + filter: _this3.state.filter, + resource: resource + }); + }), React__default.createElement("button", { + className: "button is-primary apply-changes" + }, "Apply Changes"), React__default.createElement("a", { + href: "#", + className: "clear-button", + onClick: this.resetFilter.bind(this) + }, React__default.createElement("span", { + className: "clear" + }, "Clear filters"))))); + } + }]); + + return Filter; + }(React__default.Component); + + var Filter$5 = reactRouterDom.withRouter(Filter$4); + + var Dashboard = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Dashboard, _React$PureComponent); + + function Dashboard() { + classCallCheck(this, Dashboard); + + return possibleConstructorReturn(this, getPrototypeOf(Dashboard).apply(this, arguments)); + } + + createClass(Dashboard, [{ + key: "render", + value: function render() { + return React__default.createElement("div", { + className: "columns" + }, React__default.createElement("div", { + className: "column is-6 is-offset-3" + }, React__default.createElement("div", { + className: "default-dashboard has-text-centered" + }, React__default.createElement("svg", { + className: "welcome-img", + xmlns: "http://www.w3.org/2000/svg", + width: "163", + height: "184", + viewBox: "0 0 163 184" + }, React__default.createElement("g", { + fill: "none", + fillRule: "nonzero", + stroke: "#C9D1F6", + strokeWidth: "2" + }, React__default.createElement("path", { + strokeLinecap: "round", + d: "M81.5 164.676v13.396a4 4 0 0 1-6 3.464l-69.107-39.9a10 10 0 0 1-5-8.66V52.024a10 10 0 0 1 5-8.66L76.5 2.886a10 10 0 0 1 10 0l70.107 40.476a10 10 0 0 1 5 8.66v80.953a10 10 0 0 1-5 8.66l-61.566 35.546" + }), React__default.createElement("path", { + fill: "#FFF", + strokeLinejoin: "round", + d: "M101.994 61.522l1.835-3.67a2 2 0 0 1 3.578 0l1.834 3.67a19 19 0 0 1 2.006 8.497v74.076a1 1 0 0 1-1 1h-9.259a1 1 0 0 1-1-1V70.02a19 19 0 0 1 2.006-8.497zM53.759 61.522l1.834-3.67a2 2 0 0 1 3.578 0l1.835 3.67a19 19 0 0 1 2.006 8.497v74.076a1 1 0 0 1-1 1h-9.26a1 1 0 0 1-1-1V70.02a19 19 0 0 1 2.007-8.497z" + }), React__default.createElement("path", { + fill: "#F0F1F9", + strokeLinejoin: "round", + d: "M74.557 29.824l3.65-5.295a4 4 0 0 1 6.587 0l3.649 5.295a39.325 39.325 0 0 1 6.943 22.313v63.686H67.614V52.137c0-7.97 2.421-15.75 6.943-22.313z" + }), React__default.createElement("path", { + fill: "#F0F1F9", + d: "M88.575 139.355h24.008a1 1 0 0 0 .982-1.187l-.792-4.157a21.68 21.68 0 0 0-5.562-10.855l-3.298-3.48A44.737 44.737 0 0 1 93 99.83L89.64 86.492l-1.065 52.863zM74.425 139.355H50.417a1 1 0 0 1-.982-1.187l.792-4.157a21.68 21.68 0 0 1 5.562-10.855l3.298-3.48A44.737 44.737 0 0 0 70 99.83l3.361-13.338 1.065 52.863z" + }), React__default.createElement("path", { + fill: "#FFF", + strokeLinejoin: "round", + d: "M74.947 68.616l2.122-4.059a5 5 0 0 1 8.862 0l2.122 4.059a24 24 0 0 1 2.73 11.118v65.142H72.217V79.734a24 24 0 0 1 2.73-11.118z" + }), React__default.createElement("path", { + fill: "#FFF", + d: "M75.446 132.96a7.072 7.072 0 0 0-7.073 7.072v7.073h26.254v-7.073a7.072 7.072 0 0 0-7.073-7.072H75.446z" + }), React__default.createElement("path", { + fill: "#F0F1F9", + strokeLinecap: "round", + d: "M81.5 123.484v27.72" + }))), React__default.createElement("h1", null, "Welcome on board!"), React__default.createElement("p", null, "Thank you for choosing our platform, now you are one of us! Bear in mind that this is a Beta version and we are still working on it."), React__default.createElement("p", null, "Now check out the documentation page on github and modify your AdminBro."), React__default.createElement("div", null, React__default.createElement("a", { + className: "button is-primary", + href: "https://github.com/SoftwareBrothers/admin-bro" + }, React__default.createElement("span", { + className: "icon" + }, React__default.createElement("i", { + className: "fab fa-github" + })), React__default.createElement("span", { + className: "btn-text" + }, "Checkout the documentation")))))); + } + }]); + + return Dashboard; + }(React__default.PureComponent); + + var Dashboard$1 = + /*#__PURE__*/ + function (_React$Component) { + inherits(Dashboard$1, _React$Component); + + function Dashboard$1(props) { + var _this; + + classCallCheck(this, Dashboard$1); + + _this = possibleConstructorReturn(this, getPrototypeOf(Dashboard$1).call(this, props)); + _this.state = { + isClient: false + }; + return _this; + } + + createClass(Dashboard$1, [{ + key: "renderHeader", + value: function renderHeader() { + var title = this.props.dashboard.title && React__default.createElement("div", { + className: "overview-title" + }, this.props.dashboard.title); + var subtitle = this.props.dashboard.subtitle && React__default.createElement("div", { + className: "overview-subtitle" + }, this.props.dashboard.subtitle); + + if (this.props.dashboard.title || this.props.dashboard.subtitle) { + return React__default.createElement("div", { + className: "header" + }, React__default.createElement("div", { + className: "overview" + }, React__default.createElement("div", { + className: "columns" + }, React__default.createElement("div", { + className: "column" + }, title, subtitle)))); + } + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.setState({ + isClient: true + }); + } + }, { + key: "render", + value: function render() { + var Component; + + if (this.props.dashboard && this.props.dashboard.component && this.state.isClient && AdminBro.Components[this.props.dashboard.component]) { + Component = AdminBro.Components[this.props.dashboard.component]; + } else if (!this.props.dashboard.title && !this.props.dashboard.subtitle) { + Component = Dashboard; + } else { + Component = function Component(props) { + return React__default.createElement("div", { + className: "columns" + }); + }; + } + + return React__default.createElement("div", { + className: "dashboard" + }, this.renderHeader(), React__default.createElement("div", { + className: "dashboard-content page-builder-content" + }, React__default.createElement(Component, null))); + } + }]); + + return Dashboard$1; + }(React__default.Component); + + var mapStateToProps$2 = function mapStateToProps(state) { + return { + paths: state.paths, + dashboard: state.dashboard + }; + }; + + var Dashboard$2 = reactRedux.connect(mapStateToProps$2)(Dashboard$1); + + var New = + /*#__PURE__*/ + function (_React$Component) { + inherits(New, _React$Component); + + function New(props) { + var _this; + + classCallCheck(this, New); + + _this = possibleConstructorReturn(this, getPrototypeOf(New).call(this, props)); + _this.api = new ApiClient(); + _this.state = { + params: props.record && props.record.params || {}, + errors: props.record && props.record.errors || {} + }; + return _this; + } + + createClass(New, [{ + key: "handleChange", + value: function handleChange(propertyName, value) { + this.setState(objectSpread({}, this.state, { + params: objectSpread({}, this.state.params, defineProperty({}, propertyName, value)) + })); + } + }, { + key: "handleSubmit", + value: function handleSubmit(event) { + var _this2 = this; + + this.api.resourceAction({ + resourceId: this.props.resource.id, + actionName: 'new', + payload: { + record: this.state.params + } + }).then(function (response) { + if (response.data.redirectUrl) { + _this2.props.history.push(response.data.redirectUrl); + } else { + _this2.setState(objectSpread({}, _this2.state, { + errors: response.data.record.errors + })); + } + }); + event.preventDefault(); + return false; + } + }, { + key: "render", + value: function render() { + var _this3 = this; + + var resource = this.props.resource; + var properties = this.props.resource.editProperties; + var record = { + params: this.state.params, + errors: this.state.errors + }; + return React__default.createElement("div", { + className: "border-box" + }, React__default.createElement("form", { + onSubmit: this.handleSubmit.bind(this) + }, properties.map(function (property) { + return React__default.createElement(PropertyType, { + key: property.name, + where: "edit", + property: property, + resource: resource, + onChange: _this3.handleChange.bind(_this3), + record: record + }); + }), React__default.createElement("div", { + className: "field is-grouped" + }, React__default.createElement("div", { + className: "control" + }, React__default.createElement("button", { + className: "button is-primary", + type: "submit" + }, React__default.createElement("span", { + className: "icon is-small" + }, React__default.createElement("i", { + className: "icomoon-save" + })), React__default.createElement("div", { + className: "btn-text" + }, "Save")))))); + } + }]); + + return New; + }(React__default.Component); + + var NewAction = reactRouterDom.withRouter(New); + + var Edit$5 = + /*#__PURE__*/ + function (_React$Component) { + inherits(Edit, _React$Component); + + function Edit(props) { + var _this; + + classCallCheck(this, Edit); + + _this = possibleConstructorReturn(this, getPrototypeOf(Edit).call(this, props)); + _this.state = { + isLoading: true, + record: { + params: {}, + populated: {} + } + }; + _this.api = new ApiClient(); + return _this; + } + + createClass(Edit, [{ + key: "handleChange", + value: function handleChange(propertyName, value) { + this.setState(objectSpread({}, this.state, { + record: objectSpread({}, this.state.record, { + params: objectSpread({}, this.state.record.params, defineProperty({}, propertyName, value)) + }) + })); + } + }, { + key: "handleSubmit", + value: function handleSubmit(event) { + var _this2 = this; + + this.api.recordAction({ + resourceId: this.props.resource.id, + actionName: 'edit', + recordId: this.props.recordId, + payload: { + record: this.state.record.params + } + }).then(function (response) { + if (response.data.redirectUrl) { + _this2.props.history.push(response.data.redirectUrl); + } else { + _this2.setState(objectSpread({}, _this2.state, { + record: objectSpread({}, _this2.state.record, { + errors: response.data.record.errors + }) + })); + } + }); + event.preventDefault(); + return false; + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + var _this3 = this; + + this.api.recordAction({ + resourceId: this.props.resource.id, + actionName: this.props.action.name, + recordId: this.props.recordId + }).then(function (response) { + _this3.setState({ + isLoading: false, + record: response.data.record + }); + }); + } + }, { + key: "render", + value: function render() { + var _this4 = this; + + var resource = this.props.resource; + var properties = resource.editProperties; + var record = this.state.record; + + if (this.state.isLoading) { + return React__default.createElement(Loader, null); + } + + return React__default.createElement("div", { + className: "border-box" + }, React__default.createElement("form", { + onSubmit: this.handleSubmit.bind(this) + }, properties.map(function (property) { + return React__default.createElement(PropertyType, { + key: property.name, + where: "edit", + onChange: _this4.handleChange.bind(_this4), + property: property, + resource: resource, + record: record + }); + }), React__default.createElement("div", { + className: "field is-grouped" + }, React__default.createElement("div", { + className: "control" + }, React__default.createElement("button", { + className: "button is-primary", + type: "submit" + }, React__default.createElement("span", { + className: "icon is-small" + }, React__default.createElement("i", { + className: "icomoon-save" + })), React__default.createElement("div", { + className: "btn-text" + }, "Save")))))); + } + }]); + + return Edit; + }(React__default.Component); + + var EditAction = reactRouterDom.withRouter(Edit$5); + + var Show$5 = + /*#__PURE__*/ + function (_React$Component) { + inherits(Show, _React$Component); + + function Show(props) { + var _this; + + classCallCheck(this, Show); + + _this = possibleConstructorReturn(this, getPrototypeOf(Show).call(this, props)); + _this.state = { + isLoading: true, + record: { + params: {}, + populated: {} + } + }; + _this.api = new ApiClient(); + return _this; + } + + createClass(Show, [{ + key: "componentDidMount", + value: function componentDidMount() { + var _this2 = this; + + this.api.recordAction({ + resourceId: this.props.resource.id, + actionName: this.props.action.name, + recordId: this.props.recordId + }).then(function (response) { + _this2.setState({ + isLoading: false, + record: response.data.record + }); + }); + } + }, { + key: "render", + value: function render() { + var resource = this.props.resource; + var properties = resource.showProperties; + var record = this.state.record; + + if (this.state.isLoading) { + return React__default.createElement(Loader, null); + } + + return React__default.createElement("div", { + className: "border-box" + }, properties.map(function (property) { + return React__default.createElement(PropertyType, { + key: property.name, + where: "show", + property: property, + resource: resource, + record: record + }); + })); + } + }]); + + return Show; + }(React__default.Component); + + var Delete = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Delete, _React$PureComponent); + + function Delete() { + classCallCheck(this, Delete); + + return possibleConstructorReturn(this, getPrototypeOf(Delete).apply(this, arguments)); + } + + createClass(Delete, [{ + key: "componentDidMount", + value: function componentDidMount() { + var _this = this; + + var api = new ApiClient(); + api.recordAction({ + resourceId: this.props.resource.id, + actionName: this.props.action.name, + recordId: this.props.recordId + }).then(function (response) { + _this.props.history.push(response.data.redirectUrl); + }); + } + }, { + key: "render", + value: function render() { + return React__default.createElement(Loader, null); + } + }]); + + return Delete; + }(React__default.PureComponent); + + var DeleteAction = reactRouterDom.withRouter(Delete); + + var actions = { + new: NewAction, + edit: EditAction, + show: Show$5, + delete: DeleteAction + }; + + var RecordAction = + /*#__PURE__*/ + function (_React$Component) { + inherits(RecordAction, _React$Component); + + function RecordAction(props) { + var _this; + + classCallCheck(this, RecordAction); + + _this = possibleConstructorReturn(this, getPrototypeOf(RecordAction).call(this, props)); + _this.state = { + isClient: false, + recordTitle: '' + }; + return _this; + } + + createClass(RecordAction, [{ + key: "renderActionBtn", + value: function renderActionBtn(action) { + var _this$props$match$par = this.props.match.params, + resourceId = _this$props$match$par.resourceId, + recordId = _this$props$match$par.recordId; + return React__default.createElement(ActionBtn$1, { + action: action, + key: action.name, + className: "is-primary", + resourceId: resourceId, + recordId: recordId + }); + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.setState({ + isClient: true + }); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props$match$par2 = this.props.match.params, + resourceId = _this$props$match$par2.resourceId, + actionName = _this$props$match$par2.actionName, + recordId = _this$props$match$par2.recordId; + var resource = this.props.resources.find(function (r) { + return r.id === resourceId; + }); + var action = resource.recordActions.find(function (r) { + return r.name === actionName; + }); + var h = new viewHelpers(); + var Action = actions[action.name]; + + if (this.state.isClient && action.component) { + Action = AdminBro.Components[action.component]; + } + + Action = Action || function (props) { + return React__default.createElement("div", null); + }; + + return React__default.createElement("div", { + className: "view-edit" + }, React__default.createElement(Breadcrumbs, { + resource: resource, + actionName: actionName, + recordTitle: this.state.recordTitle + }), React__default.createElement("div", { + className: "level" + }, React__default.createElement("h3", { + className: "title" + }, React__default.createElement(reactRouterDom.Link, { + to: h.listUrl({ + resourceId: resource.id + }), + className: "button is-text is-back" + }, React__default.createElement("span", { + className: "icon is-small" + }, React__default.createElement("i", { + className: "icomoon-pagination-left" + }))), action.label), React__default.createElement("div", { + className: "field is-grouped" + }, resource.recordActions.filter(function (a) { + return a.name !== actionName; + }).map(function (action) { + return _this2.renderActionBtn(action); + }))), React__default.createElement(Action, { + action: action, + resource: resource, + recordId: recordId + })); + } + }]); + + return RecordAction; + }(React__default.Component); + + var mapStateToProps$3 = function mapStateToProps(state) { + return { + resources: state.resources + }; + }; + + var RecordAction$1 = reactRedux.connect(mapStateToProps$3)(RecordAction); + + var ResourceAction = + /*#__PURE__*/ + function (_React$Component) { + inherits(ResourceAction, _React$Component); + + function ResourceAction(props) { + var _this; + + classCallCheck(this, ResourceAction); + + _this = possibleConstructorReturn(this, getPrototypeOf(ResourceAction).call(this, props)); + _this.state = { + isClient: false + }; + return _this; + } + + createClass(ResourceAction, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.setState({ + isClient: true + }); + } + }, { + key: "render", + value: function render() { + var _this$props$match$par = this.props.match.params, + resourceId = _this$props$match$par.resourceId, + actionName = _this$props$match$par.actionName; + var resource = this.props.resources.find(function (r) { + return r.id === resourceId; + }); + var action = resource.resourceActions.find(function (r) { + return r.name === actionName; + }); + var h = new viewHelpers(); + var Action = actions[action.name]; + + if (this.state.isClient && action.component) { + Action = AdminBro.Components[action.component]; + } + + Action = Action || function (props) { + return React__default.createElement("div", null); + }; + + return React__default.createElement("div", { + className: "view-edit" + }, React__default.createElement(Breadcrumbs, { + resource: resource, + actionName: actionName + }), React__default.createElement("div", { + className: "level" + }, React__default.createElement("h3", { + className: "title" + }, React__default.createElement(reactRouterDom.Link, { + to: h.listUrl({ + resourceId: resource.id + }), + className: "button is-text is-back" + }, React__default.createElement("span", { + className: "icon is-small" + }, React__default.createElement("i", { + className: "icomoon-pagination-left" + }))), action.label)), React__default.createElement(Action, { + action: action, + resource: resource, + paths: this.props.paths + })); + } + }]); + + return ResourceAction; + }(React__default.Component); + + var mapStateToProps$4 = function mapStateToProps(state) { + return { + paths: state.paths, + resources: state.resources + }; + }; + + var ResourceAction$1 = reactRedux.connect(mapStateToProps$4)(ResourceAction); + + var Resource = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Resource, _React$PureComponent); + + function Resource(props) { + var _this; + + classCallCheck(this, Resource); + + _this = possibleConstructorReturn(this, getPrototypeOf(Resource).call(this, props)); + _this.api = new ApiClient(); + _this.resource = _this.props.resources.find(function (r) { + return r.id === _this.props.match.params.resourceId; + }); + _this.state = { + loading: true, + filterVisible: _this.queryHasFilter(), + records: [], + page: 1, + perPage: 20, + total: 0, + sortBy: _this.resource.listProperties[0].name, + direction: 'asc' + }; + return _this; + } + + createClass(Resource, [{ + key: "queryHasFilter", + value: function queryHasFilter() { + var query = new URLSearchParams(this.props.location.search); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = query.keys()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var key = _step.value; + + if (key.match('filters.')) { + return true; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return false; + } + }, { + key: "_fetchData", + value: function _fetchData(resourceId) { + var _this2 = this; + + this.resource = this.props.resources.find(function (r) { + return r.id === resourceId; + }); + var query = new URLSearchParams(this.props.location.search); + this.api.getRecords({ + resourceId: this.resource.id, + query: query + }).then(function (response) { + _this2.setState({ + loading: false, + records: response.data.records, + page: response.data.meta.page, + perPage: response.data.meta.perPage, + total: response.data.meta.total, + sortBy: response.data.meta.sortBy, + direction: response.data.meta.direction + }); + }); + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this._fetchData(this.props.match.params.resourceId); + } + }, { + key: "handleActionPerformed", + value: function handleActionPerformed() { + this._fetchData(this.props.match.params.resourceId); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + if (this.props.match.params.resourceId !== prevProps.match.params.resourceId || this.props.location.search !== prevProps.location.search) { + this._fetchData(this.props.match.params.resourceId); + } + } + }, { + key: "renderActionBtn", + value: function renderActionBtn(action) { + return React__default.createElement(ActionBtn$1, { + action: action, + key: action.name, + actionPerformed: this.handleActionPerformed.bind(this), + className: "is-primary", + resourceId: this.resource.id + }); + } + }, { + key: "toggleFilter", + value: function toggleFilter(event) { + this.setState({ + filterVisible: !this.state.filterVisible + }); + event.preventDefault(); + } + }, { + key: "render", + value: function render() { + var _this3 = this; + + return React__default.createElement("section", { + className: "table-list" + }, React__default.createElement(Breadcrumbs, { + resource: this.resource + }), React__default.createElement("div", { + className: "level" + }, React__default.createElement("div", { + className: "title" + }, this.resource.name), React__default.createElement("div", { + className: "toolbar" + }, React__default.createElement("div", { + className: "field is-grouped" + }, this.resource.resourceActions.map(function (action) { + return _this3.renderActionBtn(action); + }), React__default.createElement("div", { + className: "control" + }, React__default.createElement("a", { + className: "button is-primary is-transparent filters-open", + onClick: this.toggleFilter.bind(this) + }, React__default.createElement("span", { + className: "icon" + }, React__default.createElement("i", { + className: "fas fa-sliders-h" + })), React__default.createElement("span", { + className: "btn-text" + }, "Filter")))))), React__default.createElement("div", { + className: "border-box" + }, React__default.createElement(RecordsTable, { + sortBy: this.state.sortBy, + direction: this.state.direction, + resource: this.resource, + records: this.state.records, + paths: this.props.paths, + actionPerformed: this.handleActionPerformed.bind(this) + }), React__default.createElement(Paginate$1, { + page: this.state.page, + perPage: this.state.perPage, + total: this.state.total + })), React__default.createElement(Filter$5, { + resource: this.resource, + search: this.state.search, + isVisible: this.state.filterVisible, + toggleFilter: this.toggleFilter.bind(this) + })); + } + }]); + + return Resource; + }(React__default.PureComponent); + + var mapStateToProps$5 = function mapStateToProps(state) { + return { + paths: state.paths, + resources: state.resources + }; + }; + + var Resource$1 = reactRedux.connect(mapStateToProps$5)(Resource); + + function _templateObject$6() { + var data = taggedTemplateLiteral(["\n font-size: 14px;\n font-family: 'Roboto', sans-serif;\n"]); + + _templateObject$6 = function _templateObject() { + return data; + }; + + return data; + } + var ApplicationWrapper = styled.div.attrs({ + className: 'columns' + })(_templateObject$6()); + + var App = function App(props) { + var paths = props.paths; + var h = new viewHelpers({ + options: paths + }); + var resourceId = ':resourceId'; + var actionName = ':actionName'; + var recordId = ':recordId'; + var recordActionUrl = h.recordActionUrl({ + resourceId: resourceId, + recordId: recordId, + actionName: actionName + }); + var resourceActionUrl = h.resourceActionUrl({ + resourceId: resourceId, + actionName: actionName + }); + var listUrl = h.listUrl({ + resourceId: resourceId + }); + return React__default.createElement(ApplicationWrapper, null, React__default.createElement(Sidebar$1, null), React__default.createElement("div", { + className: "column" + }, React__default.createElement(Topbar$1, null), React__default.createElement(reactRouterDom.Switch, null, React__default.createElement(reactRouterDom.Route, { + path: h.dashboardUrl(), + exact: true, + component: Dashboard$2 + }), React__default.createElement(reactRouterDom.Route, { + path: listUrl, + exact: true, + component: Resource$1 + }), React__default.createElement(reactRouterDom.Route, { + path: resourceActionUrl, + exact: true, + component: ResourceAction$1 + }), React__default.createElement(reactRouterDom.Route, { + path: recordActionUrl, + exact: true, + component: RecordAction$1 + })))); + }; + + App.propTypes = { + paths: pathsType.isRequired + }; + + var mapStateToProps$6 = function mapStateToProps(state) { + return { + paths: state.paths + }; + }; + + var App$1 = reactRedux.connect(mapStateToProps$6)(App); + + var resourcesReducer = function resourcesReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case 'RESOURCES_INITIALIZE': + return action.data; + + default: + return state; + } + }; + + var brandingReducer = function brandingReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case 'BRANDING_INITIALIZE': + return action.data; + + default: + return state; + } + }; + + var pathsReducer = function pathsReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case 'PATHS_INITIALIZE': + return action.data; + + default: + return state; + } + }; + + var dashboardReducer = function dashboardReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case 'DASHBOARD_INITIALIZE': + return action.data; + + default: + return state; + } + }; + + var sessionReducer = function sessionReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case 'SESSION_INITIALIZE': + return action.data; + + default: + return state; + } + }; + + var reducer = redux.combineReducers({ + resources: resourcesReducer, + branding: brandingReducer, + paths: pathsReducer, + session: sessionReducer, + dashboard: dashboardReducer + }); + var createStore = (function () { + var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return redux.createStore(reducer, initialState); + }); + + var Block = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(Block, _React$PureComponent); + + function Block() { + classCallCheck(this, Block); + + return possibleConstructorReturn(this, getPrototypeOf(Block).apply(this, arguments)); + } + + createClass(Block, [{ + key: "render", + value: function render() { + var columns = this.props.columns || 3; + var offset = this.props.offset || 0; + var title = this.props.title || ''; + var icon = this.props.icon || ''; + var value = this.props.value || ''; + return React__default.createElement("div", { + className: "column is-12-tablet is-".concat(columns, "-desktop is-offset-").concat(offset) + }, React__default.createElement("div", { + className: "dashboard-block border-box" + }, React__default.createElement("div", { + className: "block-title" + }, title), React__default.createElement("div", { + className: "block-content" + }, React__default.createElement("div", { + className: "value" + }, value), React__default.createElement("i", { + className: icon + })))); + } + }]); + + return Block; + }(React__default.PureComponent); + + var TextBlock = + /*#__PURE__*/ + function (_React$PureComponent) { + inherits(TextBlock, _React$PureComponent); + + function TextBlock() { + classCallCheck(this, TextBlock); + + return possibleConstructorReturn(this, getPrototypeOf(TextBlock).apply(this, arguments)); + } + + createClass(TextBlock, [{ + key: "render", + value: function render() { + var columns = this.props.columns || 3; + var offset = this.props.offset || 0; + var title = this.props.title ? React__default.createElement("div", { + className: "h2" + }, this.props.title) : ''; + var icon = this.props.icon || ''; + var value = this.props.value || ''; + return React__default.createElement("div", { + className: "column is-12-tablet is-".concat(columns, "-desktop is-offset-").concat(offset) + }, React__default.createElement("div", { + className: "dashboard-block border-box" + }, title, this.props.children)); + } + }]); + + return TextBlock; + }(React__default.PureComponent); + + var widgets = { + Block: Block, + TextBlock: TextBlock + }; + + var Components = objectSpread({}, AdminBro$1.Components, widgets); + + var store = createStore(window.REDUX_STATE); + var Application = React__default.createElement(reactRedux.Provider, { + store: store + }, React__default.createElement(reactRouterDom.BrowserRouter, null, React__default.createElement(App$1, null))); + var bundleEntry = { + Application: Application, + Components: Components, + ApiClient: ApiClient + }; + + return bundleEntry; + +}(AdminBro, React, ReactRedux, ReactRouterDOM, styled, PropTypes, axios, ReactDOM, Redux)); diff --git a/src/frontend/components/app/index.jsx b/src/frontend/components/app/index.jsx index 42a118cb2..a6ac4943a 100644 --- a/src/frontend/components/app/index.jsx +++ b/src/frontend/components/app/index.jsx @@ -1,15 +1,23 @@ import React from 'react' import { connect } from 'react-redux' import { Switch, Route } from 'react-router-dom' -import PropTypes from 'prop-types' +import styled from 'styled-components' import ViewHelpers from '../../../backend/utils/view-helpers' import { Sidebar, Topbar } from '../layout' +import { pathsType } from '../../types' import { Resource, Dashboard, ResourceAction, RecordAction, } from '../routes' +const ApplicationWrapper = styled.div.attrs({ + className: 'columns', +})` + font-size: 14px; + font-family: 'Roboto', sans-serif; +` + const App = (props) => { const { paths } = props const h = new ViewHelpers({ options: paths }) @@ -23,9 +31,9 @@ const App = (props) => { const listUrl = h.listUrl({ resourceId }) return ( -
+ -
+
@@ -34,16 +42,12 @@ const App = (props) => {
-
+
) } App.propTypes = { - paths: PropTypes.shape({ - loginPath: PropTypes.string.isRequired, - rootPath: PropTypes.string.isRequired, - logoutPath: PropTypes.string.isRequired, - }).isRequired, + paths: pathsType.isRequired, } const mapStateToProps = state => ({ diff --git a/src/frontend/components/layout/sidebar/group-resources.js b/src/frontend/components/layout/sidebar/group-resources.js new file mode 100644 index 000000000..30edc65a8 --- /dev/null +++ b/src/frontend/components/layout/sidebar/group-resources.js @@ -0,0 +1,17 @@ +/* eslint-disable no-param-reassign */ +export default (resources) => { + const map = resources.reduce((memo, resource) => { + if (memo[resource.parent.name]) { + memo[resource.parent.name].push(resource) + } else { + memo[resource.parent.name] = [resource] + } + memo[resource.parent.name].icon = resource.parent.icon + return memo + }, {}) + return Object.keys(map).map(parentName => ({ + name: parentName, + icon: map[parentName].icon, + resources: map[parentName], + })) +} diff --git a/src/frontend/components/layout/sidebar/hamburger.jsx b/src/frontend/components/layout/sidebar/hamburger.jsx new file mode 100644 index 000000000..0aeceef99 --- /dev/null +++ b/src/frontend/components/layout/sidebar/hamburger.jsx @@ -0,0 +1,13 @@ +import styled from 'styled-components' +import { sizes } from '../../../styles/variables' + +const Hamburger = styled.i.attrs({ + className: 'fas fa-bars fa-2x', +})` + cursor: pointer; + display: block; + float: left; + margin: ${sizes.paddingMin}; +` + +export default Hamburger diff --git a/src/frontend/components/layout/sidebar/index.jsx b/src/frontend/components/layout/sidebar/index.jsx index aead30d2a..cd415fa53 100644 --- a/src/frontend/components/layout/sidebar/index.jsx +++ b/src/frontend/components/layout/sidebar/index.jsx @@ -1,55 +1,66 @@ import React from 'react' +import PropTypes from 'prop-types' import { connect } from 'react-redux' -import SidebarHeader from './sidebar-header' +import styled from 'styled-components' + +import { sizes, colors, fonts } from '../../../styles/variables' +import { pathsType, brandingType, resourceType } from '../../../types' + +import SidebarBranding from './sidebar-branding' import SidebarParent from './sidebar-parent' import SidebarFooter from './sidebar-footer' +import groupResources from './group-resources' +import Hamburger from './hamburger' + +const SidebarWrapper = styled.aside` + padding: ${sizes.paddingLayout}; + width: ${sizes.sidebarWidth}; + display: flex; + flex-direction: column; + justify-content: space-between; + height: 100vh; + overflow-y: auto; +` + +const SidebarLabel = styled.h2` + margin-top: ${sizes.padding}; + margin-left: ${sizes.padding}; + margin-bottom: ${sizes.padding}; + color: ${colors.lightText}; + font-size: ${fonts.min}; + text-transform: uppercase; + letter-spacing: .1em; +` -const groupResources = (resources) => { - const map = resources.reduce((memo, resource) => { - if (memo[resource.parent.name]) { - memo[resource.parent.name].push(resource) - } else { - memo[resource.parent.name] = [resource] - } - memo[resource.parent.name].icon = resource.parent.icon - return memo - }, {}) - return Object.keys(map).map(parentName => ({ - name: parentName, - icon: map[parentName].icon, - resources: map[parentName], - })) +const Sidebar = (props) => { + const { branding, paths, resources } = props + return ( + + {/* */} +
+ + Navigation +
    + {groupResources(resources).map(parent => ( + + ))} +
+
+ {branding.softwareBrothers && } +
+ ) } -class Sidebar extends React.Component { - render() { - return ( - - ) - } +Sidebar.propTypes = { + paths: pathsType.isRequired, + branding: brandingType.isRequired, + resources: PropTypes.arrayOf(resourceType).isRequired, } -const mapStateToProps = (state) => ({ +const mapStateToProps = state => ({ resources: state.resources, branding: state.branding, paths: state.paths, }) -export default connect(mapStateToProps)(Sidebar) \ No newline at end of file +export default connect(mapStateToProps)(Sidebar) diff --git a/src/frontend/components/layout/sidebar/sidebar-branding.jsx b/src/frontend/components/layout/sidebar/sidebar-branding.jsx new file mode 100644 index 000000000..bccb0e93f --- /dev/null +++ b/src/frontend/components/layout/sidebar/sidebar-branding.jsx @@ -0,0 +1,47 @@ +import React from 'react' +import { Link } from 'react-router-dom' +import styled from 'styled-components' +import { pathsType, brandingType } from '../../../types' +import ViewHelpers from '../../../../backend/utils/view-helpers' +import { colors, sizes } from '../../../styles/variables' + +const BrandingBox = styled.div` + margin-bottom: ${sizes.paddingLayout}; +` + +const LogoLink = styled(Link)` + display: flex; + align-items: center; + color: ${colors.defaultText}; + font-weight: bold; +` + +const LogoImage = styled.img` + margin-right: ${sizes.padding}; +` + +const SidebarBranding = (props) => { + const { paths, branding } = props + const { logo, companyName } = branding + const h = new ViewHelpers({ options: paths }) + return ( + + + + {companyName} + + + ) +} + +SidebarBranding.propTypes = { + paths: pathsType.isRequired, + branding: brandingType.isRequired, +} + +export default SidebarBranding diff --git a/src/frontend/components/layout/sidebar/sidebar-footer.jsx b/src/frontend/components/layout/sidebar/sidebar-footer.jsx index c7fa5b6d5..9e613324d 100644 --- a/src/frontend/components/layout/sidebar/sidebar-footer.jsx +++ b/src/frontend/components/layout/sidebar/sidebar-footer.jsx @@ -1,17 +1,35 @@ import React from 'react' +import styled from 'styled-components' -export default class SidebarFooter extends React.PureComponent { - render() { - return ( -
-

- With - by - - SoftwareBrothers - -

-
- ) +import { colors, fonts, sizes } from '../../../styles/variables' + +const StyledFooter = styled.p` + font-size: ${fonts.min}; + text-align: center; + color: ${colors.lightText}; + + & > svg, & > a { + color: ${colors.love}; + margin: 0 ${sizes.paddingMin}; } +` + + +const SidebarFooter = (props) => { + return ( + + With + + by + + SoftwareBrothers + + + ) } + +export default SidebarFooter diff --git a/src/frontend/components/layout/sidebar/sidebar-header.jsx b/src/frontend/components/layout/sidebar/sidebar-header.jsx deleted file mode 100644 index 0ec24c804..000000000 --- a/src/frontend/components/layout/sidebar/sidebar-header.jsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react' -import { Link } from 'react-router-dom' - -import ViewHelpers from '../../../../backend/utils/view-helpers' - -export default class SidebarHeader extends React.PureComponent { - render() { - const h = new ViewHelpers({ options: this.props.paths }) - return ( -
-
- -
- - {this.props.branding.companyName} - {this.props.branding.companyName} - -
- ) - } -} diff --git a/src/frontend/components/layout/sidebar/sidebar-parent.jsx b/src/frontend/components/layout/sidebar/sidebar-parent.jsx index 8d9b22372..28dd6ab3e 100644 --- a/src/frontend/components/layout/sidebar/sidebar-parent.jsx +++ b/src/frontend/components/layout/sidebar/sidebar-parent.jsx @@ -1,20 +1,56 @@ import React from 'react' +import styled from 'styled-components' + +import { colors, sizes } from '../../../styles/variables' +import { resourceParentWithResourcesType } from '../../../types' import SidebarResource from './sidebar-resource' -export default class SidebarParent extends React.PureComponent { +const Title = styled.span` + background: ${colors.lightBck}; + padding-left: ${sizes.padding}; + padding-right: ${sizes.padding}; + line-height: 40px; + border-radius: ${sizes.paddingLayout}; + display: flex; + align-items: baseline; + color: ${colors.defaultText}; + position: relative; + + & > i, & > svg { + margin-right: ${sizes.paddingMin}; + color: ${colors.lightText}; + margin-right: ${sizes.padding}; + } +` + +const ResourcesList = styled.ul` + margin: ${sizes.padding} 0; + padding-left: 40px; +` + +class SidebarParent extends React.PureComponent { render() { + const { parent } = this.props + const { icon, name, resources } = parent + return (
  • - - - {this.props.parent.name} - -
      - {this.props.parent.resources.map(resource => ( + + <i className={icon} /> + {name} + + + {resources.map(resource => ( ))} -
    +
  • ) } } + +SidebarParent.propTypes = { + parent: resourceParentWithResourcesType.isRequired, +} + +export default SidebarParent diff --git a/src/frontend/components/layout/sidebar/sidebar-resource.jsx b/src/frontend/components/layout/sidebar/sidebar-resource.jsx index 0dd65720b..2249c1d85 100644 --- a/src/frontend/components/layout/sidebar/sidebar-resource.jsx +++ b/src/frontend/components/layout/sidebar/sidebar-resource.jsx @@ -1,15 +1,39 @@ import React from 'react' -import { Link } from 'react-router-dom' +import { NavLink, withRouter } from 'react-router-dom' +import styled from 'styled-components' +import { resourceType } from '../../../types' +import { colors, sizes } from '../../../styles/variables' -export default class SidebarResource extends React.PureComponent { +const ResourceLink = styled(NavLink)` + color: ${colors.defaultText}; + padding: ${sizes.paddingMin}; + display: block; + + &:hover { + color: ${colors.primary}; + } + + &.active { + color: ${colors.primary}; + } +` + +class SidebarResource extends React.PureComponent { render() { + const { resource, match } = this.props return (
  • - - {this.props.resource.name} - + + {resource.name} +
  • ) } } + +SidebarResource.propTypes = { + resource: resourceType.isRequired, +} + +export default withRouter(SidebarResource) diff --git a/src/frontend/components/layout/sidebar/styles.css b/src/frontend/components/layout/sidebar/styles.css new file mode 100644 index 000000000..eea909acb --- /dev/null +++ b/src/frontend/components/layout/sidebar/styles.css @@ -0,0 +1,3 @@ +.sidebar-branding { + color: red; +} diff --git a/src/frontend/layout-template.js b/src/frontend/layout-template.js index 57d80049c..2d389e082 100644 --- a/src/frontend/layout-template.js +++ b/src/frontend/layout-template.js @@ -1,13 +1,12 @@ import React from 'react' import { renderToString } from 'react-dom/server' import { StaticRouter } from 'react-router-dom' +import { Provider } from 'react-redux' -import App from '../frontend/components/app' +import App from './components/app' import ViewHelpers from '../backend/utils/view-helpers' import initializeStore from './store' -import { Provider } from 'react-redux' - const html = (admin, currentAdmin, location = '/') => { const context = {} const h = new ViewHelpers({ options: admin.options }) @@ -22,8 +21,8 @@ const html = (admin, currentAdmin, location = '/') => { .map(l => ``) const jsx = ( - - + + @@ -49,7 +48,7 @@ const html = (admin, currentAdmin, location = '/') => { - + @@ -63,6 +62,7 @@ const html = (admin, currentAdmin, location = '/') => { + ${styles.join('\n')} diff --git a/src/frontend/styles/variables.js b/src/frontend/styles/variables.js new file mode 100644 index 000000000..ecb2b910e --- /dev/null +++ b/src/frontend/styles/variables.js @@ -0,0 +1,53 @@ +// sorted alphabetically +export const colors = { + defaultText: '#111114', + lightText: '#a9aabc', + lightBck: '#F8F8FA', + + love: '#e6282b', + primary: '#718af4', + + 'alizarin-crimson': '#e6282b', + 'athens-gray-2': '#F8F8FA', + 'athens-gray-dark': '#eeeeef', + 'athens-gray-darker': '#F1F1F5', + 'athens-gray': '#f7f7Fa', + 'blue-bayoux': '#4e5779', + 'cornflower-blue': '#718af4', + 'froly': '#f0616f', + 'ghost': '#cbccd7', + 'mako': '#454655', + 'red': '#e6282zb;', + 'rhino': '#303b62', + 'silver-tree': '#5abe99', + 'spun-pearl': '#a9aabc', + 'storm-gray': '#757687', + 'sunglo': '#e06a72', + 'waikawa-gray': '#545B8C', + 'waterloo': '#7f8296', + 'white': '#ffffff', + 'wild-sand': '#f7f7f7', + 'woodsmoke': '#111114', +} + +export const sizes = { + navbarHeight: '64px', + sidebarWidth: '300px', + sidebarMobileWidth: '98px', + paddingLayout: '30px', + padding: '15px', + paddingMin: '5px', +} + +export const fonts = { + base: '14px', + min: '11px', +} + +export const breakpoints = { + minMobileWidth: '320px', + minTabletWidth: '769px', + minDesktopWidth: '1024px', + minWidescreenWidth: '1216px', + minFullhdWidth: '1408px', +} diff --git a/src/frontend/types/index.js b/src/frontend/types/index.js new file mode 100644 index 000000000..ef23c44be --- /dev/null +++ b/src/frontend/types/index.js @@ -0,0 +1,60 @@ +import PropTypes from 'prop-types' + +export const pathsType = PropTypes.shape({ + loginPath: PropTypes.string.isRequired, + rootPath: PropTypes.string.isRequired, + logoutPath: PropTypes.string.isRequired, +}) + +export const brandingType = PropTypes.shape({ + logo: PropTypes.string.isRequired, + companyName: PropTypes.string.isRequired, + softwareBrothers: PropTypes.bool.isRequired, +}) + +export const propertyType = PropTypes.shape({ + isId: PropTypes.bool.isRequired, + isSortable: PropTypes.bool.isRequired, + isTitle: PropTypes.bool.isRequired, + isVisible: PropTypes.bool.isRequired, + label: PropTypes.string.isRequired, + name: PropTypes.string.isRequired, + position: PropTypes.number.isRequired, + type: PropTypes.string.isRequired, +}) + +export const actionType = PropTypes.shape({ + actionType: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.arrayOf(PropTypes.string), + ]).isRequired, + icon: PropTypes.string.isRequired, + isVisible: PropTypes.bool.isRequired, + label: PropTypes.string.isRequired, + name: PropTypes.string.isRequired, +}) + +export const resourceParentType = PropTypes.shape({ + name: PropTypes.string.isRequired, + icon: PropTypes.string.isRequired, +}) + +export const resourceType = PropTypes.shape({ + editProperties: PropTypes.arrayOf(propertyType).isRequired, + filterProperties: PropTypes.arrayOf(propertyType).isRequired, + href: PropTypes.string.isRequired, + id: PropTypes.string.isRequired, + listProperties: PropTypes.arrayOf(propertyType).isRequired, + name: PropTypes.string.isRequired, + parent: resourceParentType.isRequired, + recordActions: PropTypes.arrayOf(actionType).isRequired, + resourceActions: PropTypes.arrayOf(actionType).isRequired, + showProperties: PropTypes.arrayOf(propertyType).isRequired, + titleProperty: propertyType.isRequired, +}) + +export const resourceParentWithResourcesType = PropTypes.shape({ + name: PropTypes.string.isRequired, + icon: PropTypes.string.isRequired, + resources: PropTypes.arrayOf(resourceType).isRequired, +}) diff --git a/yarn-error.log b/yarn-error.log index e3390ff07..deb04a81a 100644 --- a/yarn-error.log +++ b/yarn-error.log @@ -1,5 +1,5 @@ Arguments: - /usr/local/bin/node /opt/yarn-v1.9.2/bin/yarn.js add @babel/preset-plugin-transform-runtime + /usr/local/bin/node /opt/yarn-v1.9.2/bin/yarn.js add Radium PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin @@ -14,7 +14,7 @@ Platform: linux x64 Trace: - Error: https://registry.yarnpkg.com/@babel%2fpreset-plugin-transform-runtime: Not found + Error: https://registry.yarnpkg.com/Radium: Not found at Request.params.callback [as _callback] (/opt/yarn-v1.9.2/lib/cli.js:64150:18) at Request.self.callback (/opt/yarn-v1.9.2/lib/cli.js:137416:22) at Request.emit (events.js:182:13) @@ -61,35 +61,39 @@ npm manifest: "homepage": "https://github.com/SoftwareBrothers/admin-bro#readme", "dependencies": { "@babel/core": "^7.2.0", + "@babel/plugin-transform-runtime": "^7.4.0", "@babel/polyfill": "^7.4.0", "@babel/preset-env": "^7.2.0", "@babel/preset-react": "^7.0.0", "@babel/register": "^7.4.0", "axios": "^0.18.0", - "chart.js": "^2.7.3", + "classnames": "^2.2.6", "flat": "^4.1.0", "jw-paginate": "^1.0.2", "lodash": "^4.17.11", - "moment": "^2.23.0", - "parcel-bundler": "^1.12.3", + "prop-types": "^15.7.2", "pug": "^2.0.3", "react": "^16.8.6", "react-dom": "^16.8.6", "react-redux": "^6.0.1", "react-router-dom": "^5.0.0", + "react-select": "^2.4.2", "redux": "^4.0.1", "require.all": "^2.0.4", "rollup": "^1.7.4", "rollup-plugin-babel": "^4.3.2", "rollup-plugin-commonjs": "^9.2.2", "rollup-plugin-node-resolve": "^4.0.1", + "rollup-plugin-replace": "^2.1.1", "xss": "^1.0.3" }, "devDependencies": { "chai": "^4.1.2", "eslint": "^5.10.0", - "eslint-config-airbnb-base": "^13.1.0", + "eslint-config-airbnb": "^17.1.0", "eslint-plugin-import": "^2.14.0", + "eslint-plugin-jsx-a11y": "^6.2.1", + "eslint-plugin-react": "^7.12.4", "factory-girl": "^5.0.4", "istanbul": "^0.4.5", "mocha": "^5.2.0", @@ -114,31 +118,12 @@ Lockfile: dependencies: "@babel/highlight" "7.0.0-beta.51" - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0 <7.4.0": + "@babel/code-frame@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" dependencies: "@babel/highlight" "^7.0.0" - "@babel/core@^7.0.0 <7.4.0": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.3.4.tgz#921a5a13746c21e32445bf0798680e9d11a6530b" - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.3.4" - "@babel/helpers" "^7.2.0" - "@babel/parser" "^7.3.4" - "@babel/template" "^7.2.2" - "@babel/traverse" "^7.3.4" - "@babel/types" "^7.3.4" - convert-source-map "^1.1.0" - debug "^4.1.0" - json5 "^2.1.0" - lodash "^4.17.11" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - "@babel/core@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.0.tgz#a4dd3814901998e93340f0086e9867fefa163ada" @@ -168,16 +153,6 @@ Lockfile: source-map "^0.5.0" trim-right "^1.0.1" - "@babel/generator@^7.0.0 <7.4.0": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.3.4.tgz#9aa48c1989257877a9d971296e5b73bfe72e446e" - dependencies: - "@babel/types" "^7.3.4" - jsesc "^2.5.1" - lodash "^4.17.11" - source-map "^0.5.0" - trim-right "^1.0.1" - "@babel/generator@^7.1.6", "@babel/generator@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.0.tgz#eaf3821fa0301d9d4aef88e63d4bcc19b73ba16c" @@ -188,16 +163,6 @@ Lockfile: source-map "^0.5.0" trim-right "^1.0.1" - "@babel/generator@^7.3.4", "@babel/generator@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.4.0.tgz#c230e79589ae7a729fd4631b9ded4dc220418196" - dependencies: - "@babel/types" "^7.4.0" - jsesc "^2.5.1" - lodash "^4.17.11" - source-map "^0.5.0" - trim-right "^1.0.1" - "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -234,14 +199,6 @@ Lockfile: "@babel/types" "^7.0.0" lodash "^4.17.10" - "@babel/helper-define-map@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.0.tgz#cbfd8c1b2f12708e262c26f600cd16ed6a3bc6c9" - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.4.0" - lodash "^4.17.11" - "@babel/helper-explode-assignable-expression@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" @@ -283,12 +240,6 @@ Lockfile: dependencies: "@babel/types" "^7.0.0" - "@babel/helper-hoist-variables@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.0.tgz#25b621399ae229869329730a62015bbeb0a6fbd6" - dependencies: - "@babel/types" "^7.4.0" - "@babel/helper-member-expression-to-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" @@ -347,15 +298,6 @@ Lockfile: "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" - "@babel/helper-replace-supers@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz#4f56adb6aedcd449d2da9399c2dcf0545463b64c" - dependencies: - "@babel/helper-member-expression-to-functions" "^7.0.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.4.0" - "@babel/types" "^7.4.0" - "@babel/helper-simple-access@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" @@ -375,12 +317,6 @@ Lockfile: dependencies: "@babel/types" "^7.0.0" - "@babel/helper-split-export-declaration@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz#571bfd52701f492920d63b7f735030e9a3e10b55" - dependencies: - "@babel/types" "^7.4.0" - "@babel/helper-wrap-function@^7.1.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" @@ -418,18 +354,10 @@ Lockfile: version "7.0.0-beta.51" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-beta.51.tgz#27cec2df409df60af58270ed8f6aa55409ea86f6" - "@babel/parser@^7.0.0 <7.4.0": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.4.tgz#a43357e4bbf4b92a437fb9e465c192848287f27c" - "@babel/parser@^7.1.2", "@babel/parser@^7.1.6", "@babel/parser@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.0.tgz#02d01dbc330b6cbf36b76ac93c50752c69027065" - "@babel/parser@^7.2.2", "@babel/parser@^7.3.4", "@babel/parser@^7.4.0": - version "7.4.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.2.tgz#b4521a400cb5a871eab3890787b4bc1326d38d91" - "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" @@ -452,13 +380,6 @@ Lockfile: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread@^7.3.4": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.0.tgz#e4960575205eadf2a1ab4e0c79f9504d5b82a97f" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.2.0" - "@babel/plugin-proposal-optional-catch-binding@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" @@ -480,12 +401,6 @@ Lockfile: dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-flow@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz#a765f061f803bc48f240c26f8747faf97c26bf7c" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-json-strings@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" @@ -524,14 +439,6 @@ Lockfile: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" - "@babel/plugin-transform-async-to-generator@^7.3.4": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.0.tgz#234fe3e458dce95865c0d152d256119b237834b0" - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.1.0" - "@babel/plugin-transform-block-scoped-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" @@ -545,13 +452,6 @@ Lockfile: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" - "@babel/plugin-transform-block-scoping@^7.3.4": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.0.tgz#164df3bb41e3deb954c4ca32ffa9fcaa56d30bcb" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - lodash "^4.17.11" - "@babel/plugin-transform-classes@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.0.tgz#374f8876075d7d21fea55aeb5c53561259163f96" @@ -565,19 +465,6 @@ Lockfile: "@babel/helper-split-export-declaration" "^7.0.0" globals "^11.1.0" - "@babel/plugin-transform-classes@^7.3.4": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.0.tgz#e3428d3c8a3d01f33b10c529b998ba1707043d4d" - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.4.0" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.4.0" - "@babel/helper-split-export-declaration" "^7.4.0" - globals "^11.1.0" - "@babel/plugin-transform-computed-properties@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" @@ -611,13 +498,6 @@ Lockfile: "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-transform-flow-strip-types@^7.0.0 <7.4.0": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.3.4.tgz#00156236defb7dedddc2d3c9477dcc01a4494327" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.2.0" - "@babel/plugin-transform-for-of@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" @@ -644,7 +524,7 @@ Lockfile: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-transform-modules-commonjs@^7.0.0 <7.4.0", "@babel/plugin-transform-modules-commonjs@^7.2.0": + "@babel/plugin-transform-modules-commonjs@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" dependencies: @@ -659,13 +539,6 @@ Lockfile: "@babel/helper-hoist-variables" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-transform-modules-systemjs@^7.3.4": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.0.tgz#c2495e55528135797bc816f5d50f851698c586a1" - dependencies: - "@babel/helper-hoist-variables" "^7.4.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-transform-modules-umd@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" @@ -673,12 +546,6 @@ Lockfile: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-transform-named-capturing-groups-regex@^7.3.0": - version "7.4.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.2.tgz#800391136d6cbcc80728dbdba3c1c6e46f86c12e" - dependencies: - regexp-tree "^0.1.0" - "@babel/plugin-transform-new-target@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" @@ -720,7 +587,7 @@ Lockfile: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.2.0" - "@babel/plugin-transform-react-jsx@^7.0.0", "@babel/plugin-transform-react-jsx@^7.0.0 <7.4.0": + "@babel/plugin-transform-react-jsx@^7.0.0": version "7.3.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.3.0.tgz#f2cab99026631c767e2745a5368b331cfe8f5290" dependencies: @@ -734,11 +601,14 @@ Lockfile: dependencies: regenerator-transform "^0.13.3" - "@babel/plugin-transform-regenerator@^7.3.4": + "@babel/plugin-transform-runtime@^7.4.0": version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.0.tgz#0780e27ee458cc3fdbad18294d703e972ae1f6d1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.0.tgz#b4d8c925ed957471bc57e0b9da53408ebb1ed457" dependencies: - regenerator-transform "^0.13.4" + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + resolve "^1.8.1" + semver "^5.5.1" "@babel/plugin-transform-shorthand-properties@^7.2.0": version "7.2.0" @@ -787,54 +657,6 @@ Lockfile: core-js "^2.6.5" regenerator-runtime "^0.13.2" - "@babel/preset-env@^7.0.0 <7.4.0": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.3.4.tgz#887cf38b6d23c82f19b5135298bdb160062e33e1" - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-async-generator-functions" "^7.2.0" - "@babel/plugin-proposal-json-strings" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread" "^7.3.4" - "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.2.0" - "@babel/plugin-syntax-async-generators" "^7.2.0" - "@babel/plugin-syntax-json-strings" "^7.2.0" - "@babel/plugin-syntax-object-rest-spread" "^7.2.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" - "@babel/plugin-transform-arrow-functions" "^7.2.0" - "@babel/plugin-transform-async-to-generator" "^7.3.4" - "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.3.4" - "@babel/plugin-transform-classes" "^7.3.4" - "@babel/plugin-transform-computed-properties" "^7.2.0" - "@babel/plugin-transform-destructuring" "^7.2.0" - "@babel/plugin-transform-dotall-regex" "^7.2.0" - "@babel/plugin-transform-duplicate-keys" "^7.2.0" - "@babel/plugin-transform-exponentiation-operator" "^7.2.0" - "@babel/plugin-transform-for-of" "^7.2.0" - "@babel/plugin-transform-function-name" "^7.2.0" - "@babel/plugin-transform-literals" "^7.2.0" - "@babel/plugin-transform-modules-amd" "^7.2.0" - "@babel/plugin-transform-modules-commonjs" "^7.2.0" - "@babel/plugin-transform-modules-systemjs" "^7.3.4" - "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.3.0" - "@babel/plugin-transform-new-target" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.2.0" - "@babel/plugin-transform-parameters" "^7.2.0" - "@babel/plugin-transform-regenerator" "^7.3.4" - "@babel/plugin-transform-shorthand-properties" "^7.2.0" - "@babel/plugin-transform-spread" "^7.2.0" - "@babel/plugin-transform-sticky-regex" "^7.2.0" - "@babel/plugin-transform-template-literals" "^7.2.0" - "@babel/plugin-transform-typeof-symbol" "^7.2.0" - "@babel/plugin-transform-unicode-regex" "^7.2.0" - browserslist "^4.3.4" - invariant "^2.2.2" - js-levenshtein "^1.1.3" - semver "^5.3.0" - "@babel/preset-env@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.0.tgz#a5030e7e4306af5a295dd5d7c78dc5464af3fee2" @@ -902,18 +724,18 @@ Lockfile: pirates "^4.0.0" source-map-support "^0.5.9" - "@babel/runtime@^7.0.0 <7.4.0": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.4.tgz#73d12ba819e365fcf7fd152aed56d6df97d21c83" - dependencies: - regenerator-runtime "^0.12.0" - "@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1": version "7.4.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.2.tgz#f5ab6897320f16decd855eed70b705908a313fe8" dependencies: regenerator-runtime "^0.13.2" + "@babel/runtime@^7.4.2": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.3.tgz#79888e452034223ad9609187a0ad1fe0d2ad4bdc" + dependencies: + regenerator-runtime "^0.13.2" + "@babel/template@7.0.0-beta.51": version "7.0.0-beta.51" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.51.tgz#9602a40aebcf357ae9677e2532ef5fc810f5fbff" @@ -923,14 +745,6 @@ Lockfile: "@babel/types" "7.0.0-beta.51" lodash "^4.17.5" - "@babel/template@^7.0.0 <7.4.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.2.2" - "@babel/types" "^7.2.2" - "@babel/template@^7.1.0", "@babel/template@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" @@ -939,14 +753,6 @@ Lockfile: "@babel/parser" "^7.1.2" "@babel/types" "^7.1.2" - "@babel/template@^7.2.2": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.0.tgz#12474e9c077bae585c5d835a95c0b0b790c25c8b" - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.4.0" - "@babel/types" "^7.4.0" - "@babel/traverse@7.0.0-beta.51": version "7.0.0-beta.51" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.51.tgz#981daf2cec347a6231d3aa1d9e1803b03aaaa4a8" @@ -962,20 +768,6 @@ Lockfile: invariant "^2.2.0" lodash "^4.17.5" - "@babel/traverse@^7.0.0 <7.4.0": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.3.4.tgz#1330aab72234f8dea091b08c4f8b9d05c7119e06" - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.3.4" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.3.4" - "@babel/types" "^7.3.4" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.11" - "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.1.6": version "7.1.6" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.6.tgz#c8db9963ab4ce5b894222435482bd8ea854b7b5c" @@ -990,20 +782,6 @@ Lockfile: globals "^11.1.0" lodash "^4.17.10" - "@babel/traverse@^7.3.4", "@babel/traverse@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.0.tgz#14006967dd1d2b3494cdd650c686db9daf0ddada" - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.4.0" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.0" - "@babel/parser" "^7.4.0" - "@babel/types" "^7.4.0" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.11" - "@babel/types@7.0.0-beta.51": version "7.0.0-beta.51" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.51.tgz#d802b7b543b5836c778aa691797abf00f3d97ea9" @@ -1020,15 +798,7 @@ Lockfile: lodash "^4.17.10" to-fast-properties "^2.0.0" - "@babel/types@^7.0.0 <7.4.0": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.3.4.tgz#bf482eaeaffb367a28abbf9357a94963235d90ed" - dependencies: - esutils "^2.0.2" - lodash "^4.17.11" - to-fast-properties "^2.0.0" - - "@babel/types@^7.2.2", "@babel/types@^7.3.0", "@babel/types@^7.3.4", "@babel/types@^7.4.0": + "@babel/types@^7.3.0": version "7.4.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.0.tgz#670724f77d24cce6cc7d8cf64599d511d164894c" dependencies: @@ -1036,56 +806,45 @@ Lockfile: lodash "^4.17.11" to-fast-properties "^2.0.0" - "@iarna/toml@^2.2.0": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.3.tgz#f060bf6eaafae4d56a7dac618980838b0696e2ab" - - "@mrmlnc/readdir-enhanced@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + "@emotion/babel-utils@^0.6.4": + version "0.6.10" + resolved "https://registry.yarnpkg.com/@emotion/babel-utils/-/babel-utils-0.6.10.tgz#83dbf3dfa933fae9fc566e54fbb45f14674c6ccc" dependencies: - call-me-maybe "^1.0.1" - glob-to-regexp "^0.3.0" + "@emotion/hash" "^0.6.6" + "@emotion/memoize" "^0.6.6" + "@emotion/serialize" "^0.9.1" + convert-source-map "^1.5.1" + find-root "^1.1.0" + source-map "^0.7.2" - "@nodelib/fs.stat@^1.1.2": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + "@emotion/hash@^0.6.2", "@emotion/hash@^0.6.6": + version "0.6.6" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.6.6.tgz#62266c5f0eac6941fece302abad69f2ee7e25e44" - "@parcel/fs@^1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-1.11.0.tgz#fb8a2be038c454ad46a50dc0554c1805f13535cd" - dependencies: - "@parcel/utils" "^1.11.0" - mkdirp "^0.5.1" - rimraf "^2.6.2" + "@emotion/memoize@^0.6.1", "@emotion/memoize@^0.6.6": + version "0.6.6" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.6.6.tgz#004b98298d04c7ca3b4f50ca2035d4f60d2eed1b" - "@parcel/logger@^1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-1.11.0.tgz#91f39da14ba08dd85db247145698c62102960abb" + "@emotion/serialize@^0.9.1": + version "0.9.1" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.9.1.tgz#a494982a6920730dba6303eb018220a2b629c145" dependencies: - "@parcel/workers" "^1.11.0" - chalk "^2.1.0" - grapheme-breaker "^0.3.2" - ora "^2.1.0" - strip-ansi "^4.0.0" + "@emotion/hash" "^0.6.6" + "@emotion/memoize" "^0.6.6" + "@emotion/unitless" "^0.6.7" + "@emotion/utils" "^0.8.2" - "@parcel/utils@^1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-1.11.0.tgz#539e08fff8af3b26eca11302be80b522674b51ea" + "@emotion/stylis@^0.7.0": + version "0.7.1" + resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.7.1.tgz#50f63225e712d99e2b2b39c19c70fff023793ca5" - "@parcel/watcher@^1.12.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-1.12.0.tgz#769024b2a810b0c3b38c310f297d104c77df3660" - dependencies: - "@parcel/utils" "^1.11.0" - chokidar "^2.0.3" + "@emotion/unitless@^0.6.2", "@emotion/unitless@^0.6.7": + version "0.6.7" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.6.7.tgz#53e9f1892f725b194d5e6a1684a7b394df592397" - "@parcel/workers@^1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-1.11.0.tgz#7b8dcf992806f4ad2b6cecf629839c41c2336c59" - dependencies: - "@parcel/utils" "^1.11.0" - physical-cpu-count "^2.0.0" + "@emotion/utils@^0.8.2": + version "0.8.2" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.8.2.tgz#576ff7fb1230185b619a75d258cbc98f0867a8dc" "@sinonjs/commons@^1.0.2": version "1.3.0" @@ -1112,12 +871,12 @@ Lockfile: resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-2.1.3.tgz#62cf2a9b624edc795134135fe37fc2ae8ea36be3" "@types/babel-types@*", "@types/babel-types@^7.0.0": - version "7.0.4" - resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.4.tgz#bfd5b0d0d1ba13e351dff65b6e52783b816826c8" + version "7.0.6" + resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.6.tgz#a7cfaaeee96e90c4c54da0e580aaff3f4cffacac" "@types/babylon@^6.16.2": - version "6.16.4" - resolved "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.4.tgz#d3df72518b34a6a015d0dc58745cd238b5bb8ad2" + version "6.16.5" + resolved "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.5.tgz#1c5641db69eb8cdf378edd25b4be7754beeb48b4" dependencies: "@types/babel-types" "*" @@ -1129,14 +888,6 @@ Lockfile: version "11.13.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-11.13.0.tgz#b0df8d6ef9b5001b2be3a94d909ce3c29a80f9e1" - "@types/q@^1.5.1": - version "1.5.2" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" - - abab@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" - abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -1151,42 +902,27 @@ Lockfile: dependencies: acorn "^4.0.4" - acorn-globals@^4.1.0, acorn-globals@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.0.tgz#e3b6f8da3c1552a95ae627571f7dd6923bb54103" - dependencies: - acorn "^6.0.1" - acorn-walk "^6.0.1" - acorn-jsx@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" - acorn-walk@^6.0.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" - acorn@^3.1.0: version "3.3.0" - resolved "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" acorn@^4.0.4, acorn@~4.0.2: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" - acorn@^5.0.0, acorn@^5.5.3: - version "5.7.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" - - acorn@^6.0.1, acorn@^6.0.4, acorn@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" - acorn@^6.0.2: version "6.0.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.4.tgz#77377e7353b72ec5104550aa2d2097a2fd40b754" - ajv@^6.5.3, ajv@^6.5.5, ajv@^6.6.1: + acorn@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" + + ajv@^6.5.3, ajv@^6.6.1: version "6.6.1" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61" dependencies: @@ -1203,10 +939,6 @@ Lockfile: longest "^1.0.1" repeat-string "^1.5.2" - alphanum-sort@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" @@ -1227,56 +959,35 @@ Lockfile: version "4.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.0.0.tgz#70de791edf021404c3fd615aa89118ae0432e5a9" - ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" - ansi-to-html@^0.6.4: - version "0.6.10" - resolved "https://registry.yarnpkg.com/ansi-to-html/-/ansi-to-html-0.6.10.tgz#412114353bac2589a034db7ec5b371b8ba771131" - dependencies: - entities "^1.1.1" - - anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - append-transform@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" dependencies: default-require-extensions "^1.0.0" - aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - archy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" dependencies: sprintf-js "~1.0.2" + aria-query@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc" + dependencies: + ast-types-flow "0.0.7" + commander "^2.11.0" + arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -1295,14 +1006,17 @@ Lockfile: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - array-from@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/array-from/-/array-from-2.1.1.tgz#cfe9d8c26628b9dc5aecc62a9f5d8f1f352c1195" + array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" @@ -1319,30 +1033,6 @@ Lockfile: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - asn1.js@^4.0.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - - asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - dependencies: - safer-buffer "~2.1.0" - - assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - - assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - dependencies: - util "0.10.3" - assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" @@ -1351,18 +1041,14 @@ Lockfile: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + ast-types-flow@0.0.7, ast-types-flow@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - async-each@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.2.tgz#8b8a7ca2a658f927e9f307d6d1a42f4199f0f735" - - async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - async@1.x: version "1.5.2" resolved "http://registry.npmjs.org/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -1373,22 +1059,10 @@ Lockfile: dependencies: lodash "^4.17.10" - asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - atob@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - - aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - axios@^0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz#32d53e4851efdc0a11993b6cd000789d70c05102" @@ -1396,6 +1070,41 @@ Lockfile: follow-redirects "^1.3.0" is-buffer "^1.1.5" + axobject-query@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.2.tgz#ea187abe5b9002b377f925d8bf7d1c561adf38f9" + dependencies: + ast-types-flow "0.0.7" + + babel-plugin-emotion@^9.2.11: + version "9.2.11" + resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-9.2.11.tgz#319c005a9ee1d15bb447f59fe504c35fd5807728" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@emotion/babel-utils" "^0.6.4" + "@emotion/hash" "^0.6.2" + "@emotion/memoize" "^0.6.1" + "@emotion/stylis" "^0.7.0" + babel-plugin-macros "^2.0.0" + babel-plugin-syntax-jsx "^6.18.0" + convert-source-map "^1.5.0" + find-root "^1.1.0" + mkdirp "^0.5.1" + source-map "^0.5.7" + touch "^2.0.1" + + babel-plugin-macros@^2.0.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.5.1.tgz#4a119ac2c2e19b458c259b9accd7ee34fd57ec6f" + dependencies: + "@babel/runtime" "^7.4.2" + cosmiconfig "^5.2.0" + resolve "^1.10.0" + + babel-plugin-syntax-jsx@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + babel-runtime@^6.11.6, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -1403,7 +1112,7 @@ Lockfile: core-js "^2.4.0" regenerator-runtime "^0.11.0" - babel-types@^6.15.0, babel-types@^6.26.0: + babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: @@ -1412,14 +1121,6 @@ Lockfile: lodash "^4.17.4" to-fast-properties "^1.0.3" - babylon-walk@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/babylon-walk/-/babylon-walk-1.0.2.tgz#3b15a5ddbb482a78b4ce9c01c8ba181702d9d6ce" - dependencies: - babel-runtime "^6.11.6" - babel-types "^6.15.0" - lodash.clone "^4.5.0" - babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" @@ -1428,10 +1129,6 @@ Lockfile: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - base64-js@^1.0.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -1444,28 +1141,6 @@ Lockfile: mixin-deep "^1.2.0" pascalcase "^0.1.1" - bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - dependencies: - tweetnacl "^0.14.3" - - binary-extensions@^1.0.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14" - - bindings@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11" - - bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - - boolbase@^1.0.0, boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1481,7 +1156,7 @@ Lockfile: preserve "^0.2.0" repeat-element "^1.1.2" - braces@^2.3.1, braces@^2.3.2: + braces@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" dependencies: @@ -1496,88 +1171,10 @@ Lockfile: split-string "^3.0.2" to-regex "^3.0.1" - brfs@^1.2.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/brfs/-/brfs-1.6.1.tgz#b78ce2336d818e25eea04a0947cba6d4fb8849c3" - dependencies: - quote-stream "^1.0.1" - resolve "^1.1.5" - static-module "^2.2.0" - through2 "^2.0.0" - - brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - - browser-process-hrtime@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" - browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - - browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - - browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - - browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - - browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - - browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - dependencies: - pako "~1.0.5" - - browserslist@^4.0.0, browserslist@^4.1.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.5.2.tgz#36ad281f040af684555a23c780f5c2081c752df0" - dependencies: - caniuse-lite "^1.0.30000951" - electron-to-chromium "^1.3.116" - node-releases "^1.1.11" - browserslist@^4.3.4: version "4.3.5" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.5.tgz#1a917678acc07b55606748ea1adf9846ea8920f7" @@ -1586,26 +1183,10 @@ Lockfile: electron-to-chromium "^1.3.86" node-releases "^1.0.5" - buffer-equal@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-0.0.1.tgz#91bc74b11ea405bc916bc6aa908faafa5b4aac4b" - buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - - buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1614,10 +1195,6 @@ Lockfile: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.0.0.tgz#1e587d44b006620d90286cc7a9238bbc6129cab1" - builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -1640,10 +1217,6 @@ Lockfile: mkdirp "^0.5.1" write-file-atomic "^1.1.4" - call-me-maybe@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" - caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -1678,27 +1251,10 @@ Lockfile: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - caniuse-api@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" - dependencies: - browserslist "^4.0.0" - caniuse-lite "^1.0.0" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" - - caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000951: - version "1.0.30000955" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000955.tgz#360fdb9a1e41d6dd996130411334e44a39e4446d" - caniuse-lite@^1.0.30000912: version "1.0.30000921" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000921.tgz#7a607c1623444b22351d834e093aedda3c42fbe8" - caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - center-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" @@ -1717,17 +1273,7 @@ Lockfile: pathval "^1.1.0" type-detect "^4.0.5" - chalk@^1.1.3: - version "1.1.3" - resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - - chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1: + chalk@^2.0.0, chalk@^2.1.0: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -1735,14 +1281,6 @@ Lockfile: escape-string-regexp "^1.0.5" supports-color "^5.3.0" - chalk@^2.3.1, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chance@^1.0.4: version "1.0.18" resolved "https://registry.yarnpkg.com/chance/-/chance-1.0.18.tgz#79788fe6fca4c338bf404321c347eecc80f969ee" @@ -1757,59 +1295,10 @@ Lockfile: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - chart.js@^2.7.3: - version "2.7.3" - resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.7.3.tgz#cdb61618830bf216dc887e2f7b1b3c228b73c57e" - dependencies: - chartjs-color "^2.1.0" - moment "^2.10.2" - - chartjs-color-string@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/chartjs-color-string/-/chartjs-color-string-0.5.0.tgz#8d3752d8581d86687c35bfe2cb80ac5213ceb8c1" - dependencies: - color-name "^1.0.0" - - chartjs-color@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/chartjs-color/-/chartjs-color-2.2.0.tgz#84a2fb755787ed85c39dd6dd8c7b1d88429baeae" - dependencies: - chartjs-color-string "^0.5.0" - color-convert "^0.5.3" - check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - chokidar@^2.0.3: - version "2.1.5" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.5.tgz#0ae8434d962281a5f56c72869e79cb6d9d86ad4d" - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - - chownr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" - - cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" @@ -1823,6 +1312,10 @@ Lockfile: isobject "^3.0.0" static-extend "^0.1.1" + classnames@^2.2.5, classnames@^2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" + clean-css@^4.1.11: version "4.2.1" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17" @@ -1835,10 +1328,6 @@ Lockfile: dependencies: restore-cursor "^2.0.0" - cli-spinners@^1.1.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.3.1.tgz#002c1990912d0d59580c93bd36c056de99e4259a" - cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" @@ -1859,26 +1348,6 @@ Lockfile: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" - clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - - clone@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - - clones@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/clones/-/clones-1.2.0.tgz#b34c872045446a9f264ccceb7731bca05c529b71" - - coa@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" - dependencies: - "@types/q" "^1.5.1" - chalk "^2.4.1" - q "^1.1.2" - code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -1890,11 +1359,7 @@ Lockfile: map-visit "^1.0.0" object-visit "^1.0.0" - color-convert@^0.5.3: - version "0.5.3" - resolved "http://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz#bdb6c69ce660fadffe0b0007cc447e1b9f7282bd" - - color-convert@^1.9.0, color-convert@^1.9.1: + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" dependencies: @@ -1904,39 +1369,15 @@ Lockfile: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - color-name@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - - color-string@^1.5.2: - version "1.5.3" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - - color@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/color/-/color-3.1.0.tgz#d8e9fb096732875774c84bf922815df0308d0ffc" - dependencies: - color-convert "^1.9.1" - color-string "^1.5.2" - - combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" - dependencies: - delayed-stream "~1.0.0" - - command-exists@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.8.tgz#715acefdd1223b9c9b37110a149c6392c2852291" - commander@2.15.1: version "2.15.1" resolved "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - commander@^2.11.0, commander@^2.19.0, commander@^2.9.0: + commander@^2.11.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + + commander@^2.9.0: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" @@ -1956,32 +1397,6 @@ Lockfile: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - concat-stream@~1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - - config-chain@^1.1.12: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - - console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - dependencies: - date-now "^0.1.4" - - console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - constantinople@^3.0.1: version "3.1.2" resolved "https://registry.yarnpkg.com/constantinople/-/constantinople-3.1.2.tgz#d45ed724f57d3d10500017a7d3a889c1381ae647" @@ -1991,15 +1406,11 @@ Lockfile: babel-types "^6.26.0" babylon "^6.18.0" - constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - contains-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" - convert-source-map@^1.1.0, convert-source-map@^1.5.1: + convert-source-map@^1.1.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1: version "1.6.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" dependencies: @@ -2025,11 +1436,7 @@ Lockfile: version "3.0.0" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.0.0.tgz#a8dbfa978d29bfc263bfb66c556d0ca924c28957" - core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - - cosmiconfig@^5.0.0: + cosmiconfig@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.0.tgz#45038e4d28a7fe787203aede9c25bca4a08b12c8" dependencies: @@ -2038,33 +1445,17 @@ Lockfile: js-yaml "^3.13.0" parse-json "^4.0.0" - create-ecdh@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - - create-hash@^1.1.0, create-hash@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - - create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + create-emotion@^9.2.12: + version "9.2.12" + resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-9.2.12.tgz#0fc8e7f92c4f8bb924b0fef6781f66b1d07cb26f" dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" + "@emotion/hash" "^0.6.2" + "@emotion/memoize" "^0.6.1" + "@emotion/stylis" "^0.7.0" + "@emotion/unitless" "^0.6.2" + csstype "^2.5.2" + stylis "^3.5.0" + stylis-rule-sheet "^0.0.10" create-react-context@^0.2.2: version "0.2.3" @@ -2088,7 +1479,7 @@ Lockfile: shebang-command "^1.2.0" which "^1.2.9" - cross-spawn@^6.0.4, cross-spawn@^6.0.5: + cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" dependencies: @@ -2098,222 +1489,34 @@ Lockfile: shebang-command "^1.2.0" which "^1.2.9" - crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - - css-color-names@0.0.4, css-color-names@^0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - - css-declaration-sorter@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" - dependencies: - postcss "^7.0.1" - timsort "^0.3.0" - - css-modules-loader-core@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/css-modules-loader-core/-/css-modules-loader-core-1.1.0.tgz#5908668294a1becd261ae0a4ce21b0b551f21d16" - dependencies: - icss-replace-symbols "1.1.0" - postcss "6.0.1" - postcss-modules-extract-imports "1.1.0" - postcss-modules-local-by-default "1.2.0" - postcss-modules-scope "1.1.0" - postcss-modules-values "1.3.0" - - css-select-base-adapter@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" - - css-select@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.0.2.tgz#ab4386cec9e1f668855564b17c3733b43b2a5ede" - dependencies: - boolbase "^1.0.0" - css-what "^2.1.2" - domutils "^1.7.0" - nth-check "^1.0.2" - - css-selector-tokenizer@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz#a177271a8bca5019172f4f891fc6eed9cbf68d5d" - dependencies: - cssesc "^0.1.0" - fastparse "^1.1.1" - regexpu-core "^1.0.0" - - css-tree@1.0.0-alpha.28: - version "1.0.0-alpha.28" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.28.tgz#8e8968190d886c9477bc8d61e96f61af3f7ffa7f" - dependencies: - mdn-data "~1.1.0" - source-map "^0.5.3" - - css-tree@1.0.0-alpha.29: - version "1.0.0-alpha.29" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.29.tgz#3fa9d4ef3142cbd1c301e7664c1f352bd82f5a39" - dependencies: - mdn-data "~1.1.0" - source-map "^0.5.3" - - css-unit-converter@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.1.tgz#d9b9281adcfd8ced935bdbaba83786897f64e996" - - css-url-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/css-url-regex/-/css-url-regex-1.1.0.tgz#83834230cc9f74c457de59eebd1543feeb83b7ec" - - css-what@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" - - cssesc@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" - - cssesc@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-2.0.0.tgz#3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703" - cssfilter@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" - cssnano-preset-default@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz#51ec662ccfca0f88b396dcd9679cdb931be17f76" - dependencies: - css-declaration-sorter "^4.0.1" - cssnano-util-raw-cache "^4.0.1" - postcss "^7.0.0" - postcss-calc "^7.0.1" - postcss-colormin "^4.0.3" - postcss-convert-values "^4.0.1" - postcss-discard-comments "^4.0.2" - postcss-discard-duplicates "^4.0.2" - postcss-discard-empty "^4.0.1" - postcss-discard-overridden "^4.0.1" - postcss-merge-longhand "^4.0.11" - postcss-merge-rules "^4.0.3" - postcss-minify-font-values "^4.0.2" - postcss-minify-gradients "^4.0.2" - postcss-minify-params "^4.0.2" - postcss-minify-selectors "^4.0.2" - postcss-normalize-charset "^4.0.1" - postcss-normalize-display-values "^4.0.2" - postcss-normalize-positions "^4.0.2" - postcss-normalize-repeat-style "^4.0.2" - postcss-normalize-string "^4.0.2" - postcss-normalize-timing-functions "^4.0.2" - postcss-normalize-unicode "^4.0.1" - postcss-normalize-url "^4.0.1" - postcss-normalize-whitespace "^4.0.2" - postcss-ordered-values "^4.1.2" - postcss-reduce-initial "^4.0.3" - postcss-reduce-transforms "^4.0.2" - postcss-svgo "^4.0.2" - postcss-unique-selectors "^4.0.1" - - cssnano-util-get-arguments@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" - - cssnano-util-get-match@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" + csstype@^2.5.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.3.tgz#b701e5968245bf9b08d54ac83d00b624e622a9fa" - cssnano-util-raw-cache@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" - dependencies: - postcss "^7.0.0" - - cssnano-util-same-parent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" - - cssnano@^4.0.0, cssnano@^4.1.9: - version "4.1.10" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" - dependencies: - cosmiconfig "^5.0.0" - cssnano-preset-default "^4.0.7" - is-resolvable "^1.0.0" - postcss "^7.0.0" - - csso@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/csso/-/csso-3.5.1.tgz#7b9eb8be61628973c1b261e169d2f024008e758b" - dependencies: - css-tree "1.0.0-alpha.29" - - cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0", cssom@^0.3.4: - version "0.3.6" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.6.tgz#f85206cee04efa841f3c5982a74ba96ab20d65ad" - - cssstyle@^1.0.0, cssstyle@^1.1.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.2.2.tgz#427ea4d585b18624f6fdbf9de7a2a1a3ba713077" - dependencies: - cssom "0.3.x" - - dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - - data-urls@^1.0.0, data-urls@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" - dependencies: - abab "^2.0.0" - whatwg-mimetype "^2.2.0" - whatwg-url "^7.0.0" - - date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - - deasync@^0.1.14: - version "0.1.14" - resolved "https://registry.yarnpkg.com/deasync/-/deasync-0.1.14.tgz#232ea2252b443948cad033d792eb3b24b0a3d828" - dependencies: - bindings "~1.2.1" - node-addon-api "^1.6.0" + damerau-levenshtein@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" debug-log@^1.0.1: version "1.0.1" resolved "http://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" - debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - dependencies: - ms "2.0.0" - debug@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" dependencies: ms "2.0.0" + debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + debug@^3.1.0, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -2340,10 +1543,6 @@ Lockfile: dependencies: type-detect "^4.0.0" - deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -2354,12 +1553,6 @@ Lockfile: dependencies: strip-bom "^2.0.0" - defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - dependencies: - clone "^1.0.2" - define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -2385,45 +1578,10 @@ Lockfile: is-descriptor "^1.0.2" isobject "^3.0.1" - delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - - delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - - depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - - des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - - destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - - detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - diff@3.5.0, diff@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - doctrine@1.5.0: version "1.5.0" resolved "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -2441,103 +1599,26 @@ Lockfile: version "1.1.0" resolved "https://registry.yarnpkg.com/doctypes/-/doctypes-1.1.0.tgz#ea80b106a87538774e8a3a4a5afe293de489e0a9" - dom-serializer@0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + dom-helpers@^3.3.1: + version "3.4.0" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" dependencies: - domelementtype "^1.3.0" - entities "^1.1.1" - - domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - - domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" - - domexception@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" - dependencies: - webidl-conversions "^4.0.2" - - domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - dependencies: - domelementtype "1" - - domutils@^1.5.1, domutils@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - dependencies: - dom-serializer "0" - domelementtype "1" - - dot-prop@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - dependencies: - is-obj "^1.0.0" - - dotenv-expand@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-4.2.0.tgz#def1f1ca5d6059d24a766e587942c21106ce1275" - - dotenv@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef" - - duplexer2@~0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" - dependencies: - readable-stream "^2.0.2" - - ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - - editorconfig@^0.15.2: - version "0.15.3" - resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5" - dependencies: - commander "^2.19.0" - lru-cache "^4.1.5" - semver "^5.6.0" - sigmund "^1.0.1" - - ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - - electron-to-chromium@^1.3.116: - version "1.3.121" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.121.tgz#761aaec1ec947b8ed3e9538177598d8f6ca3b5bd" + "@babel/runtime" "^7.1.2" electron-to-chromium@^1.3.86: version "1.3.91" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.91.tgz#d74437a753b122aa6eca7c722055004d3627635d" - elliptic@^6.0.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" + emoji-regex@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + emotion@^9.1.2: + version "9.2.12" + resolved "https://registry.yarnpkg.com/emotion/-/emotion-9.2.12.tgz#53925aaa005614e65c6e43db8243c843574d1ea9" + dependencies: + babel-plugin-emotion "^9.2.11" + create-emotion "^9.2.12" encoding@^0.1.11: version "0.1.12" @@ -2545,17 +1626,13 @@ Lockfile: dependencies: iconv-lite "~0.4.13" - entities@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" dependencies: is-arrayish "^0.2.1" - es-abstract@^1.12.0, es-abstract@^1.5.1: + es-abstract@^1.11.0, es-abstract@^1.12.0, es-abstract@^1.7.0: version "1.13.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" dependencies: @@ -2566,17 +1643,7 @@ Lockfile: is-regex "^1.0.4" object-keys "^1.0.12" - es-abstract@^1.6.1: - version "1.12.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - - es-to-primitive@^1.1.1, es-to-primitive@^1.2.0: + es-to-primitive@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" dependencies: @@ -2584,11 +1651,7 @@ Lockfile: is-date-object "^1.0.1" is-symbol "^1.0.2" - escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - - escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -2603,28 +1666,6 @@ Lockfile: optionalDependencies: source-map "~0.2.0" - escodegen@^1.11.0, escodegen@^1.8.1, escodegen@^1.9.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.1.tgz#c485ff8d6b4cdb89e27f4a856e91f118401ca510" - dependencies: - esprima "^3.1.3" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - - escodegen@~1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" - dependencies: - esprima "^3.1.3" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - eslint-config-airbnb-base@^13.1.0: version "13.1.0" resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.1.0.tgz#b5a1b480b80dfad16433d6c4ad84e6605052c05c" @@ -2633,6 +1674,14 @@ Lockfile: object.assign "^4.1.0" object.entries "^1.0.4" + eslint-config-airbnb@^17.1.0: + version "17.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-17.1.0.tgz#3964ed4bc198240315ff52030bf8636f42bc4732" + dependencies: + eslint-config-airbnb-base "^13.1.0" + object.assign "^4.1.0" + object.entries "^1.0.4" + eslint-import-resolver-node@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" @@ -2662,6 +1711,31 @@ Lockfile: read-pkg-up "^2.0.0" resolve "^1.6.0" + eslint-plugin-jsx-a11y@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.1.tgz#4ebba9f339b600ff415ae4166e3e2e008831cf0c" + dependencies: + aria-query "^3.0.0" + array-includes "^3.0.3" + ast-types-flow "^0.0.7" + axobject-query "^2.0.2" + damerau-levenshtein "^1.0.4" + emoji-regex "^7.0.2" + has "^1.0.3" + jsx-ast-utils "^2.0.1" + + eslint-plugin-react@^7.12.4: + version "7.12.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.12.4.tgz#b1ecf26479d61aee650da612e425c53a99f48c8c" + dependencies: + array-includes "^3.0.3" + doctrine "^2.1.0" + has "^1.0.3" + jsx-ast-utils "^2.0.1" + object.fromentries "^2.0.0" + prop-types "^15.6.2" + resolve "^1.9.0" + eslint-restricted-globals@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" @@ -2735,10 +1809,6 @@ Lockfile: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - esprima@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -2759,7 +1829,7 @@ Lockfile: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: + estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -2771,21 +1841,6 @@ Lockfile: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - - events@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88" - - evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - execa@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" @@ -2835,10 +1890,6 @@ Lockfile: assign-symbols "^1.0.0" is-extendable "^1.0.1" - extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - external-editor@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" @@ -2866,14 +1917,6 @@ Lockfile: snapdragon "^0.8.1" to-regex "^3.0.1" - extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - - extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - factory-girl@^5.0.4: version "5.0.4" resolved "https://registry.yarnpkg.com/factory-girl/-/factory-girl-5.0.4.tgz#378caabe03aac7b327d47d9e28b4f02ced0c3c0b" @@ -2881,30 +1924,10 @@ Lockfile: babel-runtime "^6.11.6" chance "^1.0.4" - falafel@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/falafel/-/falafel-2.1.0.tgz#96bb17761daba94f46d001738b3cedf3a67fe06c" - dependencies: - acorn "^5.0.0" - foreach "^2.0.5" - isarray "0.0.1" - object-keys "^1.0.6" - fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - fast-glob@^2.2.2: - version "2.2.6" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.6.tgz#a5d5b697ec8deda468d85a74035290a025a95295" - dependencies: - "@mrmlnc/readdir-enhanced" "^2.2.1" - "@nodelib/fs.stat" "^1.1.2" - glob-parent "^3.1.0" - is-glob "^4.0.0" - merge2 "^1.2.3" - micromatch "^3.1.10" - fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -2913,10 +1936,6 @@ Lockfile: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - fastparse@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" - fbjs@^0.8.0: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" @@ -2946,10 +1965,6 @@ Lockfile: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - filesize@^3.6.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" - fill-range@^2.1.0: version "2.2.4" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" @@ -2985,6 +2000,10 @@ Lockfile: make-dir "^2.0.0" pkg-dir "^3.0.0" + find-root@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -3035,10 +2054,6 @@ Lockfile: dependencies: for-in "^1.0.1" - foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - foreground-child@^1.5.3, foreground-child@^1.5.6: version "1.5.6" resolved "http://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" @@ -3046,46 +2061,17 @@ Lockfile: cross-spawn "^4" signal-exit "^3.0.0" - forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - - form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" dependencies: map-cache "^0.2.2" - fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - - fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - dependencies: - minipass "^2.2.1" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - fsevents@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.7.tgz#4851b664a3783e52003b3c66eb0eee1074933aa4" - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - - function-bind@^1.1.0, function-bind@^1.1.1: + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -3093,19 +2079,6 @@ Lockfile: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" @@ -3114,10 +2087,6 @@ Lockfile: version "2.0.0" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - get-port@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" - get-stream@^3.0.0: version "3.0.0" resolved "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -3126,12 +2095,6 @@ Lockfile: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" @@ -3145,17 +2108,6 @@ Lockfile: dependencies: is-glob "^2.0.0" - glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - - glob-to-regexp@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" - glob@7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -3177,7 +2129,7 @@ Lockfile: once "^1.3.0" path-is-absolute "^1.0.0" - glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.2, glob@^7.1.3: + glob@^7.0.5, glob@^7.0.6, glob@^7.1.2: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" dependencies: @@ -3196,13 +2148,6 @@ Lockfile: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - grapheme-breaker@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/grapheme-breaker/-/grapheme-breaker-0.3.2.tgz#5b9e6b78c3832452d2ba2bb1cb830f96276410ac" - dependencies: - brfs "^1.2.0" - unicode-trie "^0.3.1" - growl@1.10.5: version "1.10.5" resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" @@ -3221,23 +2166,6 @@ Lockfile: optionalDependencies: uglify-js "^3.1.4" - har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - - har-validator@~5.1.0: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - dependencies: - ajv "^6.5.5" - har-schema "^2.0.0" - - has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" @@ -3250,10 +2178,6 @@ Lockfile: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -3281,34 +2205,16 @@ Lockfile: is-number "^3.0.0" kind-of "^4.0.0" - has@^1.0.0, has@^1.0.1, has@^1.0.3: + has@^1.0.1, has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" dependencies: function-bind "^1.1.1" - hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - - hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - hex-color-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" - history@^4.9.0: version "4.9.0" resolved "https://registry.yarnpkg.com/history/-/history-4.9.0.tgz#84587c2068039ead8af769e9d6a6860a14fa1bca" @@ -3320,14 +2226,6 @@ Lockfile: tiny-warning "^1.0.0" value-equal "^0.4.0" - hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b" @@ -3338,93 +2236,12 @@ Lockfile: version "2.7.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - hsl-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" - - hsla-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" - - html-comment-regex@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" - - html-encoding-sniffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - dependencies: - whatwg-encoding "^1.0.1" - - html-tags@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-1.2.0.tgz#c78de65b5663aa597989dd2b7ab49200d7e4db98" - - htmlnano@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/htmlnano/-/htmlnano-0.2.3.tgz#ff654a641e8006c893bdd9ad4988ee4ab664449a" - dependencies: - cssnano "^4.1.9" - normalize-html-whitespace "^0.2.0" - object-assign "^4.0.1" - posthtml "^0.11.3" - posthtml-render "^1.1.4" - svgo "^1.0.5" - terser "^3.16.1" - uncss "^0.16.2" - - htmlparser2@^3.9.2: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - - http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - - http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - - https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - - iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: + iconv-lite@^0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" dependencies: safer-buffer ">= 2.1.2 < 3" - icss-replace-symbols@1.1.0, icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - - ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - - ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - dependencies: - minimatch "^3.0.4" - ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -3440,14 +2257,6 @@ Lockfile: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - - indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3455,18 +2264,10 @@ Lockfile: once "^1.3.0" wrappy "1" - inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: + inherits@2: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - - ini@^1.3.4, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - inquirer@^6.1.0: version "6.2.1" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.1.tgz#9943fc4882161bdb0b0c9276769c75b32dbfcd52" @@ -3495,10 +2296,6 @@ Lockfile: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "http://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -3515,16 +2312,6 @@ Lockfile: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - is-arrayish@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" - - is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - dependencies: - binary-extensions "^1.0.0" - is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -3539,21 +2326,10 @@ Lockfile: dependencies: builtin-modules "^1.0.0" - is-callable@^1.1.3, is-callable@^1.1.4: + is-callable@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - is-color-stop@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" - dependencies: - css-color-names "^0.0.4" - hex-color-regex "^1.1.0" - hsl-regex "^1.0.0" - hsla-regex "^1.0.0" - rgb-regex "^1.0.1" - rgba-regex "^1.0.0" - is-data-descriptor@^0.1.4: version "0.1.4" resolved "http://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -3621,10 +2397,6 @@ Lockfile: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -3641,24 +2413,6 @@ Lockfile: dependencies: is-extglob "^1.0.0" - is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - dependencies: - is-extglob "^2.1.0" - - is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - dependencies: - is-extglob "^2.1.1" - - is-html@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-html/-/is-html-1.1.0.tgz#e04f1c18d39485111396f9a0273eab51af218464" - dependencies: - html-tags "^1.0.0" - is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" @@ -3679,10 +2433,6 @@ Lockfile: version "4.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - is-obj@^1.0.0: - version "1.0.1" - resolved "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -3707,34 +2457,16 @@ Lockfile: dependencies: has "^1.0.1" - is-resolvable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - is-svg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75" - dependencies: - html-comment-regex "^1.1.0" - is-symbol@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" dependencies: has-symbols "^1.0.0" - is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - - is-url@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" - is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -3743,15 +2475,11 @@ Lockfile: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + isarray@1.0.0, isarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -3759,7 +2487,7 @@ Lockfile: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - isobject@^2.0.0, isobject@^2.1.0: + isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" dependencies: @@ -3776,10 +2504,6 @@ Lockfile: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" - isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" @@ -3850,16 +2574,6 @@ Lockfile: which "^1.1.1" wordwrap "^1.0.0" - js-beautify@^1.8.9: - version "1.9.1" - resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.9.1.tgz#6f9ef915f5d8d92b9f907606fce63795884c8040" - dependencies: - config-chain "^1.1.12" - editorconfig "^0.15.2" - glob "^7.1.3" - mkdirp "~0.5.0" - nopt "~4.0.1" - js-levenshtein@^1.1.3: version "1.1.4" resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e" @@ -3883,79 +2597,13 @@ Lockfile: argparse "^1.0.7" esprima "^4.0.0" - js-yaml@^3.10.0, js-yaml@^3.13.0: + js-yaml@^3.13.0: version "3.13.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.0.tgz#38ee7178ac0eea2c97ff6d96fff4b18c7d8cf98e" dependencies: argparse "^1.0.7" esprima "^4.0.0" - jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - - jsdom@^11.3.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" - dependencies: - abab "^2.0.0" - acorn "^5.5.3" - acorn-globals "^4.1.0" - array-equal "^1.0.0" - cssom ">= 0.3.2 < 0.4.0" - cssstyle "^1.0.0" - data-urls "^1.0.0" - domexception "^1.0.1" - escodegen "^1.9.1" - html-encoding-sniffer "^1.0.2" - left-pad "^1.3.0" - nwsapi "^2.0.7" - parse5 "4.0.0" - pn "^1.1.0" - request "^2.87.0" - request-promise-native "^1.0.5" - sax "^1.2.4" - symbol-tree "^3.2.2" - tough-cookie "^2.3.4" - w3c-hr-time "^1.0.1" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.3" - whatwg-mimetype "^2.1.0" - whatwg-url "^6.4.1" - ws "^5.2.0" - xml-name-validator "^3.0.0" - - jsdom@^14.0.0: - version "14.0.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-14.0.0.tgz#c7f1441ebcc57902d08d5fb2f6ba2baf746da7c6" - dependencies: - abab "^2.0.0" - acorn "^6.0.4" - acorn-globals "^4.3.0" - array-equal "^1.0.0" - cssom "^0.3.4" - cssstyle "^1.1.1" - data-urls "^1.1.0" - domexception "^1.0.1" - escodegen "^1.11.0" - html-encoding-sniffer "^1.0.2" - nwsapi "^2.0.9" - parse5 "5.1.0" - pn "^1.1.0" - request "^2.88.0" - request-promise-native "^1.0.5" - saxes "^3.1.5" - symbol-tree "^3.2.2" - tough-cookie "^2.5.0" - w3c-hr-time "^1.0.1" - w3c-xmlserializer "^1.0.1" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^7.0.0" - ws "^6.1.2" - xml-name-validator "^3.0.0" - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -3972,39 +2620,16 @@ Lockfile: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - - json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - dependencies: - minimist "^1.2.0" - json5@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" dependencies: minimist "^1.2.0" - jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - jstransformer@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/jstransformer/-/jstransformer-1.0.0.tgz#ed8bf0921e2f3f1ed4d5c1a44f68709ed24722c3" @@ -4012,6 +2637,12 @@ Lockfile: is-promise "^2.0.0" promise "^7.0.1" + jsx-ast-utils@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" + dependencies: + array-includes "^3.0.3" + just-extend@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-3.0.0.tgz#cee004031eaabf6406da03a7b84e4fe9d78ef288" @@ -4050,10 +2681,6 @@ Lockfile: dependencies: invert-kv "^1.0.0" - left-pad@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" - levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -4094,36 +2721,14 @@ Lockfile: p-locate "^3.0.0" path-exists "^3.0.0" - lodash.clone@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" - lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - - lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - - lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - - lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5: + lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - log-symbols@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - dependencies: - chalk "^2.0.1" - lolex@^2.3.2, lolex@^2.7.5: version "2.7.5" resolved "https://registry.yarnpkg.com/lolex/-/lolex-2.7.5.tgz#113001d56bfc7e02d56e36291cc5c413d1aa0733" @@ -4138,19 +2743,13 @@ Lockfile: dependencies: js-tokens "^3.0.0 || ^4.0.0" - lru-cache@^4.0.1, lru-cache@^4.1.5: + lru-cache@^4.0.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" dependencies: pseudomap "^1.0.2" yallist "^2.1.2" - magic-string@^0.22.4: - version "0.22.5" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" - dependencies: - vlq "^0.2.2" - magic-string@^0.25.2: version "0.25.2" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.2.tgz#139c3a729515ec55e96e69e82a11fe890a293ad9" @@ -4188,29 +2787,15 @@ Lockfile: version "0.1.1" resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3" - md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - - mdn-data@~1.1.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.1.4.tgz#50b5d4ffc4575276573c4eedb8780812a8419f01" - mem@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" dependencies: mimic-fn "^1.0.0" - merge-source-map@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.0.4.tgz#a5de46538dae84d4114cc5ea02b4772a6346701f" - dependencies: - source-map "^0.5.6" + memoize-one@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.0.2.tgz#6aba5276856d72fb44ead3efab86432f94ba203d" merge-source-map@^1.1.0: version "1.1.0" @@ -4218,10 +2803,6 @@ Lockfile: dependencies: source-map "^0.6.1" - merge2@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" - micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" @@ -4240,7 +2821,7 @@ Lockfile: parse-glob "^3.0.4" regex-cache "^0.4.2" - micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: + micromatch@^3.1.10: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" dependencies: @@ -4258,39 +2839,10 @@ Lockfile: snapdragon "^0.8.1" to-regex "^3.0.2" - miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - - mime-db@~1.37.0: - version "1.37.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" - - mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.21" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" - dependencies: - mime-db "~1.37.0" - - mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - - minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - "minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -4301,7 +2853,7 @@ Lockfile: version "0.0.8" resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - minimist@^1.1.3, minimist@^1.2.0: + minimist@^1.2.0: version "1.2.0" resolved "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -4309,19 +2861,6 @@ Lockfile: version "0.0.10" resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - minipass@^2.2.1, minipass@^2.3.4: - version "2.3.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - - minizlib@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" - dependencies: - minipass "^2.2.1" - mixin-deep@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" @@ -4329,7 +2868,7 @@ Lockfile: for-in "^1.0.2" is-extendable "^1.0.1" - mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: + mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -4355,10 +2894,6 @@ Lockfile: version "2.1.0" resolved "https://registry.yarnpkg.com/module-alias/-/module-alias-2.1.0.tgz#c36d4fd15f7f9d7112f62fa015385e7b65a286c1" - moment@^2.10.2, moment@^2.23.0: - version "2.23.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.23.0.tgz#759ea491ac97d54bac5ad776996e2a58cc1bc225" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4371,10 +2906,6 @@ Lockfile: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - nan@^2.9.2: - version "2.11.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -4395,14 +2926,6 @@ Lockfile: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - needle@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" - dependencies: - debug "^2.1.2" - iconv-lite "^0.4.4" - sax "^1.2.4" - nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -4417,10 +2940,6 @@ Lockfile: path-to-regexp "^1.7.0" text-encoding "^0.6.4" - node-addon-api@^1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.6.2.tgz#d8aad9781a5cfc4132cc2fecdbdd982534265217" - node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -4428,85 +2947,27 @@ Lockfile: encoding "^0.1.11" is-stream "^1.0.1" - node-forge@^0.7.1: - version "0.7.6" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.6.tgz#fdf3b418aee1f94f0ef642cd63486c77ca9724ac" - - node-libs-browser@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.0.tgz#c72f60d9d46de08a940dedbb25f3ffa2f9bbaa77" - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^3.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.0" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.11.0" - vm-browserify "0.0.4" - node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" - node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - node-releases@^1.0.5: version "1.1.1" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.1.tgz#8fff8aea1cfcad1fb4205f805149054fbf73cafd" dependencies: semver "^5.3.0" - node-releases@^1.1.11: - version "1.1.12" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.12.tgz#1d6baf544316b5422fcd35efe18708370a4e7637" - dependencies: - semver "^5.3.0" - nopt@3.x: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: abbrev "1" - nopt@^4.0.1, nopt@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + nopt@~1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" dependencies: abbrev "1" - osenv "^0.1.4" - - normalize-html-whitespace@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/normalize-html-whitespace/-/normalize-html-whitespace-0.2.0.tgz#101722f6423551c75cdb8f9d104ff850daf1e10e" normalize-package-data@^2.3.2: version "2.4.0" @@ -4517,62 +2978,22 @@ Lockfile: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" - normalize-path@^2.0.1, normalize-path@^2.1.1: + normalize-path@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" dependencies: remove-trailing-separator "^1.0.1" - normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - - normalize-url@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" - - npm-bundled@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" - - npm-packlist@^1.1.6: - version "1.1.12" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" dependencies: path-key "^2.0.0" - npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - - nth-check@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - dependencies: - boolbase "~1.0.0" - number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - nwsapi@^2.0.7, nwsapi@^2.0.9: - version "2.1.2" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.1.2.tgz#c360ee8745aa318d8a7c8c8095decc4e373338aa" - dependencies: - jsdom "^14.0.0" - nyc@^12.0.2: version "12.0.2" resolved "https://registry.yarnpkg.com/nyc/-/nyc-12.0.2.tgz#8a4a4ed690966c11ec587ff87eea0c12c974ba99" @@ -4605,10 +3026,6 @@ Lockfile: yargs "11.1.0" yargs-parser "^8.0.0" - oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -4621,17 +3038,9 @@ Lockfile: define-property "^0.2.5" kind-of "^3.0.3" - object-inspect@~1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.4.1.tgz#37ffb10e71adaf3748d05f713b4c9452f402cbc4" - object-keys@^1.0.11, object-keys@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" - - object-keys@^1.0.6: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.0.tgz#11bd22348dd2e096a045ab06f6c85bcc340fa032" + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" object-visit@^1.0.0: version "1.0.1" @@ -4649,20 +3058,22 @@ Lockfile: object-keys "^1.0.11" object.entries@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.0.tgz#2024fc6d6ba246aee38bdb0ffd5cfbcf371b7519" dependencies: - define-properties "^1.1.2" - es-abstract "^1.6.1" - function-bind "^1.1.0" - has "^1.0.1" + define-properties "^1.1.3" + es-abstract "^1.12.0" + function-bind "^1.1.1" + has "^1.0.3" - object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + object.fromentries@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.0.tgz#49a543d92151f8277b3ac9600f1e930b189d30ab" dependencies: define-properties "^1.1.2" - es-abstract "^1.5.1" + es-abstract "^1.11.0" + function-bind "^1.1.1" + has "^1.0.1" object.omit@^2.0.0: version "2.0.1" @@ -4677,21 +3088,6 @@ Lockfile: dependencies: isobject "^3.0.1" - object.values@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.0.tgz#bf6810ef5da3e5325790eaaa2be213ea84624da9" - dependencies: - define-properties "^1.1.3" - es-abstract "^1.12.0" - function-bind "^1.1.1" - has "^1.0.3" - - on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - dependencies: - ee-first "1.1.1" - once@1.x, once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -4704,12 +3100,6 @@ Lockfile: dependencies: mimic-fn "^1.0.0" - opn@^5.1.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" - dependencies: - is-wsl "^1.1.0" - optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -4728,22 +3118,7 @@ Lockfile: type-check "~0.3.2" wordwrap "~1.0.0" - ora@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-2.1.0.tgz#6caf2830eb924941861ec53a173799e008b51e5b" - dependencies: - chalk "^2.3.1" - cli-cursor "^2.1.0" - cli-spinners "^1.1.0" - log-symbols "^2.2.0" - strip-ansi "^4.0.0" - wcwidth "^1.0.1" - - os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - - os-homedir@^1.0.0, os-homedir@^1.0.1: + os-homedir@^1.0.1: version "1.0.2" resolved "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -4755,17 +3130,10 @@ Lockfile: lcid "^1.0.0" mem "^1.1.0" - os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: + os-tmpdir@~1.0.2: version "1.0.2" resolved "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -4802,87 +3170,6 @@ Lockfile: version "2.1.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.1.0.tgz#c1a0f1030e97de018bb2c718929d2af59463e505" - pako@^0.2.5: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" - - pako@~1.0.5: - version "1.0.10" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" - - parcel-bundler@^1.12.3: - version "1.12.3" - resolved "https://registry.yarnpkg.com/parcel-bundler/-/parcel-bundler-1.12.3.tgz#2bbf70bfa2d06097f071653285040bd125684d09" - dependencies: - "@babel/code-frame" "^7.0.0 <7.4.0" - "@babel/core" "^7.0.0 <7.4.0" - "@babel/generator" "^7.0.0 <7.4.0" - "@babel/parser" "^7.0.0 <7.4.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0 <7.4.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0 <7.4.0" - "@babel/plugin-transform-react-jsx" "^7.0.0 <7.4.0" - "@babel/preset-env" "^7.0.0 <7.4.0" - "@babel/runtime" "^7.0.0 <7.4.0" - "@babel/template" "^7.0.0 <7.4.0" - "@babel/traverse" "^7.0.0 <7.4.0" - "@babel/types" "^7.0.0 <7.4.0" - "@iarna/toml" "^2.2.0" - "@parcel/fs" "^1.11.0" - "@parcel/logger" "^1.11.0" - "@parcel/utils" "^1.11.0" - "@parcel/watcher" "^1.12.0" - "@parcel/workers" "^1.11.0" - ansi-to-html "^0.6.4" - babylon-walk "^1.0.2" - browserslist "^4.1.0" - chalk "^2.1.0" - clone "^2.1.1" - command-exists "^1.2.6" - commander "^2.11.0" - cross-spawn "^6.0.4" - css-modules-loader-core "^1.1.0" - cssnano "^4.0.0" - deasync "^0.1.14" - dotenv "^5.0.0" - dotenv-expand "^4.2.0" - fast-glob "^2.2.2" - filesize "^3.6.0" - get-port "^3.2.0" - htmlnano "^0.2.2" - is-glob "^4.0.0" - is-url "^1.2.2" - js-yaml "^3.10.0" - json5 "^1.0.1" - micromatch "^3.0.4" - mkdirp "^0.5.1" - node-forge "^0.7.1" - node-libs-browser "^2.0.0" - opn "^5.1.0" - postcss "^7.0.11" - postcss-value-parser "^3.3.1" - posthtml "^0.11.2" - posthtml-parser "^0.4.0" - posthtml-render "^1.1.3" - resolve "^1.4.0" - semver "^5.4.1" - serialize-to-js "^1.1.1" - serve-static "^1.12.4" - source-map "0.6.1" - terser "^3.7.3" - v8-compile-cache "^2.0.0" - ws "^5.1.1" - - parse-asn1@^5.0.0: - version "5.1.4" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.4.tgz#37f6628f823fbdeb2273b4d540434a22f3ef1fcc" - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" @@ -4905,30 +3192,10 @@ Lockfile: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" - parse5@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" - - parse5@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" - - parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - - path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -4979,24 +3246,10 @@ Lockfile: version "1.1.0" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - pbkdf2@^3.0.3: - version "3.0.17" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - physical-cpu-count@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/physical-cpu-count/-/physical-cpu-count-2.0.0.tgz#18de2f97e4bf7a9551ad7511942b5496f7aba660" - pify@^2.0.0: version "2.3.0" resolved "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -5037,333 +3290,10 @@ Lockfile: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" - pn@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" - posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - postcss-calc@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.1.tgz#36d77bab023b0ecbb9789d84dcb23c4941145436" - dependencies: - css-unit-converter "^1.1.1" - postcss "^7.0.5" - postcss-selector-parser "^5.0.0-rc.4" - postcss-value-parser "^3.3.1" - - postcss-colormin@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" - dependencies: - browserslist "^4.0.0" - color "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-convert-values@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-discard-comments@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" - dependencies: - postcss "^7.0.0" - - postcss-discard-duplicates@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" - dependencies: - postcss "^7.0.0" - - postcss-discard-empty@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" - dependencies: - postcss "^7.0.0" - - postcss-discard-overridden@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" - dependencies: - postcss "^7.0.0" - - postcss-merge-longhand@^4.0.11: - version "4.0.11" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" - dependencies: - css-color-names "0.0.4" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - stylehacks "^4.0.0" - - postcss-merge-rules@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" - dependencies: - browserslist "^4.0.0" - caniuse-api "^3.0.0" - cssnano-util-same-parent "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - vendors "^1.0.0" - - postcss-minify-font-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-minify-gradients@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" - dependencies: - cssnano-util-get-arguments "^4.0.0" - is-color-stop "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-minify-params@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" - dependencies: - alphanum-sort "^1.0.0" - browserslist "^4.0.0" - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - uniqs "^2.0.0" - - postcss-minify-selectors@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" - dependencies: - alphanum-sort "^1.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - - postcss-modules-extract-imports@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" - dependencies: - postcss "^6.0.1" - - postcss-modules-local-by-default@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - - postcss-modules-scope@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - - postcss-modules-values@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" - dependencies: - icss-replace-symbols "^1.1.0" - postcss "^6.0.1" - - postcss-normalize-charset@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" - dependencies: - postcss "^7.0.0" - - postcss-normalize-display-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" - dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-normalize-positions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" - dependencies: - cssnano-util-get-arguments "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-normalize-repeat-style@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" - dependencies: - cssnano-util-get-arguments "^4.0.0" - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-normalize-string@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" - dependencies: - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-normalize-timing-functions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" - dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-normalize-unicode@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" - dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-normalize-url@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^3.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-normalize-whitespace@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-ordered-values@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" - dependencies: - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-reduce-initial@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" - dependencies: - browserslist "^4.0.0" - caniuse-api "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - - postcss-reduce-transforms@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" - dependencies: - cssnano-util-get-match "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - - postcss-selector-parser@3.1.1, postcss-selector-parser@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz#4f875f4afb0c96573d5cf4d74011aee250a7e865" - dependencies: - dot-prop "^4.1.1" - indexes-of "^1.0.1" - uniq "^1.0.1" - - postcss-selector-parser@^5.0.0-rc.4: - version "5.0.0" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz#249044356697b33b64f1a8f7c80922dddee7195c" - dependencies: - cssesc "^2.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - - postcss-svgo@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.2.tgz#17b997bc711b333bab143aaed3b8d3d6e3d38258" - dependencies: - is-svg "^3.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - svgo "^1.0.0" - - postcss-unique-selectors@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" - dependencies: - alphanum-sort "^1.0.0" - postcss "^7.0.0" - uniqs "^2.0.0" - - postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" - - postcss@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.1.tgz#000dbd1f8eef217aa368b9a212c5fc40b2a8f3f2" - dependencies: - chalk "^1.1.3" - source-map "^0.5.6" - supports-color "^3.2.3" - - postcss@^6.0.1, postcss@^6.0.14: - version "6.0.23" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" - dependencies: - chalk "^2.4.1" - source-map "^0.6.1" - supports-color "^5.4.0" - - postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.5: - version "7.0.14" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.14.tgz#4527ed6b1ca0d82c53ce5ec1a2041c2346bbd6e5" - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - - posthtml-parser@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/posthtml-parser/-/posthtml-parser-0.3.3.tgz#3fe986fca9f00c0f109d731ba590b192f26e776d" - dependencies: - htmlparser2 "^3.9.2" - isobject "^2.1.0" - object-assign "^4.1.1" - - posthtml-parser@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/posthtml-parser/-/posthtml-parser-0.4.1.tgz#95b78fef766fbbe0a6f861b6e95582bc3d1ff933" - dependencies: - htmlparser2 "^3.9.2" - object-assign "^4.1.1" - - posthtml-render@^1.1.0, posthtml-render@^1.1.3, posthtml-render@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/posthtml-render/-/posthtml-render-1.1.4.tgz#95dac09892f4f183fad5ac823f08f42c0256551e" - - posthtml@^0.11.2, posthtml@^0.11.3: - version "0.11.3" - resolved "https://registry.yarnpkg.com/posthtml/-/posthtml-0.11.3.tgz#17ea2921b0555b7455f33c977bd16d8b8cb74f27" - dependencies: - object-assign "^4.1.1" - posthtml-parser "^0.3.3" - posthtml-render "^1.1.0" - prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -5376,14 +3306,6 @@ Lockfile: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - - process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -5394,7 +3316,7 @@ Lockfile: dependencies: asap "~2.0.3" - prop-types@^15.6.2, prop-types@^15.7.2: + prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" dependencies: @@ -5402,28 +3324,9 @@ Lockfile: object-assign "^4.1.1" react-is "^16.8.1" - proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - pseudomap@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - - psl@^1.1.24, psl@^1.1.28: - version "1.1.31" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" - - public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" pug-attrs@^2.0.3: version "2.0.3" @@ -5518,41 +3421,15 @@ Lockfile: pug-runtime "^2.0.4" pug-strip-comments "^1.0.3" - punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - - punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - - punycode@^2.1.0, punycode@^2.1.1: + punycode@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - q@^1.1.2: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - - qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - - querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - - querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - - quote-stream@^1.0.1, quote-stream@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/quote-stream/-/quote-stream-1.0.2.tgz#84963f8c9c26b942e153feeb53aae74652b7e0b2" + raf@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" dependencies: - buffer-equal "0.0.1" - minimist "^1.1.3" - through2 "^2.0.0" + performance-now "^2.1.0" randomatic@^3.0.0: version "3.1.1" @@ -5562,32 +3439,6 @@ Lockfile: kind-of "^6.0.0" math-random "^1.0.1" - randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - dependencies: - safe-buffer "^5.1.0" - - randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - - range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - - rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - react-dom@^16.8.6: version "16.8.6" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f" @@ -5597,10 +3448,20 @@ Lockfile: prop-types "^15.6.2" scheduler "^0.13.6" + react-input-autosize@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.1.tgz#ec428fa15b1592994fb5f9aa15bb1eb6baf420f8" + dependencies: + prop-types "^15.5.8" + react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.2: version "16.8.6" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" + react-lifecycles-compat@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" + react-redux@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-6.0.1.tgz#0d423e2c1cb10ada87293d47e7de7c329623ba4d" @@ -5639,6 +3500,27 @@ Lockfile: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" + react-select@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-2.4.2.tgz#27da80e3880e92b081be607207bebdf63bcf4f3a" + dependencies: + classnames "^2.2.5" + emotion "^9.1.2" + memoize-one "^5.0.0" + prop-types "^15.6.0" + raf "^3.4.0" + react-input-autosize "^2.2.1" + react-transition-group "^2.2.1" + + react-transition-group@^2.2.1: + version "2.8.0" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.8.0.tgz#d6d8f635d81a0955b67348be5d017cff77d6c75f" + dependencies: + dom-helpers "^3.3.1" + loose-envify "^1.4.0" + prop-types "^15.6.2" + react-lifecycles-compat "^3.0.4" + react@^16.8.6: version "16.8.6" resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe" @@ -5678,34 +3560,6 @@ Lockfile: normalize-package-data "^2.3.2" path-type "^2.0.0" - readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.3, readable-stream@~2.3.6: - version "2.3.6" - resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - - readable-stream@^3.1.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.2.0.tgz#de17f229864c120a9f56945756e4f32c4045245d" - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - - readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - redux@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.1.tgz#436cae6cc40fbe4727689d7c8fae44808f1bfef5" @@ -5719,7 +3573,7 @@ Lockfile: dependencies: regenerate "^1.4.0" - regenerate@^1.2.1, regenerate@^1.4.0: + regenerate@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" @@ -5727,10 +3581,6 @@ Lockfile: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - regenerator-runtime@^0.12.0: - version "0.12.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" - regenerator-runtime@^0.13.2: version "0.13.2" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" @@ -5741,12 +3591,6 @@ Lockfile: dependencies: private "^0.1.6" - regenerator-transform@^0.13.4: - version "0.13.4" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.4.tgz#18f6763cf1382c69c36df76c6ce122cc694284fb" - dependencies: - private "^0.1.6" - regex-cache@^0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" @@ -5760,22 +3604,10 @@ Lockfile: extend-shallow "^3.0.2" safe-regex "^1.1.0" - regexp-tree@^0.1.0: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.5.tgz#7cd71fca17198d04b4176efd79713f2998009397" - regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" - regexpu-core@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - regexpu-core@^4.1.3, regexpu-core@^4.2.0: version "4.4.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32" @@ -5787,20 +3619,10 @@ Lockfile: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.0.2" - regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - regjsgen@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" - regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - dependencies: - jsesc "~0.5.0" - regjsparser@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" @@ -5819,45 +3641,6 @@ Lockfile: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - request-promise-core@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.2.tgz#339f6aababcafdb31c799ff158700336301d3346" - dependencies: - lodash "^4.17.11" - - request-promise-native@^1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.7.tgz#a49868a624bdea5069f1251d0a836e0d89aa2c59" - dependencies: - request-promise-core "1.1.2" - stealthy-require "^1.1.1" - tough-cookie "^2.3.3" - - request@^2.72.0, request@^2.87.0, request@^2.88.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.0" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.4.3" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -5901,13 +3684,13 @@ Lockfile: version "1.1.7" resolved "http://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - resolve@^1.1.5, resolve@^1.10.0: + resolve@^1.1.6, resolve@^1.10.0, resolve@^1.8.1, resolve@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" dependencies: path-parse "^1.0.6" - resolve@^1.1.6, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.5.0, resolve@^1.6.0: + resolve@^1.3.2, resolve@^1.5.0, resolve@^1.6.0: version "1.8.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" dependencies: @@ -5924,14 +3707,6 @@ Lockfile: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - rgb-regex@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" - - rgba-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" - right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" @@ -5944,13 +3719,6 @@ Lockfile: dependencies: glob "^7.0.5" - ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - rollup-plugin-babel@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.3.2.tgz#8c0e1bd7aa9826e90769cf76895007098ffd1413" @@ -5975,6 +3743,13 @@ Lockfile: is-module "^1.0.0" resolve "^1.10.0" + rollup-plugin-replace@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-2.1.1.tgz#e49cb8d07d6f91a7bf28b90b66692f2c8c0b9bba" + dependencies: + magic-string "^0.25.2" + rollup-pluginutils "^2.4.1" + rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.5.0.tgz#23be0f05ac3972ea7b08fc7870cb91fde5b23a09" @@ -5982,6 +3757,13 @@ Lockfile: estree-walker "^0.6.0" micromatch "^3.1.10" + rollup-pluginutils@^2.4.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz#203706edd43dfafeaebc355d7351119402fc83ad" + dependencies: + estree-walker "^0.6.0" + micromatch "^3.1.10" + rollup@^1.7.4: version "1.7.4" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.7.4.tgz#dd9d1d4935d3db38f16e1caaef635d8d1b0831c4" @@ -6002,7 +3784,7 @@ Lockfile: dependencies: tslib "^1.9.0" - safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -6012,26 +3794,10 @@ Lockfile: dependencies: ret "~0.1.10" - "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - safer-eval@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/safer-eval/-/safer-eval-1.3.2.tgz#35f9658458cdfb5769d64fd6842866b53372d568" - dependencies: - clones "^1.2.0" - - sax@^1.2.4, sax@~1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - - saxes@^3.1.5: - version "3.1.9" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-3.1.9.tgz#c1c197cd54956d88c09f960254b999e192d7058b" - dependencies: - xmlchars "^1.3.1" - scheduler@^0.13.6: version "0.13.6" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" @@ -6047,41 +3813,7 @@ Lockfile: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" - send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - - serialize-to-js@^1.1.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/serialize-to-js/-/serialize-to-js-1.2.2.tgz#1a567b0c9bf557bc7d7b77b503dfae0a8218d15d" - dependencies: - js-beautify "^1.8.9" - safer-eval "^1.3.0" - - serve-static@^1.12.4: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - - set-blocking@^2.0.0, set-blocking@~2.0.0: + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -6103,25 +3835,10 @@ Lockfile: is-plain-object "^2.0.3" split-string "^3.0.1" - setimmediate@^1.0.4, setimmediate@^1.0.5: + setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - - sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - - shallow-copy@~0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170" - shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -6132,20 +3849,10 @@ Lockfile: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - sigmund@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" - signal-exit@^3.0.0, signal-exit@^3.0.1, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" - dependencies: - is-arrayish "^0.3.1" - sinon-chai@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/sinon-chai/-/sinon-chai-3.3.0.tgz#8084ff99451064910fbe2c2cb8ab540c00b740ea" @@ -6213,7 +3920,7 @@ Lockfile: source-map-url "^0.4.0" urix "^0.1.0" - source-map-support@^0.5.9, source-map-support@~0.5.10: + source-map-support@^0.5.9: version "0.5.11" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.11.tgz#efac2ce0800355d026326a0ca23e162aeac9a4e2" dependencies: @@ -6224,13 +3931,17 @@ Lockfile: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + + source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + source-map@^0.7.2: + version "0.7.3" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" source-map@~0.2.0: version "0.2.0" @@ -6285,30 +3996,6 @@ Lockfile: version "1.0.3" resolved "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - sshpk@^1.7.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.15.2.tgz#c946d6bd9b1a39d0e8635763f5242d6ed6dcb629" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - - stable@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" - - static-eval@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-2.0.2.tgz#2d1759306b1befa688938454c546b7871f806a42" - dependencies: - escodegen "^1.8.1" - static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -6316,54 +4003,6 @@ Lockfile: define-property "^0.2.5" object-copy "^0.1.0" - static-module@^2.2.0: - version "2.2.5" - resolved "https://registry.yarnpkg.com/static-module/-/static-module-2.2.5.tgz#bd40abceae33da6b7afb84a0e4329ff8852bfbbf" - dependencies: - concat-stream "~1.6.0" - convert-source-map "^1.5.1" - duplexer2 "~0.1.4" - escodegen "~1.9.0" - falafel "^2.1.0" - has "^1.0.1" - magic-string "^0.22.4" - merge-source-map "1.0.4" - object-inspect "~1.4.0" - quote-stream "~1.0.2" - readable-stream "~2.3.3" - shallow-copy "~0.0.1" - static-eval "^2.0.0" - through2 "~2.0.3" - - "statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - - statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - - stealthy-require@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - - stream-browserify@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - - stream-http@^2.7.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -6372,25 +4011,13 @@ Lockfile: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" - "string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: + string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" - string_decoder@^1.0.0, string_decoder@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" - dependencies: - safe-buffer "~5.1.0" - - string_decoder@~1.1.1: - version "1.1.1" - resolved "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - dependencies: - safe-buffer "~5.1.0" - strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -6423,17 +4050,17 @@ Lockfile: version "1.0.0" resolved "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: + strip-json-comments@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - stylehacks@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" - dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" + stylis-rule-sheet@^0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" + + stylis@^3.5.0: + version "3.5.4" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" supports-color@5.4.0: version "5.4.0" @@ -6441,55 +4068,22 @@ Lockfile: dependencies: has-flag "^3.0.0" - supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - - supports-color@^3.1.0, supports-color@^3.1.2, supports-color@^3.2.3: + supports-color@^3.1.0, supports-color@^3.1.2: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: has-flag "^1.0.0" - supports-color@^5.3.0, supports-color@^5.4.0, supports-color@^5.5.0: + supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" dependencies: has-flag "^3.0.0" - supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - dependencies: - has-flag "^3.0.0" - - svgo@^1.0.0, svgo@^1.0.5: - version "1.2.0" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.2.0.tgz#305a8fc0f4f9710828c65039bb93d5793225ffc3" - dependencies: - chalk "^2.4.1" - coa "^2.0.2" - css-select "^2.0.0" - css-select-base-adapter "^0.1.1" - css-tree "1.0.0-alpha.28" - css-url-regex "^1.1.0" - csso "^3.5.1" - js-yaml "^3.12.0" - mkdirp "~0.5.1" - object.values "^1.1.0" - sax "~1.2.4" - stable "^0.1.8" - unquote "~1.1.1" - util.promisify "~1.0.0" - symbol-observable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - symbol-tree@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" - table@^5.0.2: version "5.1.1" resolved "https://registry.yarnpkg.com/table/-/table-5.1.1.tgz#92030192f1b7b51b6eeab23ed416862e47b70837" @@ -6499,26 +4093,6 @@ Lockfile: slice-ansi "2.0.0" string-width "^2.1.1" - tar@^4: - version "4.4.8" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.3.4" - minizlib "^1.1.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.2" - - terser@^3.16.1, terser@^3.7.3: - version "3.17.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-3.17.0.tgz#f88ffbeda0deb5637f9d24b0da66f4e15ab10cb2" - dependencies: - commander "^2.19.0" - source-map "~0.6.1" - source-map-support "~0.5.10" - test-exclude@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" @@ -6537,31 +4111,10 @@ Lockfile: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - through2@^2.0.0, through2@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - through@^2.3.6: version "2.3.8" resolved "http://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - timers-browserify@^2.0.4: - version "2.0.10" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.10.tgz#1d28e3d2aadf1d5a5996c4e9f95601cd053480ae" - dependencies: - setimmediate "^1.0.4" - - timsort@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" - - tiny-inflate@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/tiny-inflate/-/tiny-inflate-1.0.2.tgz#93d9decffc8805bd57eae4310f0b745e9b6fb3a7" - tiny-invariant@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.0.4.tgz#346b5415fd93cb696b0c4e8a96697ff590f92463" @@ -6576,10 +4129,6 @@ Lockfile: dependencies: os-tmpdir "~1.0.2" - to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" @@ -6614,25 +4163,11 @@ Lockfile: version "0.0.1" resolved "https://registry.yarnpkg.com/token-stream/-/token-stream-0.0.1.tgz#ceeefc717a76c4316f126d0b9dbaa55d7e7df01a" - tough-cookie@^2.3.3, tough-cookie@^2.3.4, tough-cookie@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - - tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - - tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + touch@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/touch/-/touch-2.0.2.tgz#ca0b2a3ae3211246a61b16ba9e6cbf1596287164" dependencies: - punycode "^2.1.0" + nopt "~1.0.10" trim-right@^1.0.1: version "1.0.1" @@ -6642,20 +4177,6 @@ Lockfile: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" - tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - - tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - dependencies: - safe-buffer "^5.0.1" - - tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -6666,10 +4187,6 @@ Lockfile: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - ua-parser-js@^0.7.18: version "0.7.19" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b" @@ -6694,20 +4211,6 @@ Lockfile: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - uncss@^0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/uncss/-/uncss-0.16.2.tgz#3b2269c59012da7c66cbe98fbedddeef94f0649c" - dependencies: - commander "^2.9.0" - glob "^7.0.3" - is-absolute-url "^2.0.0" - is-html "^1.0.0" - jsdom "^11.3.0" - lodash "^4.13.1" - postcss "^6.0.14" - postcss-selector-parser "3.1.1" - request "^2.72.0" - unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -6727,13 +4230,6 @@ Lockfile: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" - unicode-trie@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/unicode-trie/-/unicode-trie-0.3.1.tgz#d671dddd89101a08bac37b6a5161010602052085" - dependencies: - pako "^0.2.5" - tiny-inflate "^1.0.0" - union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -6743,18 +4239,6 @@ Lockfile: is-extendable "^0.1.1" set-value "^0.4.3" - uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - - uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - - unquote@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" - unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" @@ -6762,10 +4246,6 @@ Lockfile: has-value "^0.3.1" isobject "^3.0.0" - upath@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" - uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -6776,48 +4256,10 @@ Lockfile: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - - util.promisify@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" - dependencies: - define-properties "^1.1.2" - object.getownpropertydescriptors "^2.0.3" - - util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - - util@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" - dependencies: - inherits "2.0.3" - - uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - - v8-compile-cache@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz#a428b28bb26790734c4fc8bc9fa106fccebf6a6c" - validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -6829,86 +4271,14 @@ Lockfile: version "0.4.0" resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" - vendors@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.2.tgz#7fcb5eef9f5623b156bcea89ec37d63676f21801" - - verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - - vlq@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" - - vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" - void-elements@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" - w3c-hr-time@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" - dependencies: - browser-process-hrtime "^0.1.2" - - w3c-xmlserializer@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz#30485ca7d70a6fd052420a3d12fd90e6339ce794" - dependencies: - domexception "^1.0.1" - webidl-conversions "^4.0.2" - xml-name-validator "^3.0.0" - - wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - dependencies: - defaults "^1.0.3" - - webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - - whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - dependencies: - iconv-lite "0.4.24" - whatwg-fetch@>=0.10.0: version "3.0.0" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" - whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" - - whatwg-url@^6.4.1: - version "6.5.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - - whatwg-url@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -6919,12 +4289,6 @@ Lockfile: dependencies: isexe "^2.0.0" - wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - dependencies: - string-width "^1.0.2 || 2" - window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" @@ -6973,26 +4337,6 @@ Lockfile: dependencies: mkdirp "^0.5.1" - ws@^5.1.1, ws@^5.2.0: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" - dependencies: - async-limiter "~1.0.0" - - ws@^6.1.2: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" - dependencies: - async-limiter "~1.0.0" - - xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - - xmlchars@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-1.3.1.tgz#1dda035f833dbb4f86a0c28eaa6ca769214793cf" - xss@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/xss/-/xss-1.0.3.tgz#d04bd2558fd6c29c46113824d5e8b2a910054e23" @@ -7000,10 +4344,6 @@ Lockfile: commander "^2.9.0" cssfilter "0.0.10" - xtend@^4.0.0, xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" @@ -7012,10 +4352,6 @@ Lockfile: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - yallist@^3.0.0, yallist@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - yargs-parser@^8.0.0: version "8.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" @@ -7047,7 +4383,7 @@ Lockfile: yargs@~3.10.0: version "3.10.0" - resolved "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" dependencies: camelcase "^1.0.2" cliui "^2.1.0" diff --git a/yarn.lock b/yarn.lock index c154f1496..bcab826db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -297,7 +297,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-jsx@^7.2.0": +"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.2.0.tgz#0b85a3b4bc7cdf4cc4b8bf236335b907ca22e7c7" dependencies: @@ -711,6 +711,16 @@ version "0.6.6" resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.6.6.tgz#62266c5f0eac6941fece302abad69f2ee7e25e44" +"@emotion/is-prop-valid@^0.7.3": + version "0.7.3" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.7.3.tgz#a6bf4fa5387cbba59d44e698a4680f481a8da6cc" + dependencies: + "@emotion/memoize" "0.7.1" + +"@emotion/memoize@0.7.1": + version "0.7.1" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.1.tgz#e93c13942592cf5ef01aa8297444dc192beee52f" + "@emotion/memoize@^0.6.1", "@emotion/memoize@^0.6.6": version "0.6.6" resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.6.6.tgz#004b98298d04c7ca3b4f50ca2035d4f60d2eed1b" @@ -732,6 +742,10 @@ version "0.6.7" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.6.7.tgz#53e9f1892f725b194d5e6a1684a7b394df592397" +"@emotion/unitless@^0.7.0": + version "0.7.3" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.3.tgz#6310a047f12d21a1036fb031317219892440416f" + "@emotion/utils@^0.8.2": version "0.8.2" resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.8.2.tgz#576ff7fb1230185b619a75d258cbc98f0867a8dc" @@ -812,6 +826,10 @@ acorn@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" +ajv-keywords@^3.2.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.0.tgz#4b831e7b531415a7cc518cd404e73f6193c6349d" + ajv@^6.5.3, ajv@^6.6.1: version "6.6.1" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61" @@ -849,6 +867,10 @@ ansi-regex@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.0.0.tgz#70de791edf021404c3fd615aa89118ae0432e5a9" +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -991,6 +1013,32 @@ babel-plugin-macros@^2.0.0: cosmiconfig "^5.2.0" resolve "^1.10.0" +babel-plugin-react-css-modules@^5.2.4: + version "5.2.4" + resolved "https://registry.yarnpkg.com/babel-plugin-react-css-modules/-/babel-plugin-react-css-modules-5.2.4.tgz#cd8994c4aa11386e75cd95b81871f2fab3a2f48d" + dependencies: + "@babel/plugin-syntax-jsx" "^7.0.0" + "@babel/types" "^7.0.0" + ajv "^6.5.3" + ajv-keywords "^3.2.0" + generic-names "^2.0.1" + postcss "^7.0.2" + postcss-modules "^1.3.2" + postcss-modules-extract-imports "^1.2.0" + postcss-modules-local-by-default "^1.2.0" + postcss-modules-parser "^1.1.1" + postcss-modules-scope "^1.1.0" + postcss-modules-values "^1.3.0" + +"babel-plugin-styled-components@>= 1": + version "1.10.0" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.0.tgz#ff1f42ad2cc78c21f26b62266b8f564dbc862939" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-module-imports" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" + lodash "^4.17.10" + babel-plugin-syntax-jsx@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" @@ -1031,6 +1079,14 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1141,6 +1197,10 @@ camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" +camelize@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" + caniuse-lite@^1.0.30000912: version "1.0.30000921" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000921.tgz#7a607c1623444b22351d834e093aedda3c42fbe8" @@ -1163,6 +1223,16 @@ chai@^4.1.2: pathval "^1.1.0" type-detect "^4.0.5" +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + chalk@^2.0.0, chalk@^2.1.0: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" @@ -1171,6 +1241,14 @@ chalk@^2.0.0, chalk@^2.1.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chance@^1.0.4: version "1.0.18" resolved "https://registry.yarnpkg.com/chance/-/chance-1.0.18.tgz#79788fe6fca4c338bf404321c347eecc80f969ee" @@ -1202,7 +1280,7 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -classnames@^2.2.5: +classnames@^2.2.5, classnames@^2.2.6: version "2.2.6" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" @@ -1379,6 +1457,41 @@ cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +css-color-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" + +css-modules-loader-core@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/css-modules-loader-core/-/css-modules-loader-core-1.1.0.tgz#5908668294a1becd261ae0a4ce21b0b551f21d16" + dependencies: + icss-replace-symbols "1.1.0" + postcss "6.0.1" + postcss-modules-extract-imports "1.1.0" + postcss-modules-local-by-default "1.2.0" + postcss-modules-scope "1.1.0" + postcss-modules-values "1.3.0" + +css-selector-tokenizer@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz#a177271a8bca5019172f4f891fc6eed9cbf68d5d" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + +css-to-react-native@^2.2.2: + version "2.3.0" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.0.tgz#bf80d24ec4a08e430306ef429c0586e6ed5485f7" + dependencies: + camelize "^1.0.0" + css-color-keywords "^1.0.0" + postcss-value-parser "^3.3.0" + +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + cssfilter@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" @@ -1503,6 +1616,10 @@ emoji-regex@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + emotion@^9.1.2: version "9.2.12" resolved "https://registry.yarnpkg.com/emotion/-/emotion-9.2.12.tgz#53925aaa005614e65c6e43db8243c843574d1ea9" @@ -1541,7 +1658,7 @@ es-to-primitive@^1.2.0: is-date-object "^1.0.1" is-symbol "^1.0.2" -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1826,6 +1943,10 @@ fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" +fastparse@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" + fbjs@^0.8.0: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" @@ -1969,6 +2090,18 @@ functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" +generic-names@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-1.0.3.tgz#2d786a121aee508876796939e8e3bff836c20917" + dependencies: + loader-utils "^0.2.16" + +generic-names@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-2.0.1.tgz#f8a378ead2ccaa7a34f0317b05554832ae41b872" + dependencies: + loader-utils "^1.1.0" + get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" @@ -2056,6 +2189,12 @@ handlebars@^4.0.1, handlebars@^4.0.3: optionalDependencies: uglify-js "^3.1.4" +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" @@ -2132,6 +2271,10 @@ iconv-lite@^0.4.24, iconv-lite@~0.4.13: dependencies: safer-buffer ">= 2.1.2 < 3" +icss-replace-symbols@1.1.0, icss-replace-symbols@^1.0.2, icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -2464,6 +2607,10 @@ istanbul@^0.4.5: which "^1.1.1" wordwrap "^1.0.0" +js-base64@^2.1.9: + version "2.5.1" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" + js-levenshtein@^1.1.3: version "1.1.4" resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e" @@ -2514,6 +2661,16 @@ json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + dependencies: + minimist "^1.2.0" + json5@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" @@ -2597,6 +2754,23 @@ load-json-file@^2.0.0: pify "^2.0.0" strip-bom "^3.0.0" +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +loader-utils@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -2611,10 +2785,57 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" +lodash._arrayeach@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e" + +lodash._baseeach@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash._baseeach/-/lodash._baseeach-3.0.4.tgz#cf8706572ca144e8d9d75227c990da982f932af3" + dependencies: + lodash.keys "^3.0.0" + +lodash._bindcallback@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + +lodash.foreach@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-3.0.3.tgz#6fd7efb79691aecd67fdeac2761c98e701d6c39a" + dependencies: + lodash._arrayeach "^3.0.0" + lodash._baseeach "^3.0.0" + lodash._bindcallback "^3.0.0" + lodash.isarray "^3.0.0" + lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" @@ -3184,6 +3405,94 @@ posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" +postcss-modules-extract-imports@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" + dependencies: + postcss "^6.0.1" + +postcss-modules-extract-imports@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.1.tgz#dc87e34148ec7eab5f791f7cd5849833375b741a" + dependencies: + postcss "^6.0.1" + +postcss-modules-local-by-default@1.2.0, postcss-modules-local-by-default@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-parser@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-modules-parser/-/postcss-modules-parser-1.1.1.tgz#95f71ad7916f0f39207bb81c401336c8d245738c" + dependencies: + icss-replace-symbols "^1.0.2" + lodash.foreach "^3.0.3" + postcss "^5.0.10" + +postcss-modules-scope@1.1.0, postcss-modules-scope@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-values@1.3.0, postcss-modules-values@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^6.0.1" + +postcss-modules@^1.3.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/postcss-modules/-/postcss-modules-1.4.1.tgz#8aa35bd3461db67e27377a7ce770d77b654a84ef" + dependencies: + css-modules-loader-core "^1.1.0" + generic-names "^1.0.3" + lodash.camelcase "^4.3.0" + postcss "^7.0.1" + string-hash "^1.1.1" + +postcss-value-parser@^3.3.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + +postcss@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.1.tgz#000dbd1f8eef217aa368b9a212c5fc40b2a8f3f2" + dependencies: + chalk "^1.1.3" + source-map "^0.5.6" + supports-color "^3.2.3" + +postcss@^5.0.10: + version "5.2.18" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +postcss@^6.0.1: + version "6.0.23" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" + dependencies: + chalk "^2.4.1" + source-map "^0.6.1" + supports-color "^5.4.0" + +postcss@^7.0.1, postcss@^7.0.2: + version "7.0.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.14.tgz#4527ed6b1ca0d82c53ce5ec1a2041c2346bbd6e5" + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -3206,7 +3515,7 @@ promise@^7.0.1, promise@^7.1.1: dependencies: asap "~2.0.3" -prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" dependencies: @@ -3463,7 +3772,7 @@ regenerate-unicode-properties@^7.0.0: dependencies: regenerate "^1.4.0" -regenerate@^1.4.0: +regenerate@^1.2.1, regenerate@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" @@ -3498,6 +3807,14 @@ regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" +regexpu-core@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + regexpu-core@^4.1.3, regexpu-core@^4.2.0: version "4.4.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32" @@ -3509,10 +3826,20 @@ regexpu-core@^4.1.3, regexpu-core@^4.2.0: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.0.2" +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + regjsgen@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + regjsparser@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" @@ -3893,6 +4220,10 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" +string-hash@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" + string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -3944,6 +4275,22 @@ strip-json-comments@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" +styled-components@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.2.0.tgz#811fbbec4d64c7189f6c7482b9eb6fefa7fefef7" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@emotion/is-prop-valid" "^0.7.3" + "@emotion/unitless" "^0.7.0" + babel-plugin-styled-components ">= 1" + css-to-react-native "^2.2.2" + memoize-one "^5.0.0" + prop-types "^15.5.4" + react-is "^16.6.0" + stylis "^3.5.0" + stylis-rule-sheet "^0.0.10" + supports-color "^5.5.0" + stylis-rule-sheet@^0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" @@ -3958,18 +4305,28 @@ supports-color@5.4.0: dependencies: has-flag "^3.0.0" -supports-color@^3.1.0, supports-color@^3.1.2: +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.0, supports-color@^3.1.2, supports-color@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: has-flag "^1.0.0" -supports-color@^5.3.0, supports-color@^5.5.0: +supports-color@^5.3.0, supports-color@^5.4.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" dependencies: has-flag "^3.0.0" +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + dependencies: + has-flag "^3.0.0" + symbol-observable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"