(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom")); else if(typeof define === 'function' && define.amd) define(["react", "react-dom"], factory); else if(typeof exports === 'object') exports["ReactBootstrap"] = factory(require("react"), require("react-dom")); else root["ReactBootstrap"] = factory(root["React"], root["ReactDOM"]); })(self, function(__WEBPACK_EXTERNAL_MODULE__698__, __WEBPACK_EXTERNAL_MODULE__207__) { return /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 814: /***/ ((module, exports) => { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames() { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg)) { if (arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } } else if (argType === 'object') { if (arg.toString === Object.prototype.toString) { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } else { classes.push(arg.toString()); } } } return classes.join(' '); } if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(); /***/ }), /***/ 286: /***/ ((module) => { "use strict"; /** * 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. */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function (condition, format, a, b, c, d, e, f) { if (false) {} if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /***/ }), /***/ 946: /***/ ((module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.default = all; var _createChainableTypeChecker = __webpack_require__(844); var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function all() { for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) { validators[_key] = arguments[_key]; } function allPropTypes() { for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } var error = null; validators.forEach(function (validator) { if (error != null) { return; } var result = validator.apply(undefined, args); if (result != null) { error = result; } }); return error; } return (0, _createChainableTypeChecker2.default)(allPropTypes); } module.exports = exports['default']; /***/ }), /***/ 964: /***/ ((module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _react = __webpack_require__(698); var _react2 = _interopRequireDefault(_react); var _createChainableTypeChecker = __webpack_require__(844); var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue); if (_react2.default.isValidElement(propValue)) { return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.'); } if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) { return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.'); } return null; } exports.default = (0, _createChainableTypeChecker2.default)(validate); module.exports = exports['default']; /***/ }), /***/ 647: /***/ ((module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.default = deprecated; var _warning = __webpack_require__(459); var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var warned = {}; function deprecated(validator, reason) { return function validate(props, propName, componentName, location, propFullName) { var componentNameSafe = componentName || '<>'; var propFullNameSafe = propFullName || propName; if (props[propName] != null) { var messageKey = componentName + '.' + propName; (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason + '.')); warned[messageKey] = true; } for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { args[_key - 5] = arguments[_key]; } return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args)); }; } /* eslint-disable no-underscore-dangle */ function _resetWarned() { warned = {}; } deprecated._resetWarned = _resetWarned; /* eslint-enable no-underscore-dangle */ module.exports = exports['default']; /***/ }), /***/ 835: /***/ ((module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var _react = __webpack_require__(698); var _react2 = _interopRequireDefault(_react); var _reactIs = __webpack_require__(532); var _createChainableTypeChecker = __webpack_require__(844); var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function elementType(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (_react2.default.isValidElement(propValue)) { return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`,expected an element type (a string ') + ', component class, or function component).'); } if (!(0, _reactIs.isValidElementType)(propValue)) { return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + ', component class, or function component).'); } return null; } exports.default = (0, _createChainableTypeChecker2.default)(elementType); module.exports = exports['default']; /***/ }), /***/ 517: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); __webpack_unused_export__ = exports.nm = __webpack_unused_export__ = exports.ax = __webpack_unused_export__ = undefined; var _all = __webpack_require__(946); var _all2 = _interopRequireDefault(_all); var _componentOrElement = __webpack_require__(964); var _componentOrElement2 = _interopRequireDefault(_componentOrElement); var _deprecated = __webpack_require__(647); var _deprecated2 = _interopRequireDefault(_deprecated); var _elementType = __webpack_require__(835); var _elementType2 = _interopRequireDefault(_elementType); var _isRequiredForA11y = __webpack_require__(422); var _isRequiredForA11y2 = _interopRequireDefault(_isRequiredForA11y); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } __webpack_unused_export__ = _all2.default; exports.ax = _componentOrElement2.default; __webpack_unused_export__ = _deprecated2.default; exports.nm = _elementType2.default; __webpack_unused_export__ = _isRequiredForA11y2.default; /***/ }), /***/ 422: /***/ ((module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.default = isRequiredForA11y; function isRequiredForA11y(validator) { return function validate(props, propName, componentName, location, propFullName) { var componentNameSafe = componentName || '<>'; var propFullNameSafe = propFullName || propName; if (props[propName] == null) { return new Error('The ' + location + ' `' + propFullNameSafe + '` is required to make ' + ('`' + componentNameSafe + '` accessible for users of assistive ') + 'technologies such as screen readers.'); } for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { args[_key - 5] = arguments[_key]; } return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args)); }; } module.exports = exports['default']; /***/ }), /***/ 844: /***/ ((module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.default = createChainableTypeChecker; /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ // Mostly taken from ReactPropTypes. function createChainableTypeChecker(validate) { function checkType(isRequired, props, propName, componentName, location, propFullName) { var componentNameSafe = componentName || '<>'; var propFullNameSafe = propFullName || propName; if (props[propName] == null) { if (isRequired) { return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.')); } return null; } for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) { args[_key - 6] = arguments[_key]; } return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args)); } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } module.exports = exports['default']; /***/ }), /***/ 428: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** * 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. */ var ReactPropTypesSecret = __webpack_require__(134); function emptyFunction() {} function emptyFunctionWithReset() {} emptyFunctionWithReset.resetWarningCache = emptyFunction; module.exports = function () { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); err.name = 'Invariant Violation'; throw err; } ; shim.isRequired = shim; function getShim() { return shim; } ; // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /***/ 526: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * 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. */ if (false) { var throwOnDirectAccess, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(428)(); } /***/ }), /***/ 134: /***/ ((module) => { "use strict"; /** * 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. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /***/ 15: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; function z(a) { if ("object" === typeof a && null !== a) { var u = a.$$typeof; switch (u) { case c: switch (a = a.type, a) { case l: case m: case e: case g: case f: case p: return a; default: switch (a = a && a.$$typeof, a) { case k: case n: case t: case r: case h: return a; default: return u; } } case d: return u; } } } function A(a) { return z(a) === m; } exports.AsyncMode = l; exports.ConcurrentMode = m; exports.ContextConsumer = k; exports.ContextProvider = h; exports.Element = c; exports.ForwardRef = n; exports.Fragment = e; exports.Lazy = t; exports.Memo = r; exports.Portal = d; exports.Profiler = g; exports.StrictMode = f; exports.Suspense = p; exports.isAsyncMode = function (a) { return A(a) || z(a) === l; }; exports.isConcurrentMode = A; exports.isContextConsumer = function (a) { return z(a) === k; }; exports.isContextProvider = function (a) { return z(a) === h; }; exports.isElement = function (a) { return "object" === typeof a && null !== a && a.$$typeof === c; }; exports.isForwardRef = function (a) { return z(a) === n; }; exports.isFragment = function (a) { return z(a) === e; }; exports.isLazy = function (a) { return z(a) === t; }; exports.isMemo = function (a) { return z(a) === r; }; exports.isPortal = function (a) { return z(a) === d; }; exports.isProfiler = function (a) { return z(a) === g; }; exports.isStrictMode = function (a) { return z(a) === f; }; exports.isSuspense = function (a) { return z(a) === p; }; exports.isValidElementType = function (a) { return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); }; exports.typeOf = z; /***/ }), /***/ 532: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; if (true) { module.exports = __webpack_require__(15); } else {} /***/ }), /***/ 459: /***/ ((module) => { "use strict"; /** * 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. */ /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var __DEV__ = "production" !== 'production'; var warning = function () {}; if (__DEV__) { var printWarning = function printWarning(format, args) { var len = arguments.length; args = new Array(len > 1 ? len - 1 : 0); for (var key = 1; key < len; key++) { args[key - 1] = arguments[key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; warning = function (condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (!condition) { printWarning.apply(null, [format].concat(args)); } }; } module.exports = warning; /***/ }), /***/ 698: /***/ ((module) => { "use strict"; module.exports = __WEBPACK_EXTERNAL_MODULE__698__; /***/ }), /***/ 207: /***/ ((module) => { "use strict"; module.exports = __WEBPACK_EXTERNAL_MODULE__207__; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. (() => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "Accordion": () => (/* reexport */ src_Accordion), "AccordionCollapse": () => (/* reexport */ src_AccordionCollapse), "AccordionContext": () => (/* reexport */ AccordionContext), "AccordionToggle": () => (/* reexport */ src_AccordionToggle), "Alert": () => (/* reexport */ src_Alert), "Badge": () => (/* reexport */ src_Badge), "Breadcrumb": () => (/* reexport */ src_Breadcrumb), "BreadcrumbItem": () => (/* reexport */ src_BreadcrumbItem), "Button": () => (/* reexport */ src_Button), "ButtonGroup": () => (/* reexport */ src_ButtonGroup), "ButtonToolbar": () => (/* reexport */ src_ButtonToolbar), "Card": () => (/* reexport */ src_Card), "CardColumns": () => (/* reexport */ CardColumns), "CardDeck": () => (/* reexport */ CardDeck), "CardGroup": () => (/* reexport */ CardGroup), "CardImg": () => (/* reexport */ src_CardImg), "Carousel": () => (/* reexport */ src_Carousel), "CarouselItem": () => (/* reexport */ src_CarouselItem), "CloseButton": () => (/* reexport */ src_CloseButton), "Col": () => (/* reexport */ src_Col), "Collapse": () => (/* reexport */ src_Collapse), "Container": () => (/* reexport */ src_Container), "Dropdown": () => (/* reexport */ src_Dropdown), "DropdownButton": () => (/* reexport */ src_DropdownButton), "Fade": () => (/* reexport */ src_Fade), "Figure": () => (/* reexport */ src_Figure), "Form": () => (/* reexport */ Form), "FormCheck": () => (/* reexport */ src_FormCheck), "FormControl": () => (/* reexport */ src_FormControl), "FormFile": () => (/* reexport */ src_FormFile), "FormGroup": () => (/* reexport */ src_FormGroup), "FormLabel": () => (/* reexport */ src_FormLabel), "FormText": () => (/* reexport */ src_FormText), "Image": () => (/* reexport */ src_Image), "InputGroup": () => (/* reexport */ src_InputGroup), "Jumbotron": () => (/* reexport */ src_Jumbotron), "ListGroup": () => (/* reexport */ src_ListGroup), "ListGroupItem": () => (/* reexport */ src_ListGroupItem), "Media": () => (/* reexport */ src_Media), "Modal": () => (/* reexport */ src_Modal), "ModalBody": () => (/* reexport */ ModalBody), "ModalDialog": () => (/* reexport */ src_ModalDialog), "ModalFooter": () => (/* reexport */ ModalFooter), "ModalTitle": () => (/* reexport */ ModalTitle), "Nav": () => (/* reexport */ src_Nav), "NavDropdown": () => (/* reexport */ src_NavDropdown), "NavItem": () => (/* reexport */ src_NavItem), "NavLink": () => (/* reexport */ src_NavLink), "Navbar": () => (/* reexport */ src_Navbar), "NavbarBrand": () => (/* reexport */ src_NavbarBrand), "Overlay": () => (/* reexport */ src_Overlay), "OverlayTrigger": () => (/* reexport */ src_OverlayTrigger), "PageItem": () => (/* reexport */ src_PageItem), "Pagination": () => (/* reexport */ src_Pagination), "Popover": () => (/* reexport */ src_Popover), "PopoverContent": () => (/* reexport */ src_PopoverContent), "PopoverTitle": () => (/* reexport */ src_PopoverTitle), "ProgressBar": () => (/* reexport */ src_ProgressBar), "ResponsiveEmbed": () => (/* reexport */ src_ResponsiveEmbed), "Row": () => (/* reexport */ src_Row), "SafeAnchor": () => (/* reexport */ src_SafeAnchor), "Spinner": () => (/* reexport */ src_Spinner), "SplitButton": () => (/* reexport */ src_SplitButton), "Tab": () => (/* reexport */ src_Tab), "TabContainer": () => (/* reexport */ src_TabContainer), "TabContent": () => (/* reexport */ src_TabContent), "TabPane": () => (/* reexport */ src_TabPane), "Table": () => (/* reexport */ src_Table), "Tabs": () => (/* reexport */ src_Tabs), "ThemeProvider": () => (/* reexport */ src_ThemeProvider), "Toast": () => (/* reexport */ src_Toast), "ToastBody": () => (/* reexport */ ToastBody), "ToastHeader": () => (/* reexport */ src_ToastHeader), "ToggleButton": () => (/* reexport */ src_ToggleButton), "ToggleButtonGroup": () => (/* reexport */ src_ToggleButtonGroup), "Tooltip": () => (/* reexport */ src_Tooltip), "useAccordionToggle": () => (/* reexport */ useAccordionToggle) }); ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js function extends_extends() { 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_extends.apply(this, arguments); } ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js function objectWithoutPropertiesLoose_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; } // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__(814); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(698); var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__(526); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/invariant/browser.js var browser = __webpack_require__(286); var browser_default = /*#__PURE__*/__webpack_require__.n(browser); ;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/utils.js var noop = function noop() {}; function readOnlyPropType(handler, name) { return function (props, propName) { if (props[propName] !== undefined) { if (!props[handler]) { return new Error("You have provided a `" + propName + "` prop to `" + name + "` " + ("without an `" + handler + "` handler prop. This will render a read-only field. ") + ("If the field should be mutable use `" + defaultKey(propName) + "`. ") + ("Otherwise, set `" + handler + "`.")); } } }; } function uncontrolledPropTypes(controlledValues, displayName) { var propTypes = {}; Object.keys(controlledValues).forEach(function (prop) { // add default propTypes for folks that use runtime checks propTypes[defaultKey(prop)] = noop; if (false) { var handler; } }); return propTypes; } function isProp(props, prop) { return props[prop] !== undefined; } function defaultKey(key) { return 'default' + key.charAt(0).toUpperCase() + key.substr(1); } /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ function canAcceptRef(component) { return !!component && (typeof component !== 'function' || component.prototype && component.prototype.isReactComponent); } ;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/hook.js function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function useUncontrolledProp(propValue, defaultValue, handler) { var wasPropRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(propValue !== undefined); var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(defaultValue), stateValue = _useState[0], setState = _useState[1]; var isProp = propValue !== undefined; var wasProp = wasPropRef.current; wasPropRef.current = isProp; /** * If a prop switches from controlled to Uncontrolled * reset its value to the defaultValue */ if (!isProp && wasProp && stateValue !== defaultValue) { setState(defaultValue); } return [isProp ? propValue : stateValue, (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (value) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } if (handler) handler.apply(void 0, [value].concat(args)); setState(value); }, [handler])]; } function useUncontrolled(props, config) { return Object.keys(config).reduce(function (result, fieldName) { var _extends2; var _ref = result, defaultValue = _ref[defaultKey(fieldName)], propsValue = _ref[fieldName], rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, [defaultKey(fieldName), fieldName].map(_toPropertyKey)); var handlerName = config[fieldName]; var _useUncontrolledProp = useUncontrolledProp(propsValue, defaultValue, props[handlerName]), value = _useUncontrolledProp[0], handler = _useUncontrolledProp[1]; return extends_extends({}, rest, (_extends2 = {}, _extends2[fieldName] = value, _extends2[handlerName] = handler, _extends2)); }, props); } ;// CONCATENATED MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js /** * 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 react_lifecycles_compat_es_polyfill(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; } ;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/uncontrollable.js var _jsxFileName = "/Users/jquense/src/uncontrollable/src/uncontrollable.js"; function uncontrollable(Component, controlledValues, methods) { if (methods === void 0) { methods = []; } var displayName = Component.displayName || Component.name || 'Component'; var canAcceptRef = Utils.canAcceptRef(Component); var controlledProps = Object.keys(controlledValues); var PROPS_TO_OMIT = controlledProps.map(Utils.defaultKey); !(canAcceptRef || !methods.length) ? false ? 0 : invariant(false) : void 0; var UncontrolledComponent = /*#__PURE__*/function (_React$Component) { _inheritsLoose(UncontrolledComponent, _React$Component); function UncontrolledComponent() { 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.handlers = Object.create(null); controlledProps.forEach(function (propName) { var handlerName = controlledValues[propName]; var handleChange = function handleChange(value) { if (_this.props[handlerName]) { var _this$props; _this._notifying = true; for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } (_this$props = _this.props)[handlerName].apply(_this$props, [value].concat(args)); _this._notifying = false; } if (!_this.unmounted) _this.setState(function (_ref) { var _extends2; var values = _ref.values; return { values: _extends(Object.create(null), values, (_extends2 = {}, _extends2[propName] = value, _extends2)) }; }); }; _this.handlers[handlerName] = handleChange; }); if (methods.length) _this.attachRef = function (ref) { _this.inner = ref; }; var values = Object.create(null); controlledProps.forEach(function (key) { values[key] = _this.props[Utils.defaultKey(key)]; }); _this.state = { values: values, prevProps: {} }; return _this; } var _proto = UncontrolledComponent.prototype; _proto.shouldComponentUpdate = function shouldComponentUpdate() { //let setState trigger the update return !this._notifying; }; UncontrolledComponent.getDerivedStateFromProps = function getDerivedStateFromProps(props, _ref2) { var values = _ref2.values, prevProps = _ref2.prevProps; var nextState = { values: _extends(Object.create(null), values), prevProps: {} }; controlledProps.forEach(function (key) { /** * If a prop switches from controlled to Uncontrolled * reset its value to the defaultValue */ nextState.prevProps[key] = props[key]; if (!Utils.isProp(props, key) && Utils.isProp(prevProps, key)) { nextState.values[key] = props[Utils.defaultKey(key)]; } }); return nextState; }; _proto.componentWillUnmount = function componentWillUnmount() { this.unmounted = true; }; _proto.render = function render() { var _this2 = this; var _this$props2 = this.props, innerRef = _this$props2.innerRef, props = _objectWithoutPropertiesLoose(_this$props2, ["innerRef"]); PROPS_TO_OMIT.forEach(function (prop) { delete props[prop]; }); var newProps = {}; controlledProps.forEach(function (propName) { var propValue = _this2.props[propName]; newProps[propName] = propValue !== undefined ? propValue : _this2.state.values[propName]; }); return React.createElement(Component, _extends({}, props, newProps, this.handlers, { ref: innerRef || this.attachRef })); }; return UncontrolledComponent; }(React.Component); polyfill(UncontrolledComponent); UncontrolledComponent.displayName = "Uncontrolled(" + displayName + ")"; UncontrolledComponent.propTypes = _extends({ innerRef: function innerRef() {} }, Utils.uncontrolledPropTypes(controlledValues, displayName)); methods.forEach(function (method) { UncontrolledComponent.prototype[method] = function $proxiedMethod() { var _this$inner; return (_this$inner = this.inner)[method].apply(_this$inner, arguments); }; }); var WrappedComponent = UncontrolledComponent; if (React.forwardRef) { WrappedComponent = React.forwardRef(function (props, ref) { return React.createElement(UncontrolledComponent, _extends({}, props, { innerRef: ref, __source: { fileName: _jsxFileName, lineNumber: 128 }, __self: this })); }); WrappedComponent.propTypes = UncontrolledComponent.propTypes; } WrappedComponent.ControlledComponent = Component; /** * useful when wrapping a Component and you want to control * everything */ WrappedComponent.deferControlTo = function (newComponent, additions, nextMethods) { if (additions === void 0) { additions = {}; } return uncontrollable(newComponent, _extends({}, controlledValues, additions), nextMethods); }; return WrappedComponent; } ;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/index.js ;// CONCATENATED MODULE: ./src/ThemeProvider.tsx var ThemeProvider_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ThemeProvider.tsx"; var ThemeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({}); var Consumer = ThemeContext.Consumer, Provider = ThemeContext.Provider; function ThemeProvider(_ref) { var prefixes = _ref.prefixes, children = _ref.children; var copiedPrefixes = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { return extends_extends({}, prefixes); }, [prefixes]); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Provider, { value: copiedPrefixes, __self: this, __source: { fileName: ThemeProvider_jsxFileName, lineNumber: 14, columnNumber: 10 } }, children); } ThemeProvider.propTypes = { prefixes: (prop_types_default()).object.isRequired }; function useBootstrapPrefix(prefix, defaultPrefix) { var prefixes = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext); return prefix || prefixes[defaultPrefix] || defaultPrefix; } function createBootstrapComponent(Component, opts) { var _this = this; if (typeof opts === 'string') opts = { prefix: opts }; var isClassy = Component.prototype && Component.prototype.isReactComponent; // If it's a functional component make sure we don't break it with a ref var _opts = opts, prefix = _opts.prefix, _opts$forwardRefAs = _opts.forwardRefAs, forwardRefAs = _opts$forwardRefAs === void 0 ? isClassy ? 'ref' : 'innerRef' : _opts$forwardRefAs; var Wrapped = /*#__PURE__*/React.forwardRef(function (_ref2, ref) { var props = _extends({}, _ref2); props[forwardRefAs] = ref; var bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix); return /*#__PURE__*/React.createElement(Component, _extends({}, props, { bsPrefix: bsPrefix, __self: _this, __source: { fileName: ThemeProvider_jsxFileName, lineNumber: 38, columnNumber: 12 } })); }); Wrapped.displayName = "Bootstrap(" + (Component.displayName || Component.name) + ")"; return Wrapped; } /* harmony default export */ const src_ThemeProvider = (ThemeProvider); ;// CONCATENATED MODULE: ./src/SelectableContext.tsx // TODO (apparently this is a bare "onSelect"?) var SelectableContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null); var makeEventKey = function makeEventKey(eventKey, href) { if (href === void 0) { href = null; } if (eventKey != null) return String(eventKey); return href || null; }; /* harmony default export */ const src_SelectableContext = (SelectableContext); ;// CONCATENATED MODULE: ./src/AccordionContext.ts var context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null); context.displayName = 'AccordionContext'; /* harmony default export */ const AccordionContext = (context); ;// CONCATENATED MODULE: ./src/AccordionToggle.tsx var _excluded = ["as", "children", "eventKey", "onClick"]; var AccordionToggle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionToggle.tsx", _this = undefined; var propTypes = { /** Set a custom element for this component */ as: (prop_types_default()).elementType, /** * A key that corresponds to the collapse component that gets triggered * when this has been clicked. */ eventKey: (prop_types_default()).string.isRequired, /** A callback function for when this component is clicked */ onClick: (prop_types_default()).func }; function useAccordionToggle(eventKey, onClick) { var contextEventKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionContext); var onSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext); return function (e) { /* Compare the event key in context with the given event key. If they are the same, then collapse the component. */ var eventKeyPassed = eventKey === contextEventKey ? null : eventKey; if (onSelect) onSelect(eventKeyPassed, e); if (onClick) onClick(e); }; } var AccordionToggle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var _ref$as = _ref.as, Component = _ref$as === void 0 ? 'button' : _ref$as, children = _ref.children, eventKey = _ref.eventKey, onClick = _ref.onClick, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, _excluded); var accordionOnClick = useAccordionToggle(eventKey, onClick); if (Component === 'button') { props.type = 'button'; } return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({ ref: ref, onClick: accordionOnClick }, props, { __self: _this, __source: { fileName: AccordionToggle_jsxFileName, lineNumber: 74, columnNumber: 7 } }), children); }); AccordionToggle.propTypes = propTypes; /* harmony default export */ const src_AccordionToggle = (AccordionToggle); ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/ownerDocument.js /** * Returns the owner document of a given element. * * @param node the element */ function ownerDocument(node) { return node && node.ownerDocument || document; } ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/ownerWindow.js /** * Returns the owner window of a given element. * * @param node the element */ function ownerWindow(node) { var doc = ownerDocument(node); return doc && doc.defaultView || window; } ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/getComputedStyle.js /** * Returns one or all computed style properties of an element. * * @param node the element * @param psuedoElement the style property */ function getComputedStyle_getComputedStyle(node, psuedoElement) { return ownerWindow(node).getComputedStyle(node, psuedoElement); } ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/hyphenate.js var rUpper = /([A-Z])/g; function hyphenate(string) { return string.replace(rUpper, '-$1').toLowerCase(); } ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/hyphenateStyle.js /** * Copyright 2013-2014, Facebook, Inc. * All rights reserved. * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js */ var msPattern = /^ms-/; function hyphenateStyleName(string) { return hyphenate(string).replace(msPattern, '-ms-'); } ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/isTransform.js var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i; function isTransform(value) { return !!(value && supportedTransforms.test(value)); } ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/css.js function style(node, property) { var css = ''; var transforms = ''; if (typeof property === 'string') { return node.style.getPropertyValue(hyphenateStyleName(property)) || getComputedStyle_getComputedStyle(node).getPropertyValue(hyphenateStyleName(property)); } Object.keys(property).forEach(function (key) { var value = property[key]; if (!value && value !== 0) { node.style.removeProperty(hyphenateStyleName(key)); } else if (isTransform(key)) { transforms += key + "(" + value + ") "; } else { css += hyphenateStyleName(key) + ": " + value + ";"; } }); if (transforms) { css += "transform: " + transforms + ";"; } node.style.cssText += ";" + css; } /* harmony default export */ const css = (style); ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js function inheritsLoose_inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } // EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"} var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_ = __webpack_require__(207); var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_); ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/config.js /* harmony default export */ const config = ({ disabled: false }); ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js /* harmony default export */ const TransitionGroupContext = (external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null)); ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/Transition.js var UNMOUNTED = 'unmounted'; var EXITED = 'exited'; var ENTERING = 'entering'; var 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: 1 }, * entered: { opacity: 1 }, * exiting: { opacity: 0 }, * exited: { opacity: 0 }, * }; * * 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'`. */ var Transition = /*#__PURE__*/function (_React$Component) { inheritsLoose_inheritsLoose(Transition, _React$Component); function Transition(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; var parentGroup = context; // 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; } 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 } // } ; var _proto = Transition.prototype; _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(); if (nextStatus === ENTERING) { this.performEnter(mounting); } else { this.performExit(); } } else if (this.props.unmountOnExit && this.state.status === EXITED) { this.setState({ status: UNMOUNTED }); } }; _proto.performEnter = function performEnter(mounting) { var _this2 = this; var enter = this.props.enter; var appearing = this.context ? this.context.isMounting : mounting; var _ref2 = this.props.nodeRef ? [appearing] : [external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1]; 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 || config.disabled) { this.safeSetState({ status: ENTERED }, function () { _this2.props.onEntered(maybeNode); }); return; } this.props.onEnter(maybeNode, maybeAppearing); this.safeSetState({ status: ENTERING }, function () { _this2.props.onEntering(maybeNode, maybeAppearing); _this2.onTransitionEnd(enterTimeout, function () { _this2.safeSetState({ status: ENTERED }, function () { _this2.props.onEntered(maybeNode, maybeAppearing); }); }); }); }; _proto.performExit = function performExit() { var _this3 = this; var exit = this.props.exit; var timeouts = this.getTimeouts(); var maybeNode = this.props.nodeRef ? undefined : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this); // no exit animation skip right to EXITED if (!exit || config.disabled) { this.safeSetState({ status: EXITED }, function () { _this3.props.onExited(maybeNode); }); return; } this.props.onExit(maybeNode); this.safeSetState({ status: EXITING }, function () { _this3.props.onExiting(maybeNode); _this3.onTransitionEnd(timeouts.exit, function () { _this3.safeSetState({ status: EXITED }, function () { _this3.props.onExited(maybeNode); }); }); }); }; _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(timeout, handler) { this.setNextCallback(handler); var node = this.props.nodeRef ? this.props.nodeRef.current : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this); var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener; if (!node || doesNotHaveTimeoutOrListener) { setTimeout(this.nextCallback, 0); return; } if (this.props.addEndListener) { var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback], maybeNode = _ref3[0], maybeNextCallback = _ref3[1]; this.props.addEndListener(maybeNode, maybeNextCallback); } 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, _in = _this$props.in, _mountOnEnter = _this$props.mountOnEnter, _unmountOnExit = _this$props.unmountOnExit, _appear = _this$props.appear, _enter = _this$props.enter, _exit = _this$props.exit, _timeout = _this$props.timeout, _addEndListener = _this$props.addEndListener, _onEnter = _this$props.onEnter, _onEntering = _this$props.onEntering, _onEntered = _this$props.onEntered, _onExit = _this$props.onExit, _onExiting = _this$props.onExiting, _onExited = _this$props.onExited, _nodeRef = _this$props.nodeRef, childProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); return ( /*#__PURE__*/ // allows for nested Transitions external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TransitionGroupContext.Provider, { value: null }, typeof children === 'function' ? children(status, childProps) : external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children), childProps)) ); }; return Transition; }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component); Transition.contextType = TransitionGroupContext; Transition.propTypes = false ? 0 : {}; // Name the function so it is clearer in the documentation function Transition_noop() {} Transition.defaultProps = { in: false, mountOnEnter: false, unmountOnExit: false, appear: false, enter: true, exit: true, onEnter: Transition_noop, onEntering: Transition_noop, onEntered: Transition_noop, onExit: Transition_noop, onExiting: Transition_noop, onExited: Transition_noop }; Transition.UNMOUNTED = UNMOUNTED; Transition.EXITED = EXITED; Transition.ENTERING = ENTERING; Transition.ENTERED = ENTERED; Transition.EXITING = EXITING; /* harmony default export */ const esm_Transition = (Transition); ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/canUseDOM.js /* harmony default export */ const canUseDOM = (!!(typeof window !== 'undefined' && window.document && window.document.createElement)); ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/addEventListener.js /* eslint-disable no-return-assign */ var optionsSupported = false; var onceSupported = false; try { var options = { get passive() { return optionsSupported = true; }, get once() { // eslint-disable-next-line no-multi-assign return onceSupported = optionsSupported = true; } }; if (canUseDOM) { window.addEventListener('test', options, options); window.removeEventListener('test', options, true); } } catch (e) { /* */ } /** * An `addEventListener` ponyfill, supports the `once` option * * @param node the element * @param eventName the event name * @param handle the handler * @param options event options */ function addEventListener(node, eventName, handler, options) { if (options && typeof options !== 'boolean' && !onceSupported) { var once = options.once, capture = options.capture; var wrappedHandler = handler; if (!onceSupported && once) { wrappedHandler = handler.__once || function onceHandler(event) { this.removeEventListener(eventName, onceHandler, capture); handler.call(this, event); }; handler.__once = wrappedHandler; } node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture); } node.addEventListener(eventName, handler, options); } /* harmony default export */ const esm_addEventListener = (addEventListener); ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/removeEventListener.js /** * A `removeEventListener` ponyfill * * @param node the element * @param eventName the event name * @param handle the handler * @param options event options */ function removeEventListener(node, eventName, handler, options) { var capture = options && typeof options !== 'boolean' ? options.capture : options; node.removeEventListener(eventName, handler, capture); if (handler.__once) { node.removeEventListener(eventName, handler.__once, capture); } } /* harmony default export */ const esm_removeEventListener = (removeEventListener); ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/listen.js function listen(node, eventName, handler, options) { esm_addEventListener(node, eventName, handler, options); return function () { esm_removeEventListener(node, eventName, handler, options); }; } /* harmony default export */ const esm_listen = (listen); ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/triggerEvent.js /** * Triggers an event on a given element. * * @param node the element * @param eventName the event name to trigger * @param bubbles whether the event should bubble up * @param cancelable whether the event should be cancelable */ function triggerEvent(node, eventName, bubbles, cancelable) { if (bubbles === void 0) { bubbles = false; } if (cancelable === void 0) { cancelable = true; } if (node) { var event = document.createEvent('HTMLEvents'); event.initEvent(eventName, bubbles, cancelable); node.dispatchEvent(event); } } ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/transitionEnd.js function parseDuration(node) { var str = css(node, 'transitionDuration') || ''; var mult = str.indexOf('ms') === -1 ? 1000 : 1; return parseFloat(str) * mult; } function emulateTransitionEnd(element, duration, padding) { if (padding === void 0) { padding = 5; } var called = false; var handle = setTimeout(function () { if (!called) triggerEvent(element, 'transitionend', true); }, duration + padding); var remove = esm_listen(element, 'transitionend', function () { called = true; }, { once: true }); return function () { clearTimeout(handle); remove(); }; } function transitionEnd(element, handler, duration, padding) { if (duration == null) duration = parseDuration(element) || 0; var removeEmulate = emulateTransitionEnd(element, duration, padding); var remove = esm_listen(element, 'transitionend', handler); return function () { removeEmulate(); remove(); }; } ;// CONCATENATED MODULE: ./src/transitionEndListener.ts function transitionEndListener_parseDuration(node, property) { var str = css(node, property) || ''; var mult = str.indexOf('ms') === -1 ? 1000 : 1; return parseFloat(str) * mult; } function transitionEndListener(element, handler) { var duration = transitionEndListener_parseDuration(element, 'transitionDuration'); var delay = transitionEndListener_parseDuration(element, 'transitionDelay'); var remove = transitionEnd(element, function (e) { if (e.target === element) { remove(); handler(e); } }, duration + delay); } ;// CONCATENATED MODULE: ./src/createChainedFunction.tsx /** * Safe chained function * * Will only create a new function if needed, * otherwise will pass back existing functions or null. * * @param {function} functions to chain * @returns {function|null} */ function createChainedFunction() { for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } return funcs.filter(function (f) { return f != null; }).reduce(function (acc, f) { if (typeof f !== 'function') { throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.'); } if (acc === null) return f; return function chainedFunction() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } // @ts-ignore acc.apply(this, args); // @ts-ignore f.apply(this, args); }; }, null); } /* harmony default export */ const src_createChainedFunction = (createChainedFunction); ;// CONCATENATED MODULE: ./src/triggerBrowserReflow.tsx // reading a dimension prop will cause the browser to recalculate, // which will let our animations work function triggerBrowserReflow(node) { // eslint-disable-next-line @typescript-eslint/no-unused-expressions node.offsetHeight; } ;// CONCATENATED MODULE: ./src/Collapse.tsx var Collapse_excluded = ["onEnter", "onEntering", "onEntered", "onExit", "onExiting", "className", "children", "dimension", "getDimensionValue"]; var Collapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Collapse.tsx", _collapseStyles, Collapse_this = undefined; var MARGINS = { height: ['marginTop', 'marginBottom'], width: ['marginLeft', 'marginRight'] }; function getDefaultDimensionValue(dimension, elem) { var offset = "offset" + dimension[0].toUpperCase() + dimension.slice(1); var value = elem[offset]; var margins = MARGINS[dimension]; return value + // @ts-ignore parseInt(css(elem, margins[0]), 10) + // @ts-ignore parseInt(css(elem, margins[1]), 10); } var collapseStyles = (_collapseStyles = {}, _collapseStyles[EXITED] = 'collapse', _collapseStyles[EXITING] = 'collapsing', _collapseStyles[ENTERING] = 'collapsing', _collapseStyles[ENTERED] = 'collapse show', _collapseStyles); var Collapse_propTypes = { /** * Show the component; triggers the expand or collapse animation */ in: (prop_types_default()).bool, /** * Wait until the first "enter" transition to mount the component (add it to the DOM) */ mountOnEnter: (prop_types_default()).bool, /** * Unmount the component (remove it from the DOM) when it is collapsed */ unmountOnExit: (prop_types_default()).bool, /** * Run the expand animation when the component mounts, if it is initially * shown */ appear: (prop_types_default()).bool, /** * Duration of the collapse animation in milliseconds, to ensure that * finishing callbacks are fired even if the original browser transition end * events are canceled */ timeout: (prop_types_default()).number, /** * Callback fired before the component expands */ onEnter: (prop_types_default()).func, /** * Callback fired after the component starts to expand */ onEntering: (prop_types_default()).func, /** * Callback fired after the component has expanded */ onEntered: (prop_types_default()).func, /** * Callback fired before the component collapses */ onExit: (prop_types_default()).func, /** * Callback fired after the component starts to collapse */ onExiting: (prop_types_default()).func, /** * Callback fired after the component has collapsed */ onExited: (prop_types_default()).func, /** * The dimension used when collapsing, or a function that returns the * dimension * * _Note: Bootstrap only partially supports 'width'! * You will need to supply your own CSS animation for the `.width` CSS class._ */ dimension: prop_types_default().oneOfType([prop_types_default().oneOf(['height', 'width']), (prop_types_default()).func]), /** * Function that returns the height or width of the animating DOM node * * Allows for providing some custom logic for how much the Collapse component * should animate in its specified dimension. Called with the current * dimension prop value and the DOM node. * * @default element.offsetWidth | element.offsetHeight */ getDimensionValue: (prop_types_default()).func, /** * ARIA role of collapsible element */ role: (prop_types_default()).string }; var defaultProps = { in: false, timeout: 300, mountOnEnter: false, unmountOnExit: false, appear: false, getDimensionValue: getDefaultDimensionValue }; var Collapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var onEnter = _ref.onEnter, onEntering = _ref.onEntering, onEntered = _ref.onEntered, onExit = _ref.onExit, onExiting = _ref.onExiting, className = _ref.className, children = _ref.children, _ref$dimension = _ref.dimension, dimension = _ref$dimension === void 0 ? 'height' : _ref$dimension, _ref$getDimensionValu = _ref.getDimensionValue, getDimensionValue = _ref$getDimensionValu === void 0 ? getDefaultDimensionValue : _ref$getDimensionValu, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Collapse_excluded); /* Compute dimension */ var computedDimension = typeof dimension === 'function' ? dimension() : dimension; /* -- Expanding -- */ var handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { return src_createChainedFunction(function (elem) { elem.style[computedDimension] = '0'; }, onEnter); }, [computedDimension, onEnter]); var handleEntering = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { return src_createChainedFunction(function (elem) { var scroll = "scroll" + computedDimension[0].toUpperCase() + computedDimension.slice(1); elem.style[computedDimension] = elem[scroll] + "px"; }, onEntering); }, [computedDimension, onEntering]); var handleEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { return src_createChainedFunction(function (elem) { elem.style[computedDimension] = null; }, onEntered); }, [computedDimension, onEntered]); /* -- Collapsing -- */ var handleExit = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { return src_createChainedFunction(function (elem) { elem.style[computedDimension] = getDimensionValue(computedDimension, elem) + "px"; triggerBrowserReflow(elem); }, onExit); }, [onExit, getDimensionValue, computedDimension]); var handleExiting = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { return src_createChainedFunction(function (elem) { elem.style[computedDimension] = null; }, onExiting); }, [computedDimension, onExiting]); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Transition // @ts-ignore , extends_extends({ ref: ref, addEndListener: transitionEndListener }, props, { "aria-expanded": props.role ? props.in : null, onEnter: handleEnter, onEntering: handleEntering, onEntered: handleEntered, onExit: handleExit, onExiting: handleExiting, __self: Collapse_this, __source: { fileName: Collapse_jsxFileName, lineNumber: 222, columnNumber: 7 } }), function (state, innerProps) { return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, extends_extends({}, innerProps, { className: classnames_default()(className, children.props.className, collapseStyles[state], computedDimension === 'width' && 'width') })); }); }); // @ts-ignore Collapse.propTypes = Collapse_propTypes; // @ts-ignore Collapse.defaultProps = defaultProps; /* harmony default export */ const src_Collapse = (Collapse); ;// CONCATENATED MODULE: ./src/AccordionCollapse.tsx var AccordionCollapse_excluded = ["children", "eventKey"]; var AccordionCollapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionCollapse.tsx", AccordionCollapse_this = undefined; var AccordionCollapse_propTypes = { /** * A key that corresponds to the toggler that triggers this collapse's expand or collapse. */ eventKey: (prop_types_default()).string.isRequired, /** Children prop should only contain a single child, and is enforced as such */ children: (prop_types_default()).element.isRequired }; var AccordionCollapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var children = _ref.children, eventKey = _ref.eventKey, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, AccordionCollapse_excluded); var contextEventKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionContext); // Empty SelectableContext is to prevent elements in the collapse // from collapsing the accordion when clicked. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, { value: null, __self: AccordionCollapse_this, __source: { fileName: AccordionCollapse_jsxFileName, lineNumber: 36, columnNumber: 7 } }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Collapse, extends_extends({ ref: ref, in: contextEventKey === eventKey }, props, { __self: AccordionCollapse_this, __source: { fileName: AccordionCollapse_jsxFileName, lineNumber: 37, columnNumber: 9 } }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", { __self: AccordionCollapse_this, __source: { fileName: AccordionCollapse_jsxFileName, lineNumber: 38, columnNumber: 11 } }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children)))); }); AccordionCollapse.propTypes = AccordionCollapse_propTypes; AccordionCollapse.displayName = 'AccordionCollapse'; /* harmony default export */ const src_AccordionCollapse = (AccordionCollapse); ;// CONCATENATED MODULE: ./src/Accordion.tsx var Accordion_excluded = ["as", "activeKey", "bsPrefix", "children", "className", "onSelect"]; var Accordion_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Accordion.tsx", Accordion_this = undefined; var Accordion_propTypes = { /** Set a custom element for this component */ as: (prop_types_default()).elementType, /** @default 'accordion' */ bsPrefix: (prop_types_default()).string, /** The current active key that corresponds to the currently expanded card */ activeKey: (prop_types_default()).string, /** The default active key that is expanded on start */ defaultActiveKey: (prop_types_default()).string }; var Accordion = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) { var _useUncontrolled = useUncontrolled(props, { activeKey: 'onSelect' }), _useUncontrolled$as = _useUncontrolled.as, Component = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as, activeKey = _useUncontrolled.activeKey, bsPrefix = _useUncontrolled.bsPrefix, children = _useUncontrolled.children, className = _useUncontrolled.className, onSelect = _useUncontrolled.onSelect, controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Accordion_excluded); var finalClassName = classnames_default()(className, useBootstrapPrefix(bsPrefix, 'accordion')); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(AccordionContext.Provider, { value: activeKey || null, __self: Accordion_this, __source: { fileName: Accordion_jsxFileName, lineNumber: 62, columnNumber: 5 } }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, { value: onSelect || null, __self: Accordion_this, __source: { fileName: Accordion_jsxFileName, lineNumber: 63, columnNumber: 7 } }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({ ref: ref }, controlledProps, { className: finalClassName, __self: Accordion_this, __source: { fileName: Accordion_jsxFileName, lineNumber: 64, columnNumber: 9 } }), children))); }); Accordion.displayName = 'Accordion'; Accordion.propTypes = Accordion_propTypes; Accordion.Toggle = src_AccordionToggle; Accordion.Collapse = src_AccordionCollapse; /* harmony default export */ const src_Accordion = (Accordion); // EXTERNAL MODULE: ./node_modules/prop-types-extra/lib/index.js var lib = __webpack_require__(517); ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCommittedRef.js /** * Creates a `Ref` whose value is updated in an effect, ensuring the most recent * value is the one rendered with. Generally only required for Concurrent mode usage * where previous work in `render()` may be discarded befor being used. * * This is safe to access in an event handler. * * @param value The `Ref` value */ function useCommittedRef(value) { var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { ref.current = value; }, [value]); return ref; } /* harmony default export */ const esm_useCommittedRef = (useCommittedRef); ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useEventCallback.js function useEventCallback(fn) { var ref = esm_useCommittedRef(fn); return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () { return ref.current && ref.current.apply(ref, arguments); }, [ref]); } ;// CONCATENATED MODULE: ./src/Fade.tsx var Fade_excluded = ["className", "children"]; var Fade_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Fade.tsx", _fadeStyles, Fade_this = undefined; var Fade_propTypes = { /** * Show the component; triggers the fade in or fade out animation */ in: (prop_types_default()).bool, /** * Wait until the first "enter" transition to mount the component (add it to the DOM) */ mountOnEnter: (prop_types_default()).bool, /** * Unmount the component (remove it from the DOM) when it is faded out */ unmountOnExit: (prop_types_default()).bool, /** * Run the fade in animation when the component mounts, if it is initially * shown */ appear: (prop_types_default()).bool, /** * Duration of the fade animation in milliseconds, to ensure that finishing * callbacks are fired even if the original browser transition end events are * canceled */ timeout: (prop_types_default()).number, /** * Callback fired before the component fades in */ onEnter: (prop_types_default()).func, /** * Callback fired after the component starts to fade in */ onEntering: (prop_types_default()).func, /** * Callback fired after the has component faded in */ onEntered: (prop_types_default()).func, /** * Callback fired before the component fades out */ onExit: (prop_types_default()).func, /** * Callback fired after the component starts to fade out */ onExiting: (prop_types_default()).func, /** * Callback fired after the component has faded out */ onExited: (prop_types_default()).func }; var Fade_defaultProps = { in: false, timeout: 300, mountOnEnter: false, unmountOnExit: false, appear: false }; var fadeStyles = (_fadeStyles = {}, _fadeStyles[ENTERING] = 'show', _fadeStyles[ENTERED] = 'show', _fadeStyles); var Fade = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var className = _ref.className, children = _ref.children, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Fade_excluded); var handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (node) { triggerBrowserReflow(node); if (props.onEnter) props.onEnter(node); }, [props]); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Transition, extends_extends({ ref: ref, addEndListener: transitionEndListener }, props, { onEnter: handleEnter, __self: Fade_this, __source: { fileName: Fade_jsxFileName, lineNumber: 101, columnNumber: 7 } }), function (status, innerProps) { return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, extends_extends({}, innerProps, { className: classnames_default()('fade', className, children.props.className, fadeStyles[status]) })); }); }); Fade.propTypes = Fade_propTypes; Fade.defaultProps = Fade_defaultProps; Fade.displayName = 'Fade'; /* harmony default export */ const src_Fade = (Fade); ;// CONCATENATED MODULE: ./src/CloseButton.tsx var CloseButton_excluded = ["label", "onClick", "className"]; var CloseButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CloseButton.tsx", CloseButton_this = undefined; var CloseButton_propTypes = { label: (prop_types_default()).string.isRequired, onClick: (prop_types_default()).func }; var CloseButton_defaultProps = { label: 'Close' }; var CloseButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var label = _ref.label, onClick = _ref.onClick, className = _ref.className, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, CloseButton_excluded); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", extends_extends({ ref: ref, type: "button", className: classnames_default()('close', className), onClick: onClick }, props, { __self: CloseButton_this, __source: { fileName: CloseButton_jsxFileName, lineNumber: 21, columnNumber: 5 } }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", { "aria-hidden": "true", __self: CloseButton_this, __source: { fileName: CloseButton_jsxFileName, lineNumber: 28, columnNumber: 7 } }, "\xD7"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", { className: "sr-only", __self: CloseButton_this, __source: { fileName: CloseButton_jsxFileName, lineNumber: 29, columnNumber: 7 } }, label)); }); CloseButton.displayName = 'CloseButton'; CloseButton.propTypes = CloseButton_propTypes; CloseButton.defaultProps = CloseButton_defaultProps; /* harmony default export */ const src_CloseButton = (CloseButton); ;// CONCATENATED MODULE: ./src/divWithClassName.tsx var divWithClassName_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/divWithClassName.tsx", divWithClassName_this = undefined; /* harmony default export */ const divWithClassName = (function (className) { return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (p, ref) { return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, p, { ref: ref, className: classnames_default()(p.className, className), __self: divWithClassName_this, __source: { fileName: divWithClassName_jsxFileName, lineNumber: 6, columnNumber: 5 } })); }); }); ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/camelize.js var rHyphen = /-(.)/g; function camelize(string) { return string.replace(rHyphen, function (_, chr) { return chr.toUpperCase(); }); } ;// CONCATENATED MODULE: ./src/createWithBsPrefix.tsx var createWithBsPrefix_excluded = ["className", "bsPrefix", "as"]; var createWithBsPrefix_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/createWithBsPrefix.tsx"; var pascalCase = function pascalCase(str) { return str[0].toUpperCase() + camelize(str).slice(1); }; // TODO: emstricten & fix the typing here! `createWithBsPrefix...` function createWithBsPrefix(prefix, _temp) { var _this = this; var _ref = _temp === void 0 ? {} : _temp, _ref$displayName = _ref.displayName, displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName, Component = _ref.Component, defaultProps = _ref.defaultProps; var BsComponent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref2, ref) { var className = _ref2.className, bsPrefix = _ref2.bsPrefix, _ref2$as = _ref2.as, Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, createWithBsPrefix_excluded); var resolvedPrefix = useBootstrapPrefix(bsPrefix, prefix); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tag, extends_extends({ ref: ref, className: classnames_default()(className, resolvedPrefix) }, props, { __self: _this, __source: { fileName: createWithBsPrefix_jsxFileName, lineNumber: 33, columnNumber: 9 } })); }); BsComponent.defaultProps = defaultProps; BsComponent.displayName = displayName; return BsComponent; } ;// CONCATENATED MODULE: ./src/SafeAnchor.tsx var SafeAnchor_excluded = ["as", "disabled", "onKeyDown"]; var SafeAnchor_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/SafeAnchor.tsx", SafeAnchor_this = undefined; var SafeAnchor_propTypes = { href: (prop_types_default()).string, onClick: (prop_types_default()).func, onKeyDown: (prop_types_default()).func, disabled: (prop_types_default()).bool, role: (prop_types_default()).string, tabIndex: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]), /** * this is sort of silly but needed for Button */ as: (prop_types_default()).elementType }; function isTrivialHref(href) { return !href || href.trim() === '#'; } /** * There are situations due to browser quirks or Bootstrap CSS where * an anchor tag is needed, when semantically a button tag is the * better choice. SafeAnchor ensures that when an anchor is used like a * button its accessible. It also emulates input `disabled` behavior for * links, which is usually desirable for Buttons, NavItems, DropdownItems, etc. */ var SafeAnchor = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var _ref$as = _ref.as, Component = _ref$as === void 0 ? 'a' : _ref$as, disabled = _ref.disabled, onKeyDown = _ref.onKeyDown, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, SafeAnchor_excluded); var handleClick = function handleClick(event) { var href = props.href, onClick = props.onClick; if (disabled || isTrivialHref(href)) { event.preventDefault(); } if (disabled) { event.stopPropagation(); return; } if (onClick) { onClick(event); } }; var handleKeyDown = function handleKeyDown(event) { if (event.key === ' ') { event.preventDefault(); handleClick(event); } }; if (isTrivialHref(props.href)) { props.role = props.role || 'button'; // we want to make sure there is a href attribute on the node // otherwise, the cursor incorrectly styled (except with role='button') props.href = props.href || '#'; } if (disabled) { props.tabIndex = -1; props['aria-disabled'] = true; } return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({ ref: ref }, props, { onClick: handleClick, onKeyDown: src_createChainedFunction(handleKeyDown, onKeyDown), __self: SafeAnchor_this, __source: { fileName: SafeAnchor_jsxFileName, lineNumber: 90, columnNumber: 7 } })); }); SafeAnchor.propTypes = SafeAnchor_propTypes; SafeAnchor.displayName = 'SafeAnchor'; /* harmony default export */ const src_SafeAnchor = (SafeAnchor); ;// CONCATENATED MODULE: ./src/Alert.tsx var Alert_excluded = ["bsPrefix", "show", "closeLabel", "className", "children", "variant", "onClose", "dismissible", "transition"]; var Alert_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Alert.tsx", Alert_this = undefined; var DivStyledAsH4 = divWithClassName('h4'); DivStyledAsH4.displayName = 'DivStyledAsH4'; var AlertHeading = createWithBsPrefix('alert-heading', { Component: DivStyledAsH4 }); var AlertLink = createWithBsPrefix('alert-link', { Component: src_SafeAnchor }); var Alert_propTypes = { /** * @default 'alert' */ bsPrefix: (prop_types_default()).string, /** * The Alert visual variant * * @type {'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light'} */ variant: (prop_types_default()).string, /** * Renders a properly aligned dismiss button, as well as * adding extra horizontal padding to the Alert. */ dismissible: (prop_types_default()).bool, /** * Controls the visual state of the Alert. * * @controllable onClose */ show: (prop_types_default()).bool, /** * Callback fired when alert is closed. * * @controllable show */ onClose: (prop_types_default()).func, /** * Sets the text for alert close button. */ closeLabel: (prop_types_default()).string, /** * Animate the alert dismissal. Defaults to using `` animation or use * `false` to disable. A custom `react-transition-group` Transition can also * be provided. */ transition: prop_types_default().oneOfType([(prop_types_default()).bool, lib/* elementType */.nm]) }; var Alert_defaultProps = { show: true, transition: src_Fade, closeLabel: 'Close alert' }; var Alert = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (uncontrolledProps, ref) { var _useUncontrolled = useUncontrolled(uncontrolledProps, { show: 'onClose' }), bsPrefix = _useUncontrolled.bsPrefix, show = _useUncontrolled.show, closeLabel = _useUncontrolled.closeLabel, className = _useUncontrolled.className, children = _useUncontrolled.children, variant = _useUncontrolled.variant, onClose = _useUncontrolled.onClose, dismissible = _useUncontrolled.dismissible, transition = _useUncontrolled.transition, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Alert_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'alert'); var handleClose = useEventCallback(function (e) { if (onClose) { onClose(false, e); } }); var Transition = transition === true ? src_Fade : transition; var alert = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({ role: "alert" }, !Transition ? props : undefined, { ref: ref, className: classnames_default()(className, prefix, variant && prefix + "-" + variant, dismissible && prefix + "-dismissible"), __self: Alert_this, __source: { fileName: Alert_jsxFileName, lineNumber: 119, columnNumber: 7 } }), dismissible && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_CloseButton, { onClick: handleClose, label: closeLabel, __self: Alert_this, __source: { fileName: Alert_jsxFileName, lineNumber: 131, columnNumber: 11 } }), children); if (!Transition) return show ? alert : null; return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, extends_extends({ unmountOnExit: true }, props, { ref: undefined, in: show, __self: Alert_this, __source: { fileName: Alert_jsxFileName, lineNumber: 140, columnNumber: 7 } }), alert); }); Alert.displayName = 'Alert'; Alert.defaultProps = Alert_defaultProps; Alert.propTypes = Alert_propTypes; Alert.Link = AlertLink; Alert.Heading = AlertHeading; /* harmony default export */ const src_Alert = (Alert); ;// CONCATENATED MODULE: ./src/Badge.tsx var Badge_excluded = ["bsPrefix", "variant", "pill", "className", "as"]; var Badge_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Badge.tsx", Badge_this = undefined; var Badge_propTypes = { /** @default 'badge' */ bsPrefix: (prop_types_default()).string, /** * The visual style of the badge * * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'light'|'dark')} */ variant: (prop_types_default()).string, /** * Add the `pill` modifier to make badges more rounded with * some additional horizontal padding */ pill: (prop_types_default()).bool.isRequired, /** @default span */ as: (prop_types_default()).elementType }; var Badge_defaultProps = { pill: false }; var Badge = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var bsPrefix = _ref.bsPrefix, variant = _ref.variant, pill = _ref.pill, className = _ref.className, _ref$as = _ref.as, Component = _ref$as === void 0 ? 'span' : _ref$as, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Badge_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'badge'); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({ ref: ref }, props, { className: classnames_default()(className, prefix, pill && prefix + "-pill", variant && prefix + "-" + variant), __self: Badge_this, __source: { fileName: Badge_jsxFileName, lineNumber: 55, columnNumber: 7 } })); }); Badge.displayName = 'Badge'; Badge.propTypes = Badge_propTypes; Badge.defaultProps = Badge_defaultProps; /* harmony default export */ const src_Badge = (Badge); ;// CONCATENATED MODULE: ./src/BreadcrumbItem.tsx var BreadcrumbItem_excluded = ["bsPrefix", "active", "children", "className", "as", "linkAs", "linkProps", "href", "title", "target"]; var BreadcrumbItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/BreadcrumbItem.tsx", BreadcrumbItem_this = undefined; var BreadcrumbItem_propTypes = { /** * @default 'breadcrumb-item' */ bsPrefix: (prop_types_default()).string, /** * Adds a visual "active" state to a Breadcrumb * Item and disables the link. */ active: (prop_types_default()).bool, /** * `href` attribute for the inner `a` element */ href: (prop_types_default()).string, /** * You can use a custom element type for this component's inner link. */ linkAs: (prop_types_default()).elementType, /** * `title` attribute for the inner `a` element */ title: (prop_types_default()).node, /** * `target` attribute for the inner `a` element */ target: (prop_types_default()).string, /** * Additional props passed as-is to the underlying link for non-active items. */ linkProps: (prop_types_default()).object, as: (prop_types_default()).elementType }; var BreadcrumbItem_defaultProps = { active: false, linkProps: {} }; var BreadcrumbItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var bsPrefix = _ref.bsPrefix, active = _ref.active, children = _ref.children, className = _ref.className, _ref$as = _ref.as, Component = _ref$as === void 0 ? 'li' : _ref$as, _ref$linkAs = _ref.linkAs, LinkComponent = _ref$linkAs === void 0 ? src_SafeAnchor : _ref$linkAs, linkProps = _ref.linkProps, href = _ref.href, title = _ref.title, target = _ref.target, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, BreadcrumbItem_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'breadcrumb-item'); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({ ref: ref }, props, { className: classnames_default()(prefix, className, { active: active }), "aria-current": active ? 'page' : undefined, __self: BreadcrumbItem_this, __source: { fileName: BreadcrumbItem_jsxFileName, lineNumber: 83, columnNumber: 7 } }), active ? children : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(LinkComponent, extends_extends({}, linkProps, { href: href, title: title, target: target, __self: BreadcrumbItem_this, __source: { fileName: BreadcrumbItem_jsxFileName, lineNumber: 92, columnNumber: 11 } }), children)); }); BreadcrumbItem.displayName = 'BreadcrumbItem'; BreadcrumbItem.propTypes = BreadcrumbItem_propTypes; BreadcrumbItem.defaultProps = BreadcrumbItem_defaultProps; /* harmony default export */ const src_BreadcrumbItem = (BreadcrumbItem); ;// CONCATENATED MODULE: ./src/Breadcrumb.tsx var Breadcrumb_excluded = ["bsPrefix", "className", "listProps", "children", "label", "as"]; var Breadcrumb_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Breadcrumb.tsx", Breadcrumb_this = undefined; var Breadcrumb_propTypes = { /** * @default 'breadcrumb' */ bsPrefix: (prop_types_default()).string, /** * ARIA label for the nav element * https://www.w3.org/TR/wai-aria-practices/#breadcrumb */ label: (prop_types_default()).string, /** * Additional props passed as-is to the underlying `
    ` element */ listProps: (prop_types_default()).object, as: (prop_types_default()).elementType }; var Breadcrumb_defaultProps = { label: 'breadcrumb', listProps: {} }; var Breadcrumb = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var bsPrefix = _ref.bsPrefix, className = _ref.className, listProps = _ref.listProps, children = _ref.children, label = _ref.label, _ref$as = _ref.as, Component = _ref$as === void 0 ? 'nav' : _ref$as, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Breadcrumb_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'breadcrumb'); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({ "aria-label": label, className: className, ref: ref }, props, { __self: Breadcrumb_this, __source: { fileName: Breadcrumb_jsxFileName, lineNumber: 62, columnNumber: 7 } }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ol", extends_extends({}, listProps, { className: classnames_default()(prefix, listProps == null ? void 0 : listProps.className), __self: Breadcrumb_this, __source: { fileName: Breadcrumb_jsxFileName, lineNumber: 63, columnNumber: 9 } }), children)); }); Breadcrumb.displayName = 'Breadcrumb'; Breadcrumb.propTypes = Breadcrumb_propTypes; Breadcrumb.defaultProps = Breadcrumb_defaultProps; Breadcrumb.Item = src_BreadcrumbItem; /* harmony default export */ const src_Breadcrumb = (Breadcrumb); ;// CONCATENATED MODULE: ./src/Button.tsx var Button_excluded = ["bsPrefix", "variant", "size", "active", "className", "block", "type", "as"]; var Button_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Button.tsx", Button_this = undefined; var Button_propTypes = { /** * @default 'btn' */ bsPrefix: (prop_types_default()).string, /** * One or more button variant combinations * * buttons may be one of a variety of visual variants such as: * * `'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'link'` * * as well as "outline" versions (prefixed by 'outline-*') * * `'outline-primary', 'outline-secondary', 'outline-success', 'outline-danger', 'outline-warning', 'outline-info', 'outline-dark', 'outline-light'` */ variant: (prop_types_default()).string, /** * Specifies a large or small button. * * @type ('sm'|'lg') */ size: (prop_types_default()).string, /** Spans the full width of the Button parent */ block: (prop_types_default()).bool, /** Manually set the visual state of the button to `:active` */ active: (prop_types_default()).bool, /** * Disables the Button, preventing mouse events, * even if the underlying component is an `` element */ disabled: (prop_types_default()).bool, /** Providing a `href` will render an `` element, _styled_ as a button. */ href: (prop_types_default()).string, /** * Defines HTML button type attribute. * * @default 'button' */ type: prop_types_default().oneOf(['button', 'reset', 'submit', null]), as: (prop_types_default()).elementType }; var Button_defaultProps = { variant: 'primary', active: false, disabled: false }; var Button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var bsPrefix = _ref.bsPrefix, variant = _ref.variant, size = _ref.size, active = _ref.active, className = _ref.className, block = _ref.block, type = _ref.type, as = _ref.as, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Button_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'btn'); var classes = classnames_default()(className, prefix, active && 'active', variant && prefix + "-" + variant, block && prefix + "-block", size && prefix + "-" + size); if (props.href) { return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SafeAnchor, extends_extends({}, props, { as: as, ref: ref, className: classnames_default()(classes, props.disabled && 'disabled'), __self: Button_this, __source: { fileName: Button_jsxFileName, lineNumber: 116, columnNumber: 9 } })); } if (ref) { props.ref = ref; } if (type) { props.type = type; } else if (!as) { props.type = 'button'; } var Component = as || 'button'; return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, { className: classes, __self: Button_this, __source: { fileName: Button_jsxFileName, lineNumber: 136, columnNumber: 12 } })); }); Button.displayName = 'Button'; Button.propTypes = Button_propTypes; Button.defaultProps = Button_defaultProps; /* harmony default export */ const src_Button = (Button); ;// CONCATENATED MODULE: ./src/ButtonGroup.tsx var ButtonGroup_excluded = ["bsPrefix", "size", "toggle", "vertical", "className", "as"]; var ButtonGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ButtonGroup.tsx", ButtonGroup_this = undefined; var ButtonGroup_propTypes = { /** * @default 'btn-group' */ bsPrefix: (prop_types_default()).string, /** * Sets the size for all Buttons in the group. * * @type ('sm'|'lg') */ size: (prop_types_default()).string, /** Make the set of Buttons appear vertically stacked. */ vertical: (prop_types_default()).bool, /** * Display as a button toggle group. * * (Generally it's better to use `ToggleButtonGroup` directly) */ toggle: (prop_types_default()).bool, /** * An ARIA role describing the button group. Usually the default * "group" role is fine. An `aria-label` or `aria-labelledby` * prop is also recommended. */ role: (prop_types_default()).string, as: (prop_types_default()).elementType }; var ButtonGroup_defaultProps = { vertical: false, toggle: false, role: 'group' }; var ButtonGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var bsPrefix = _ref.bsPrefix, size = _ref.size, toggle = _ref.toggle, vertical = _ref.vertical, className = _ref.className, _ref$as = _ref.as, Component = _ref$as === void 0 ? 'div' : _ref$as, rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ButtonGroup_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'btn-group'); var baseClass = prefix; if (vertical) baseClass = prefix + "-vertical"; return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, rest, { ref: ref, className: classnames_default()(className, baseClass, size && prefix + "-" + size, toggle && prefix + "-toggle"), __self: ButtonGroup_this, __source: { fileName: ButtonGroup_jsxFileName, lineNumber: 79, columnNumber: 7 } })); }); ButtonGroup.displayName = 'ButtonGroup'; ButtonGroup.propTypes = ButtonGroup_propTypes; ButtonGroup.defaultProps = ButtonGroup_defaultProps; /* harmony default export */ const src_ButtonGroup = (ButtonGroup); ;// CONCATENATED MODULE: ./src/ButtonToolbar.tsx var ButtonToolbar_excluded = ["bsPrefix", "className"]; var ButtonToolbar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ButtonToolbar.tsx", ButtonToolbar_this = undefined; var ButtonToolbar_propTypes = { /** * @default 'btn-toolbar' */ bsPrefix: (prop_types_default()).string, /** * The ARIA role describing the button toolbar. Generally the default * "toolbar" role is correct. An `aria-label` or `aria-labelledby` * prop is also recommended. */ role: (prop_types_default()).string }; var ButtonToolbar_defaultProps = { role: 'toolbar' }; var ButtonToolbar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var bsPrefix = _ref.bsPrefix, className = _ref.className, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ButtonToolbar_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'btn-toolbar'); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, props, { ref: ref, className: classnames_default()(className, prefix), __self: ButtonToolbar_this, __source: { fileName: ButtonToolbar_jsxFileName, lineNumber: 42, columnNumber: 10 } })); }); ButtonToolbar.displayName = 'ButtonToolbar'; ButtonToolbar.propTypes = ButtonToolbar_propTypes; ButtonToolbar.defaultProps = ButtonToolbar_defaultProps; /* harmony default export */ const src_ButtonToolbar = (ButtonToolbar); ;// CONCATENATED MODULE: ./src/CardContext.tsx var CardContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null); CardContext_context.displayName = 'CardContext'; /* harmony default export */ const CardContext = (CardContext_context); ;// CONCATENATED MODULE: ./src/CardImg.tsx var CardImg_excluded = ["bsPrefix", "className", "variant", "as"]; var CardImg_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardImg.tsx", CardImg_this = undefined; var CardImg_propTypes = { /** * @default 'card-img' */ bsPrefix: (prop_types_default()).string, /** * Defines image position inside * the card. * * @type {('top'|'bottom')} */ variant: prop_types_default().oneOf(['top', 'bottom', null]), as: (prop_types_default()).elementType }; var CardImg_defaultProps = { variant: null }; var CardImg = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595 function (_ref, ref) { var bsPrefix = _ref.bsPrefix, className = _ref.className, variant = _ref.variant, _ref$as = _ref.as, Component = _ref$as === void 0 ? 'img' : _ref$as, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, CardImg_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'card-img'); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({ ref: ref, className: classnames_default()(variant ? prefix + "-" + variant : prefix, className) }, props, { __self: CardImg_this, __source: { fileName: CardImg_jsxFileName, lineNumber: 50, columnNumber: 7 } })); }); CardImg.displayName = 'CardImg'; CardImg.propTypes = CardImg_propTypes; CardImg.defaultProps = CardImg_defaultProps; /* harmony default export */ const src_CardImg = (CardImg); ;// CONCATENATED MODULE: ./src/Card.tsx var Card_excluded = ["bsPrefix", "className", "bg", "text", "border", "body", "children", "as"]; var Card_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Card.tsx", Card_this = undefined; var DivStyledAsH5 = divWithClassName('h5'); var DivStyledAsH6 = divWithClassName('h6'); var CardBody = createWithBsPrefix('card-body'); var CardTitle = createWithBsPrefix('card-title', { Component: DivStyledAsH5 }); var CardSubtitle = createWithBsPrefix('card-subtitle', { Component: DivStyledAsH6 }); var CardLink = createWithBsPrefix('card-link', { Component: 'a' }); var CardText = createWithBsPrefix('card-text', { Component: 'p' }); var CardHeader = createWithBsPrefix('card-header'); var CardFooter = createWithBsPrefix('card-footer'); var CardImgOverlay = createWithBsPrefix('card-img-overlay'); var Card_propTypes = { /** * @default 'card' */ bsPrefix: (prop_types_default()).string, /** * Sets card background * * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light')} */ bg: (prop_types_default()).string, /** * Sets card text color * * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light'|'white'|'muted')} */ text: (prop_types_default()).string, /** * Sets card border color * * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light')} */ border: (prop_types_default()).string, /** * When this prop is set, it creates a Card with a Card.Body inside * passing the children directly to it */ body: (prop_types_default()).bool, as: (prop_types_default()).elementType }; var Card_defaultProps = { body: false }; var Card = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var bsPrefix = _ref.bsPrefix, className = _ref.className, bg = _ref.bg, text = _ref.text, border = _ref.border, body = _ref.body, children = _ref.children, _ref$as = _ref.as, Component = _ref$as === void 0 ? 'div' : _ref$as, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Card_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'card'); var cardContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { return { cardHeaderBsPrefix: prefix + "-header" }; }, [prefix]); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(CardContext.Provider, { value: cardContext, __self: Card_this, __source: { fileName: Card_jsxFileName, lineNumber: 115, columnNumber: 7 } }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({ ref: ref }, props, { className: classnames_default()(className, prefix, bg && "bg-" + bg, text && "text-" + text, border && "border-" + border), __self: Card_this, __source: { fileName: Card_jsxFileName, lineNumber: 116, columnNumber: 9 } }), body ? /*#__PURE__*/ // @ts-ignore external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(CardBody, { __self: Card_this, __source: { fileName: Card_jsxFileName, lineNumber: 129, columnNumber: 13 } }, children) : children)); }); Card.displayName = 'Card'; Card.propTypes = Card_propTypes; Card.defaultProps = Card_defaultProps; Card.Img = src_CardImg; Card.Title = CardTitle; Card.Subtitle = CardSubtitle; Card.Body = CardBody; Card.Link = CardLink; Card.Text = CardText; Card.Header = CardHeader; Card.Footer = CardFooter; Card.ImgOverlay = CardImgOverlay; /* harmony default export */ const src_Card = (Card); ;// CONCATENATED MODULE: ./src/CardColumns.tsx /* harmony default export */ const CardColumns = (createWithBsPrefix('card-columns')); ;// CONCATENATED MODULE: ./src/CardDeck.tsx /* harmony default export */ const CardDeck = (createWithBsPrefix('card-deck')); ;// CONCATENATED MODULE: ./src/CardGroup.tsx /* harmony default export */ const CardGroup = (createWithBsPrefix('card-group')); ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdateEffect.js /** * Runs an effect only when the dependencies have changed, skipping the * initial "on mount" run. Caution, if the dependency list never changes, * the effect is **never run** * * ```ts * const ref = useRef(null); * * // focuses an element only if the focus changes, and not on mount * useUpdateEffect(() => { * const element = ref.current?.children[focusedIdx] as HTMLElement * * element?.focus() * * }, [focusedIndex]) * ``` * @param effect An effect to run on mount * * @category effects */ function useUpdateEffect(fn, deps) { var isFirst = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { if (isFirst.current) { isFirst.current = false; return; } return fn(); }, deps); } /* harmony default export */ const esm_useUpdateEffect = (useUpdateEffect); ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js /** * Track whether a component is current mounted. Generally less preferable than * properlly canceling effects so they don't run after a component is unmounted, * but helpful in cases where that isn't feasible, such as a `Promise` resolution. * * @returns a function that returns the current isMounted state of the component * * ```ts * const [data, setData] = useState(null) * const isMounted = useMounted() * * useEffect(() => { * fetchdata().then((newData) => { * if (isMounted()) { * setData(newData); * } * }) * }) * ``` */ function useMounted() { var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true); var isMounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(function () { return mounted.current; }); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { return function () { mounted.current = false; }; }, []); return isMounted.current; } ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdatedRef.js /** * Returns a ref that is immediately updated with the new value * * @param value The Ref value * @category refs */ function useUpdatedRef(value) { var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value); valueRef.current = value; return valueRef; } ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useWillUnmount.js /** * Attach a callback that fires when a component unmounts * * @param fn Handler to run when the component unmounts * @category effects */ function useWillUnmount(fn) { var onUnmount = useUpdatedRef(fn); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { return function () { return onUnmount.current(); }; }, []); } ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useTimeout.js /* * Browsers including Internet Explorer, Chrome, Safari, and Firefox store the * delay as a 32-bit signed integer internally. This causes an integer overflow * when using delays larger than 2,147,483,647 ms (about 24.8 days), * resulting in the timeout being executed immediately. * * via: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout */ var MAX_DELAY_MS = Math.pow(2, 31) - 1; function setChainedTimeout(handleRef, fn, timeoutAtMs) { var delayMs = timeoutAtMs - Date.now(); handleRef.current = delayMs <= MAX_DELAY_MS ? setTimeout(fn, delayMs) : setTimeout(function () { return setChainedTimeout(handleRef, fn, timeoutAtMs); }, MAX_DELAY_MS); } /** * Returns a controller object for setting a timeout that is properly cleaned up * once the component unmounts. New timeouts cancel and replace existing ones. * * * * ```tsx * const { set, clear } = useTimeout(); * const [hello, showHello] = useState(false); * //Display hello after 5 seconds * set(() => showHello(true), 5000); * return ( *
    * {hello ?

    Hello

    : null} *
    * ); * ``` */ function useTimeout() { var isMounted = useMounted(); // types are confused between node and web here IDK var handleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(); useWillUnmount(function () { return clearTimeout(handleRef.current); }); return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { var clear = function clear() { return clearTimeout(handleRef.current); }; function set(fn, delayMs) { if (delayMs === void 0) { delayMs = 0; } if (!isMounted()) return; clear(); if (delayMs <= MAX_DELAY_MS) { // For simplicity, if the timeout is short, just set a normal timeout. handleRef.current = setTimeout(fn, delayMs); } else { setChainedTimeout(handleRef, fn, Date.now() + delayMs); } } return { set: set, clear: clear }; }, []); } ;// CONCATENATED MODULE: ./src/CarouselCaption.tsx /* harmony default export */ const CarouselCaption = (createWithBsPrefix('carousel-caption')); ;// CONCATENATED MODULE: ./src/CarouselItem.tsx var CarouselItem_excluded = ["as", "bsPrefix", "children", "className"]; var CarouselItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CarouselItem.tsx", CarouselItem_this = undefined; var CarouselItem_propTypes = { /** Set a custom element for this component */ as: (prop_types_default()).elementType, /** @default 'carousel-item' */ bsPrefix: (prop_types_default()).string, /** The amount of time to delay between automatically cycling this specific item. Will default to the Carousel's `interval` prop value if none is specified. */ interval: (prop_types_default()).number }; var CarouselItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var _ref$as = _ref.as, Component = _ref$as === void 0 ? 'div' : _ref$as, bsPrefix = _ref.bsPrefix, children = _ref.children, className = _ref.className, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, CarouselItem_excluded); var finalClassName = classnames_default()(className, useBootstrapPrefix(bsPrefix, 'carousel-item')); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({ ref: ref }, props, { className: finalClassName, __self: CarouselItem_this, __source: { fileName: CarouselItem_jsxFileName, lineNumber: 44, columnNumber: 7 } }), children); }); CarouselItem.displayName = 'CarouselItem'; CarouselItem.propTypes = CarouselItem_propTypes; /* harmony default export */ const src_CarouselItem = (CarouselItem); ;// CONCATENATED MODULE: ./src/ElementChildren.tsx /** * Iterates through children that are typically specified as `props.children`, * but only maps over children that are "valid elements". * * The mapFunction provided index will be normalised to the components mapped, * so an invalid component would not increase the index. * */ function map(children, func) { var index = 0; return external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, function (child) { return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child) ? func(child, index++) : child; }); } /** * Iterates through children that are "valid elements". * * The provided forEachFunc(child, index) will be called for each * leaf child with the index reflecting the position relative to "valid components". */ function forEach(children, func) { var index = 0; external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.forEach(children, function (child) { if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) func(child, index++); }); } ;// CONCATENATED MODULE: ./src/Carousel.tsx var Carousel_excluded = ["as", "bsPrefix", "slide", "fade", "controls", "indicators", "activeIndex", "onSelect", "onSlide", "onSlid", "interval", "keyboard", "onKeyDown", "pause", "onMouseOver", "onMouseOut", "wrap", "touch", "onTouchStart", "onTouchMove", "onTouchEnd", "prevIcon", "prevLabel", "nextIcon", "nextLabel", "className", "children"]; var Carousel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Carousel.tsx"; var SWIPE_THRESHOLD = 40; var Carousel_propTypes = { /** * @default 'carousel' */ bsPrefix: (prop_types_default()).string, as: (prop_types_default()).elementType, /** * Enables animation on the Carousel as it transitions between slides. */ slide: (prop_types_default()).bool, /** Animates slides with a crossfade animation instead of the default slide animation */ fade: (prop_types_default()).bool, /** * Show the Carousel previous and next arrows for changing the current slide */ controls: (prop_types_default()).bool, /** * Show a set of slide position indicators */ indicators: (prop_types_default()).bool, /** * Controls the current visible slide * * @controllable onSelect */ activeIndex: (prop_types_default()).number, /** * Callback fired when the active item changes. * * ```js * (eventKey: number, event: Object | null) => void * ``` * * @controllable activeIndex */ onSelect: (prop_types_default()).func, /** * Callback fired when a slide transition starts. * * ```js * (eventKey: number, direction: 'left' | 'right') => void */ onSlide: (prop_types_default()).func, /** * Callback fired when a slide transition ends. * * ```js * (eventKey: number, direction: 'left' | 'right') => void */ onSlid: (prop_types_default()).func, /** * The amount of time to delay between automatically cycling an item. If `null`, carousel will not automatically cycle. */ interval: (prop_types_default()).number, /** Whether the carousel should react to keyboard events. */ keyboard: (prop_types_default()).bool, /** * If set to `"hover"`, pauses the cycling of the carousel on `mouseenter` and resumes the cycling of the carousel on `mouseleave`. If set to `false`, hovering over the carousel won't pause it. * * On touch-enabled devices, when set to `"hover"`, cycling will pause on `touchend` (once the user finished interacting with the carousel) for two intervals, before automatically resuming. Note that this is in addition to the above mouse behavior. */ pause: prop_types_default().oneOf(['hover', false]), /** Whether the carousel should cycle continuously or have hard stops. */ wrap: (prop_types_default()).bool, /** * Whether the carousel should support left/right swipe interactions on touchscreen devices. */ touch: (prop_types_default()).bool, /** Override the default button icon for the "previous" control */ prevIcon: (prop_types_default()).node, /** * Label shown to screen readers only, can be used to show the previous element * in the carousel. * Set to null to deactivate. */ prevLabel: (prop_types_default()).string, /** Override the default button icon for the "next" control */ nextIcon: (prop_types_default()).node, /** * Label shown to screen readers only, can be used to show the next element * in the carousel. * Set to null to deactivate. */ nextLabel: (prop_types_default()).string }; var Carousel_defaultProps = { slide: true, fade: false, controls: true, indicators: true, defaultActiveIndex: 0, interval: 5000, keyboard: true, pause: 'hover', wrap: true, touch: true, prevIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", { "aria-hidden": "true", className: "carousel-control-prev-icon", __self: undefined, __source: { fileName: Carousel_jsxFileName, lineNumber: 190, columnNumber: 13 } }), prevLabel: 'Previous', nextIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", { "aria-hidden": "true", className: "carousel-control-next-icon", __self: undefined, __source: { fileName: Carousel_jsxFileName, lineNumber: 193, columnNumber: 13 } }), nextLabel: 'Next' }; function isVisible(element) { if (!element || !element.style || !element.parentNode || !element.parentNode.style) { return false; } var elementStyle = getComputedStyle(element); return elementStyle.display !== 'none' && elementStyle.visibility !== 'hidden' && getComputedStyle(element.parentNode).display !== 'none'; } function CarouselFunc(uncontrolledProps, ref) { var _this = this; var _useUncontrolled = useUncontrolled(uncontrolledProps, { activeIndex: 'onSelect' }), _useUncontrolled$as = _useUncontrolled.as, Component = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as, bsPrefix = _useUncontrolled.bsPrefix, slide = _useUncontrolled.slide, fade = _useUncontrolled.fade, controls = _useUncontrolled.controls, indicators = _useUncontrolled.indicators, activeIndex = _useUncontrolled.activeIndex, onSelect = _useUncontrolled.onSelect, onSlide = _useUncontrolled.onSlide, onSlid = _useUncontrolled.onSlid, interval = _useUncontrolled.interval, keyboard = _useUncontrolled.keyboard, onKeyDown = _useUncontrolled.onKeyDown, pause = _useUncontrolled.pause, onMouseOver = _useUncontrolled.onMouseOver, onMouseOut = _useUncontrolled.onMouseOut, wrap = _useUncontrolled.wrap, touch = _useUncontrolled.touch, onTouchStart = _useUncontrolled.onTouchStart, onTouchMove = _useUncontrolled.onTouchMove, onTouchEnd = _useUncontrolled.onTouchEnd, prevIcon = _useUncontrolled.prevIcon, prevLabel = _useUncontrolled.prevLabel, nextIcon = _useUncontrolled.nextIcon, nextLabel = _useUncontrolled.nextLabel, className = _useUncontrolled.className, children = _useUncontrolled.children, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Carousel_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'carousel'); var nextDirectionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null); var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('next'), direction = _useState[0], setDirection = _useState[1]; var _useState2 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false), paused = _useState2[0], setPaused = _useState2[1]; var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false), isSliding = _useState3[0], setIsSliding = _useState3[1]; var _useState4 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(activeIndex || 0), renderedActiveIndex = _useState4[0], setRenderedActiveIndex = _useState4[1]; if (!isSliding && activeIndex !== renderedActiveIndex) { if (nextDirectionRef.current) { setDirection(nextDirectionRef.current); } else { setDirection((activeIndex || 0) > renderedActiveIndex ? 'next' : 'prev'); } if (slide) { setIsSliding(true); } setRenderedActiveIndex(activeIndex || 0); } (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { if (nextDirectionRef.current) { nextDirectionRef.current = null; } }); var numChildren = 0; var activeChildInterval; // Iterate to grab all of the children's interval values // (and count them, too) forEach(children, function (child, index) { ++numChildren; if (index === activeIndex) { activeChildInterval = child.props.interval; } }); var activeChildIntervalRef = esm_useCommittedRef(activeChildInterval); var prev = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) { if (isSliding) { return; } var nextActiveIndex = renderedActiveIndex - 1; if (nextActiveIndex < 0) { if (!wrap) { return; } nextActiveIndex = numChildren - 1; } nextDirectionRef.current = 'prev'; if (onSelect) { onSelect(nextActiveIndex, event); } }, [isSliding, renderedActiveIndex, onSelect, wrap, numChildren]); // This is used in the setInterval, so it should not invalidate. var next = useEventCallback(function (event) { if (isSliding) { return; } var nextActiveIndex = renderedActiveIndex + 1; if (nextActiveIndex >= numChildren) { if (!wrap) { return; } nextActiveIndex = 0; } nextDirectionRef.current = 'next'; if (onSelect) { onSelect(nextActiveIndex, event); } }); var elementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () { return { element: elementRef.current, prev: prev, next: next }; }); // This is used in the setInterval, so it should not invalidate. var nextWhenVisible = useEventCallback(function () { if (!document.hidden && isVisible(elementRef.current)) { next(); } }); var slideDirection = direction === 'next' ? 'left' : 'right'; esm_useUpdateEffect(function () { if (slide) { // These callbacks will be handled by the callbacks. return; } if (onSlide) { onSlide(renderedActiveIndex, slideDirection); } if (onSlid) { onSlid(renderedActiveIndex, slideDirection); } }, [renderedActiveIndex]); var orderClassName = prefix + "-item-" + direction; var directionalClassName = prefix + "-item-" + slideDirection; var handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (node) { triggerBrowserReflow(node); if (onSlide) { onSlide(renderedActiveIndex, slideDirection); } }, [onSlide, renderedActiveIndex, slideDirection]); var handleEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () { setIsSliding(false); if (onSlid) { onSlid(renderedActiveIndex, slideDirection); } }, [onSlid, renderedActiveIndex, slideDirection]); var handleKeyDown = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) { if (keyboard && !/input|textarea/i.test(event.target.tagName)) { switch (event.key) { case 'ArrowLeft': event.preventDefault(); prev(event); return; case 'ArrowRight': event.preventDefault(); next(event); return; default: } } if (onKeyDown) { onKeyDown(event); } }, [keyboard, onKeyDown, prev, next]); var handleMouseOver = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) { if (pause === 'hover') { setPaused(true); } if (onMouseOver) { onMouseOver(event); } }, [pause, onMouseOver]); var handleMouseOut = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) { setPaused(false); if (onMouseOut) { onMouseOut(event); } }, [onMouseOut]); var touchStartXRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0); var touchDeltaXRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0); var touchUnpauseTimeout = useTimeout(); var handleTouchStart = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) { touchStartXRef.current = event.touches[0].clientX; touchDeltaXRef.current = 0; if (pause === 'hover') { setPaused(true); } if (onTouchStart) { onTouchStart(event); } }, [pause, onTouchStart]); var handleTouchMove = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) { if (event.touches && event.touches.length > 1) { touchDeltaXRef.current = 0; } else { touchDeltaXRef.current = event.touches[0].clientX - touchStartXRef.current; } if (onTouchMove) { onTouchMove(event); } }, [onTouchMove]); var handleTouchEnd = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) { if (touch) { var touchDeltaX = touchDeltaXRef.current; if (Math.abs(touchDeltaX) > SWIPE_THRESHOLD) { if (touchDeltaX > 0) { prev(event); } else { next(event); } } } if (pause === 'hover') { touchUnpauseTimeout.set(function () { setPaused(false); }, interval || undefined); } if (onTouchEnd) { onTouchEnd(event); } }, [touch, pause, prev, next, touchUnpauseTimeout, interval, onTouchEnd]); var shouldPlay = interval != null && !paused && !isSliding; var intervalHandleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { var _ref, _activeChildIntervalR; if (!shouldPlay) { return undefined; } intervalHandleRef.current = window.setInterval(document.visibilityState ? nextWhenVisible : next, (_ref = (_activeChildIntervalR = activeChildIntervalRef.current) != null ? _activeChildIntervalR : interval) != null ? _ref : undefined); return function () { if (intervalHandleRef.current !== null) { clearInterval(intervalHandleRef.current); } }; }, [shouldPlay, next, activeChildIntervalRef, interval, nextWhenVisible]); var indicatorOnClicks = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { return indicators && Array.from({ length: numChildren }, function (_, index) { return function (event) { if (onSelect) { onSelect(index, event); } }; }); }, [indicators, numChildren, onSelect]); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({ ref: elementRef }, props, { onKeyDown: handleKeyDown, onMouseOver: handleMouseOver, onMouseOut: handleMouseOut, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, className: classnames_default()(className, prefix, slide && 'slide', fade && prefix + "-fade"), __self: this, __source: { fileName: Carousel_jsxFileName, lineNumber: 533, columnNumber: 5 } }), indicators && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ol", { className: prefix + "-indicators", __self: this, __source: { fileName: Carousel_jsxFileName, lineNumber: 550, columnNumber: 9 } }, map(children, function (_child, index) { return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", { key: index, className: index === renderedActiveIndex ? 'active' : undefined, onClick: indicatorOnClicks ? indicatorOnClicks[index] : undefined, __self: _this, __source: { fileName: Carousel_jsxFileName, lineNumber: 552, columnNumber: 13 } }); })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", { className: prefix + "-inner", __self: this, __source: { fileName: Carousel_jsxFileName, lineNumber: 561, columnNumber: 7 } }, map(children, function (child, index) { var isActive = index === renderedActiveIndex; return slide ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Transition, { in: isActive, onEnter: isActive ? handleEnter : undefined, onEntered: isActive ? handleEntered : undefined, addEndListener: transitionEndListener, __self: _this, __source: { fileName: Carousel_jsxFileName, lineNumber: 566, columnNumber: 13 } }, function (status) { return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, { className: classnames_default()(child.props.className, isActive && status !== 'entered' && orderClassName, (status === 'entered' || status === 'exiting') && 'active', (status === 'entering' || status === 'exiting') && directionalClassName) }); }) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, { className: classnames_default()(child.props.className, isActive && 'active') }); })), controls && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, (wrap || activeIndex !== 0) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SafeAnchor, { className: prefix + "-control-prev", onClick: prev, __self: this, __source: { fileName: Carousel_jsxFileName, lineNumber: 598, columnNumber: 13 } }, prevIcon, prevLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", { className: "sr-only", __self: this, __source: { fileName: Carousel_jsxFileName, lineNumber: 600, columnNumber: 29 } }, prevLabel)), (wrap || activeIndex !== numChildren - 1) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SafeAnchor, { className: prefix + "-control-next", onClick: next, __self: this, __source: { fileName: Carousel_jsxFileName, lineNumber: 604, columnNumber: 13 } }, nextIcon, nextLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", { className: "sr-only", __self: this, __source: { fileName: Carousel_jsxFileName, lineNumber: 606, columnNumber: 29 } }, nextLabel)))); } var Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(CarouselFunc); Carousel.displayName = 'Carousel'; Carousel.propTypes = Carousel_propTypes; Carousel.defaultProps = Carousel_defaultProps; Carousel.Caption = CarouselCaption; Carousel.Item = src_CarouselItem; /* harmony default export */ const src_Carousel = (Carousel); ;// CONCATENATED MODULE: ./src/Col.tsx var Col_excluded = ["bsPrefix", "className", "as"]; var Col_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Col.tsx", Col_this = undefined; var DEVICE_SIZES = ['xl', 'lg', 'md', 'sm', 'xs']; var colSize = prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).number, (prop_types_default()).string, prop_types_default().oneOf(['auto'])]); var stringOrNumber = prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]); var column = prop_types_default().oneOfType([colSize, prop_types_default().shape({ size: colSize, order: stringOrNumber, offset: stringOrNumber })]); var Col_propTypes = { /** * @default 'col' */ bsPrefix: (prop_types_default()).string, as: (prop_types_default()).elementType, /** * The number of columns to span on extra small devices (<576px) * * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })} */ xs: column, /** * The number of columns to span on small devices (≥576px) * * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })} */ sm: column, /** * The number of columns to span on medium devices (≥768px) * * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })} */ md: column, /** * The number of columns to span on large devices (≥992px) * * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })} */ lg: column, /** * The number of columns to span on extra large devices (≥1200px) * * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })} */ xl: column }; var Col = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595 function (_ref, ref) { var bsPrefix = _ref.bsPrefix, className = _ref.className, _ref$as = _ref.as, Component = _ref$as === void 0 ? 'div' : _ref$as, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Col_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'col'); var spans = []; var classes = []; DEVICE_SIZES.forEach(function (brkPoint) { var propValue = props[brkPoint]; delete props[brkPoint]; var span; var offset; var order; if (typeof propValue === 'object' && propValue != null) { var _propValue$span = propValue.span; span = _propValue$span === void 0 ? true : _propValue$span; offset = propValue.offset; order = propValue.order; } else { span = propValue; } var infix = brkPoint !== 'xs' ? "-" + brkPoint : ''; if (span) spans.push(span === true ? "" + prefix + infix : "" + prefix + infix + "-" + span); if (order != null) classes.push("order" + infix + "-" + order); if (offset != null) classes.push("offset" + infix + "-" + offset); }); if (!spans.length) { spans.push(prefix); // plain 'col' } return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, { ref: ref, className: classnames_default().apply(void 0, [className].concat(spans, classes)), __self: Col_this, __source: { fileName: Col_jsxFileName, lineNumber: 149, columnNumber: 7 } })); }); Col.displayName = 'Col'; Col.propTypes = Col_propTypes; /* harmony default export */ const src_Col = (Col); ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/matches.js var matchesImpl; /** * Checks if a given element matches a selector. * * @param node the element * @param selector the selector */ function matches(node, selector) { if (!matchesImpl) { var body = document.body; var nativeMatch = body.matches || body.matchesSelector || body.webkitMatchesSelector || body.mozMatchesSelector || body.msMatchesSelector; matchesImpl = function matchesImpl(n, s) { return nativeMatch.call(n, s); }; } return matchesImpl(node, selector); } ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/querySelectorAll.js var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice); /** * Runs `querySelectorAll` on a given element. * * @param element the element * @param selector the selector */ function qsa(element, selector) { return toArray(element.querySelectorAll(selector)); } ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/usePrevious.js /** * Store the last of some value. Tracked via a `Ref` only updating it * after the component renders. * * Helpful if you need to compare a prop value to it's previous value during render. * * ```ts * function Component(props) { * const lastProps = usePrevious(props) * * if (lastProps.foo !== props.foo) * resetValueFromProps(props.foo) * } * ``` * * @param value the value to track */ function usePrevious(value) { var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { ref.current = value; }); return ref.current; } ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useForceUpdate.js /** * Returns a function that triggers a component update. the hook equivalent to * `this.forceUpdate()` in a class component. In most cases using a state value directly * is preferable but may be required in some advanced usages of refs for interop or * when direct DOM manipulation is required. * * ```ts * const forceUpdate = useForceUpdate(); * * const updateOnClick = useCallback(() => { * forceUpdate() * }, [forceUpdate]) * * return * ``` */ function useForceUpdate() { // The toggling state value is designed to defeat React optimizations for skipping // updates when they are stricting equal to the last state value var _useReducer = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(function (state) { return !state; }, false), dispatch = _useReducer[1]; return dispatch; } ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useEventListener.js /** * Attaches an event handler outside directly to specified DOM element * bypassing the react synthetic event system. * * @param element The target to listen for events on * @param event The DOM event name * @param handler An event handler * @param capture Whether or not to listen during the capture event phase */ function useEventListener(eventTarget, event, listener, capture) { if (capture === void 0) { capture = false; } var handler = useEventCallback(listener); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { var target = typeof eventTarget === 'function' ? eventTarget() : eventTarget; target.addEventListener(event, handler, capture); return function () { return target.removeEventListener(event, handler, capture); }; }, [eventTarget]); } ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useGlobalListener.js /** * Attaches an event handler outside directly to the `document`, * bypassing the react synthetic event system. * * ```ts * useGlobalListener('keydown', (event) => { * console.log(event.key) * }) * ``` * * @param event The DOM event name * @param handler An event handler * @param capture Whether or not to listen during the capture event phase */ function useGlobalListener(event, handler, capture) { if (capture === void 0) { capture = false; } var documentTarget = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () { return document; }, []); return useEventListener(documentTarget, event, handler, capture); } ;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/DropdownContext.js var DropdownContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null); /* harmony default export */ const esm_DropdownContext = (DropdownContext); ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js /** * A convenience hook around `useState` designed to be paired with * the component [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) api. * Callback refs are useful over `useRef()` when you need to respond to the ref being set * instead of lazily accessing it in an effect. * * ```ts * const [element, attachRef] = useCallbackRef() * * useEffect(() => { * if (!element) return * * const calendar = new FullCalendar.Calendar(element) * * return () => { * calendar.destroy() * } * }, [element]) * * return
    * ``` * * @category refs */ function useCallbackRef() { return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null); } ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useSafeState.js function useSafeState(state) { var isMounted = useMounted(); return [state[0], (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (nextState) { if (!isMounted()) return; return state[1](nextState); }, [isMounted, state[1]])]; } /* harmony default export */ const esm_useSafeState = (useSafeState); ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getBasePlacement.js function getBasePlacement(placement) { return placement.split('-')[0]; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js function getBoundingClientRect(element) { var rect = element.getBoundingClientRect(); return { width: rect.width, height: rect.height, top: rect.top, right: rect.right, bottom: rect.bottom, left: rect.left, x: rect.left, y: rect.top }; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js // Returns the layout rect of an element relative to its offsetParent. Layout // means it doesn't take into account transforms. function getLayoutRect(element) { var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed. // Fixes https://github.com/popperjs/popper-core/issues/1223 var width = element.offsetWidth; var height = element.offsetHeight; if (Math.abs(clientRect.width - width) <= 1) { width = clientRect.width; } if (Math.abs(clientRect.height - height) <= 1) { height = clientRect.height; } return { x: element.offsetLeft, y: element.offsetTop, width: width, height: height }; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindow.js function getWindow(node) { if (node == null) { return window; } if (node.toString() !== '[object Window]') { var ownerDocument = node.ownerDocument; return ownerDocument ? ownerDocument.defaultView || window : window; } return node; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js function isElement(node) { var OwnElement = getWindow(node).Element; return node instanceof OwnElement || node instanceof Element; } function isHTMLElement(node) { var OwnElement = getWindow(node).HTMLElement; return node instanceof OwnElement || node instanceof HTMLElement; } function isShadowRoot(node) { // IE 11 has no ShadowRoot if (typeof ShadowRoot === 'undefined') { return false; } var OwnElement = getWindow(node).ShadowRoot; return node instanceof OwnElement || node instanceof ShadowRoot; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/contains.js function contains(parent, child) { var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method if (parent.contains(child)) { return true; } // then fallback to custom implementation with Shadow DOM support else if (rootNode && isShadowRoot(rootNode)) { var next = child; do { if (next && parent.isSameNode(next)) { return true; } // $FlowFixMe[prop-missing]: need a better way to handle this... next = next.parentNode || next.host; } while (next); } // Give up, the result is false return false; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js function getNodeName(element) { return element ? (element.nodeName || '').toLowerCase() : null; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js function dom_utils_getComputedStyle_getComputedStyle(element) { return getWindow(element).getComputedStyle(element); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js function isTableElement(element) { return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js function getDocumentElement(element) { // $FlowFixMe[incompatible-return]: assume body is always available return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] element.document) || window.document).documentElement; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js function getParentNode(element) { if (getNodeName(element) === 'html') { return element; } return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle // $FlowFixMe[incompatible-return] // $FlowFixMe[prop-missing] element.assignedSlot || // step into the shadow DOM of the parent of a slotted node element.parentNode || ( // DOM Element detected isShadowRoot(element) ? element.host : null) || // ShadowRoot detected // $FlowFixMe[incompatible-call]: HTMLElement is a Node getDocumentElement(element) // fallback ); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js function getTrueOffsetParent(element) { if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 dom_utils_getComputedStyle_getComputedStyle(element).position === 'fixed') { return null; } return element.offsetParent; } // `.offsetParent` reports `null` for fixed elements, while absolute elements // return the containing block function getContainingBlock(element) { var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1; var isIE = navigator.userAgent.indexOf('Trident') !== -1; if (isIE && isHTMLElement(element)) { // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport var elementCss = dom_utils_getComputedStyle_getComputedStyle(element); if (elementCss.position === 'fixed') { return null; } } var currentNode = getParentNode(element); while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) { var css = dom_utils_getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that // create a containing block. // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') { return currentNode; } else { currentNode = currentNode.parentNode; } } return null; } // Gets the closest ancestor positioned element. Handles some edge cases, // such as table ancestors and cross browser bugs. function getOffsetParent(element) { var window = getWindow(element); var offsetParent = getTrueOffsetParent(element); while (offsetParent && isTableElement(offsetParent) && dom_utils_getComputedStyle_getComputedStyle(offsetParent).position === 'static') { offsetParent = getTrueOffsetParent(offsetParent); } if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && dom_utils_getComputedStyle_getComputedStyle(offsetParent).position === 'static')) { return window; } return offsetParent || getContainingBlock(element) || window; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js function getMainAxisFromPlacement(placement) { return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js var math_max = Math.max; var math_min = Math.min; var round = Math.round; ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/within.js function within(min, value, max) { return math_max(min, math_min(value, max)); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js function getFreshSideObject() { return { top: 0, right: 0, bottom: 0, left: 0 }; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js function mergePaddingObject(paddingObject) { return Object.assign({}, getFreshSideObject(), paddingObject); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/expandToHashMap.js function expandToHashMap(value, keys) { return keys.reduce(function (hashMap, key) { hashMap[key] = value; return hashMap; }, {}); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/enums.js var enums_top = 'top'; var bottom = 'bottom'; var right = 'right'; var left = 'left'; var auto = 'auto'; var basePlacements = [enums_top, bottom, right, left]; var start = 'start'; var end = 'end'; var clippingParents = 'clippingParents'; var viewport = 'viewport'; var popper = 'popper'; var reference = 'reference'; var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) { return acc.concat([placement + "-" + start, placement + "-" + end]); }, []); var enums_placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) { return acc.concat([placement, placement + "-" + start, placement + "-" + end]); }, []); // modifiers that need to read the DOM var beforeRead = 'beforeRead'; var read = 'read'; var afterRead = 'afterRead'; // pure-logic modifiers var beforeMain = 'beforeMain'; var main = 'main'; var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state) var beforeWrite = 'beforeWrite'; var write = 'write'; var afterWrite = 'afterWrite'; var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/arrow.js // eslint-disable-next-line import/no-unused-modules var toPaddingObject = function toPaddingObject(padding, state) { padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { placement: state.placement })) : padding; return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); }; function arrow(_ref) { var _state$modifiersData$; var state = _ref.state, name = _ref.name, options = _ref.options; var arrowElement = state.elements.arrow; var popperOffsets = state.modifiersData.popperOffsets; var basePlacement = getBasePlacement(state.placement); var axis = getMainAxisFromPlacement(basePlacement); var isVertical = [left, right].indexOf(basePlacement) >= 0; var len = isVertical ? 'height' : 'width'; if (!arrowElement || !popperOffsets) { return; } var paddingObject = toPaddingObject(options.padding, state); var arrowRect = getLayoutRect(arrowElement); var minProp = axis === 'y' ? enums_top : left; var maxProp = axis === 'y' ? bottom : right; var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len]; var startDiff = popperOffsets[axis] - state.rects.reference[axis]; var arrowOffsetParent = getOffsetParent(arrowElement); var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is // outside of the popper bounds var min = paddingObject[minProp]; var max = clientSize - arrowRect[len] - paddingObject[maxProp]; var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; var offset = within(min, center, max); // Prevents breaking syntax highlighting... var axisProp = axis; state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$); } function effect(_ref2) { var state = _ref2.state, options = _ref2.options; var _options$element = options.element, arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element; if (arrowElement == null) { return; } // CSS selector if (typeof arrowElement === 'string') { arrowElement = state.elements.popper.querySelector(arrowElement); if (!arrowElement) { return; } } if (false) {} if (!contains(state.elements.popper, arrowElement)) { if (false) {} return; } state.elements.arrow = arrowElement; } // eslint-disable-next-line import/no-unused-modules /* harmony default export */ const modifiers_arrow = ({ name: 'arrow', enabled: true, phase: 'main', fn: arrow, effect: effect, requires: ['popperOffsets'], requiresIfExists: ['preventOverflow'] }); ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/computeStyles.js // eslint-disable-next-line import/no-unused-modules var unsetSides = { top: 'auto', right: 'auto', bottom: 'auto', left: 'auto' }; // Round the offsets to the nearest suitable subpixel based on the DPR. // Zooming can change the DPR, but it seems to report a value that will // cleanly divide the values into the appropriate subpixels. function roundOffsetsByDPR(_ref) { var x = _ref.x, y = _ref.y; var win = window; var dpr = win.devicePixelRatio || 1; return { x: round(round(x * dpr) / dpr) || 0, y: round(round(y * dpr) / dpr) || 0 }; } function mapToStyles(_ref2) { var _Object$assign2; var popper = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets; var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y; var hasX = offsets.hasOwnProperty('x'); var hasY = offsets.hasOwnProperty('y'); var sideX = left; var sideY = enums_top; var win = window; if (adaptive) { var offsetParent = getOffsetParent(popper); var heightProp = 'clientHeight'; var widthProp = 'clientWidth'; if (offsetParent === getWindow(popper)) { offsetParent = getDocumentElement(popper); if (dom_utils_getComputedStyle_getComputedStyle(offsetParent).position !== 'static') { heightProp = 'scrollHeight'; widthProp = 'scrollWidth'; } } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it offsetParent = offsetParent; if (placement === enums_top) { sideY = bottom; // $FlowFixMe[prop-missing] y -= offsetParent[heightProp] - popperRect.height; y *= gpuAcceleration ? 1 : -1; } if (placement === left) { sideX = right; // $FlowFixMe[prop-missing] x -= offsetParent[widthProp] - popperRect.width; x *= gpuAcceleration ? 1 : -1; } } var commonStyles = Object.assign({ position: position }, adaptive && unsetSides); if (gpuAcceleration) { var _Object$assign; return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); } return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); } function computeStyles(_ref4) { var state = _ref4.state, options = _ref4.options; var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; if (false) { var transitionProperty; } var commonStyles = { placement: getBasePlacement(state.placement), popper: state.elements.popper, popperRect: state.rects.popper, gpuAcceleration: gpuAcceleration }; if (state.modifiersData.popperOffsets != null) { state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { offsets: state.modifiersData.popperOffsets, position: state.options.strategy, adaptive: adaptive, roundOffsets: roundOffsets }))); } if (state.modifiersData.arrow != null) { state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { offsets: state.modifiersData.arrow, position: 'absolute', adaptive: false, roundOffsets: roundOffsets }))); } state.attributes.popper = Object.assign({}, state.attributes.popper, { 'data-popper-placement': state.placement }); } // eslint-disable-next-line import/no-unused-modules /* harmony default export */ const modifiers_computeStyles = ({ name: 'computeStyles', enabled: true, phase: 'beforeWrite', fn: computeStyles, data: {} }); ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/eventListeners.js // eslint-disable-next-line import/no-unused-modules var passive = { passive: true }; function eventListeners_effect(_ref) { var state = _ref.state, instance = _ref.instance, options = _ref.options; var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; var window = getWindow(state.elements.popper); var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); if (scroll) { scrollParents.forEach(function (scrollParent) { scrollParent.addEventListener('scroll', instance.update, passive); }); } if (resize) { window.addEventListener('resize', instance.update, passive); } return function () { if (scroll) { scrollParents.forEach(function (scrollParent) { scrollParent.removeEventListener('scroll', instance.update, passive); }); } if (resize) { window.removeEventListener('resize', instance.update, passive); } }; } // eslint-disable-next-line import/no-unused-modules /* harmony default export */ const eventListeners = ({ name: 'eventListeners', enabled: true, phase: 'write', fn: function fn() {}, effect: eventListeners_effect, data: {} }); ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; function getOppositePlacement(placement) { return placement.replace(/left|right|bottom|top/g, function (matched) { return hash[matched]; }); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js var getOppositeVariationPlacement_hash = { start: 'end', end: 'start' }; function getOppositeVariationPlacement(placement) { return placement.replace(/start|end/g, function (matched) { return getOppositeVariationPlacement_hash[matched]; }); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js function getWindowScroll(node) { var win = getWindow(node); var scrollLeft = win.pageXOffset; var scrollTop = win.pageYOffset; return { scrollLeft: scrollLeft, scrollTop: scrollTop }; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js function getWindowScrollBarX(element) { // If has a CSS width greater than the viewport, then this will be // incorrect for RTL. // Popper 1 is broken in this case and never had a bug report so let's assume // it's not an issue. I don't think anyone ever specifies width on // anyway. // Browsers where the left scrollbar doesn't cause an issue report `0` for // this (e.g. Edge 2019, IE11, Safari) return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js function getViewportRect(element) { var win = getWindow(element); var html = getDocumentElement(element); var visualViewport = win.visualViewport; var width = html.clientWidth; var height = html.clientHeight; var x = 0; var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper // can be obscured underneath it. // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even // if it isn't open, so if this isn't available, the popper will be detected // to overflow the bottom of the screen too early. if (visualViewport) { width = visualViewport.width; height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently) // In Chrome, it returns a value very close to 0 (+/-) but contains rounding // errors due to floating point numbers, so we need to check precision. // Safari returns a number <= 0, usually < -1 when pinch-zoomed // Feature detection fails in mobile emulation mode in Chrome. // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) < // 0.001 // Fallback here: "Not Safari" userAgent if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { x = visualViewport.offsetLeft; y = visualViewport.offsetTop; } } return { width: width, height: height, x: x + getWindowScrollBarX(element), y: y }; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js // Gets the entire size of the scrollable document area, even extending outside // of the `` and `` rect bounds if horizontally scrollable function getDocumentRect(element) { var _element$ownerDocumen; var html = getDocumentElement(element); var winScroll = getWindowScroll(element); var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; var width = math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); var height = math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); var x = -winScroll.scrollLeft + getWindowScrollBarX(element); var y = -winScroll.scrollTop; if (dom_utils_getComputedStyle_getComputedStyle(body || html).direction === 'rtl') { x += math_max(html.clientWidth, body ? body.clientWidth : 0) - width; } return { width: width, height: height, x: x, y: y }; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js function isScrollParent(element) { // Firefox wants us to check `-x` and `-y` variations as well var _getComputedStyle = dom_utils_getComputedStyle_getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js function getScrollParent(node) { if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { // $FlowFixMe[incompatible-return]: assume body is always available return node.ownerDocument.body; } if (isHTMLElement(node) && isScrollParent(node)) { return node; } return getScrollParent(getParentNode(node)); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js /* given a DOM element, return the list of all scroll parents, up the list of ancesors until we get to the top window object. This list is what we attach scroll listeners to, because if any of these parent elements scroll, we'll need to re-calculate the reference element's position. */ function listScrollParents(element, list) { var _element$ownerDocumen; if (list === void 0) { list = []; } var scrollParent = getScrollParent(element); var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); var win = getWindow(scrollParent); var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; var updatedList = list.concat(target); return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here updatedList.concat(listScrollParents(getParentNode(target))); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js function rectToClientRect(rect) { return Object.assign({}, rect, { left: rect.x, top: rect.y, right: rect.x + rect.width, bottom: rect.y + rect.height }); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js function getInnerBoundingClientRect(element) { var rect = getBoundingClientRect(element); rect.top = rect.top + element.clientTop; rect.left = rect.left + element.clientLeft; rect.bottom = rect.top + element.clientHeight; rect.right = rect.left + element.clientWidth; rect.width = element.clientWidth; rect.height = element.clientHeight; rect.x = rect.left; rect.y = rect.top; return rect; } function getClientRectFromMixedType(element, clippingParent) { return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); } // A "clipping parent" is an overflowable container with the characteristic of // clipping (or hiding) overflowing elements with a position different from // `initial` function getClippingParents(element) { var clippingParents = listScrollParents(getParentNode(element)); var canEscapeClipping = ['absolute', 'fixed'].indexOf(dom_utils_getComputedStyle_getComputedStyle(element).position) >= 0; var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; if (!isElement(clipperElement)) { return []; } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 return clippingParents.filter(function (clippingParent) { return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; }); } // Gets the maximum area that the element is visible in due to any number of // clipping parents function getClippingRect(element, boundary, rootBoundary) { var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary); var clippingParents = [].concat(mainClippingParents, [rootBoundary]); var firstClippingParent = clippingParents[0]; var clippingRect = clippingParents.reduce(function (accRect, clippingParent) { var rect = getClientRectFromMixedType(element, clippingParent); accRect.top = math_max(rect.top, accRect.top); accRect.right = math_min(rect.right, accRect.right); accRect.bottom = math_min(rect.bottom, accRect.bottom); accRect.left = math_max(rect.left, accRect.left); return accRect; }, getClientRectFromMixedType(element, firstClippingParent)); clippingRect.width = clippingRect.right - clippingRect.left; clippingRect.height = clippingRect.bottom - clippingRect.top; clippingRect.x = clippingRect.left; clippingRect.y = clippingRect.top; return clippingRect; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getVariation.js function getVariation(placement) { return placement.split('-')[1]; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeOffsets.js function computeOffsets(_ref) { var reference = _ref.reference, element = _ref.element, placement = _ref.placement; var basePlacement = placement ? getBasePlacement(placement) : null; var variation = placement ? getVariation(placement) : null; var commonX = reference.x + reference.width / 2 - element.width / 2; var commonY = reference.y + reference.height / 2 - element.height / 2; var offsets; switch (basePlacement) { case enums_top: offsets = { x: commonX, y: reference.y - element.height }; break; case bottom: offsets = { x: commonX, y: reference.y + reference.height }; break; case right: offsets = { x: reference.x + reference.width, y: commonY }; break; case left: offsets = { x: reference.x - element.width, y: commonY }; break; default: offsets = { x: reference.x, y: reference.y }; } var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; if (mainAxis != null) { var len = mainAxis === 'y' ? 'height' : 'width'; switch (variation) { case start: offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); break; case end: offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); break; default: } } return offsets; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/detectOverflow.js // eslint-disable-next-line import/no-unused-modules function detectOverflow(state, options) { if (options === void 0) { options = {}; } var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); var altContext = elementContext === popper ? reference : popper; var referenceElement = state.elements.reference; var popperRect = state.rects.popper; var element = state.elements[altBoundary ? altContext : elementContext]; var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary); var referenceClientRect = getBoundingClientRect(referenceElement); var popperOffsets = computeOffsets({ reference: referenceClientRect, element: popperRect, strategy: 'absolute', placement: placement }); var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect // 0 or negative = within the clipping rect var overflowOffsets = { top: clippingClientRect.top - elementClientRect.top + paddingObject.top, bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, left: clippingClientRect.left - elementClientRect.left + paddingObject.left, right: elementClientRect.right - clippingClientRect.right + paddingObject.right }; var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element if (elementContext === popper && offsetData) { var offset = offsetData[placement]; Object.keys(overflowOffsets).forEach(function (key) { var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; var axis = [enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x'; overflowOffsets[key] += offset[axis] * multiply; }); } return overflowOffsets; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js function computeAutoPlacement(state, options) { if (options === void 0) { options = {}; } var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? enums_placements : _options$allowedAutoP; var variation = getVariation(placement); var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) { return getVariation(placement) === variation; }) : basePlacements; var allowedPlacements = placements.filter(function (placement) { return allowedAutoPlacements.indexOf(placement) >= 0; }); if (allowedPlacements.length === 0) { allowedPlacements = placements; if (false) {} } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... var overflows = allowedPlacements.reduce(function (acc, placement) { acc[placement] = detectOverflow(state, { placement: placement, boundary: boundary, rootBoundary: rootBoundary, padding: padding })[getBasePlacement(placement)]; return acc; }, {}); return Object.keys(overflows).sort(function (a, b) { return overflows[a] - overflows[b]; }); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/flip.js // eslint-disable-next-line import/no-unused-modules function getExpandedFallbackPlacements(placement) { if (getBasePlacement(placement) === auto) { return []; } var oppositePlacement = getOppositePlacement(placement); return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; } function flip(_ref) { var state = _ref.state, options = _ref.options, name = _ref.name; if (state.modifiersData[name]._skip) { return; } var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; var preferredPlacement = state.options.placement; var basePlacement = getBasePlacement(preferredPlacement); var isBasePlacement = basePlacement === preferredPlacement; var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) { return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, { placement: placement, boundary: boundary, rootBoundary: rootBoundary, padding: padding, flipVariations: flipVariations, allowedAutoPlacements: allowedAutoPlacements }) : placement); }, []); var referenceRect = state.rects.reference; var popperRect = state.rects.popper; var checksMap = new Map(); var makeFallbackChecks = true; var firstFittingPlacement = placements[0]; for (var i = 0; i < placements.length; i++) { var placement = placements[i]; var _basePlacement = getBasePlacement(placement); var isStartVariation = getVariation(placement) === start; var isVertical = [enums_top, bottom].indexOf(_basePlacement) >= 0; var len = isVertical ? 'width' : 'height'; var overflow = detectOverflow(state, { placement: placement, boundary: boundary, rootBoundary: rootBoundary, altBoundary: altBoundary, padding: padding }); var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : enums_top; if (referenceRect[len] > popperRect[len]) { mainVariationSide = getOppositePlacement(mainVariationSide); } var altVariationSide = getOppositePlacement(mainVariationSide); var checks = []; if (checkMainAxis) { checks.push(overflow[_basePlacement] <= 0); } if (checkAltAxis) { checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); } if (checks.every(function (check) { return check; })) { firstFittingPlacement = placement; makeFallbackChecks = false; break; } checksMap.set(placement, checks); } if (makeFallbackChecks) { // `2` may be desired in some cases – research later var numberOfChecks = flipVariations ? 3 : 1; var _loop = function _loop(_i) { var fittingPlacement = placements.find(function (placement) { var checks = checksMap.get(placement); if (checks) { return checks.slice(0, _i).every(function (check) { return check; }); } }); if (fittingPlacement) { firstFittingPlacement = fittingPlacement; return "break"; } }; for (var _i = numberOfChecks; _i > 0; _i--) { var _ret = _loop(_i); if (_ret === "break") break; } } if (state.placement !== firstFittingPlacement) { state.modifiersData[name]._skip = true; state.placement = firstFittingPlacement; state.reset = true; } } // eslint-disable-next-line import/no-unused-modules /* harmony default export */ const modifiers_flip = ({ name: 'flip', enabled: true, phase: 'main', fn: flip, requiresIfExists: ['offset'], data: { _skip: false } }); ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/hide.js function getSideOffsets(overflow, rect, preventedOffsets) { if (preventedOffsets === void 0) { preventedOffsets = { x: 0, y: 0 }; } return { top: overflow.top - rect.height - preventedOffsets.y, right: overflow.right - rect.width + preventedOffsets.x, bottom: overflow.bottom - rect.height + preventedOffsets.y, left: overflow.left - rect.width - preventedOffsets.x }; } function isAnySideFullyClipped(overflow) { return [enums_top, right, bottom, left].some(function (side) { return overflow[side] >= 0; }); } function hide(_ref) { var state = _ref.state, name = _ref.name; var referenceRect = state.rects.reference; var popperRect = state.rects.popper; var preventedOffsets = state.modifiersData.preventOverflow; var referenceOverflow = detectOverflow(state, { elementContext: 'reference' }); var popperAltOverflow = detectOverflow(state, { altBoundary: true }); var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); state.modifiersData[name] = { referenceClippingOffsets: referenceClippingOffsets, popperEscapeOffsets: popperEscapeOffsets, isReferenceHidden: isReferenceHidden, hasPopperEscaped: hasPopperEscaped }; state.attributes.popper = Object.assign({}, state.attributes.popper, { 'data-popper-reference-hidden': isReferenceHidden, 'data-popper-escaped': hasPopperEscaped }); } // eslint-disable-next-line import/no-unused-modules /* harmony default export */ const modifiers_hide = ({ name: 'hide', enabled: true, phase: 'main', requiresIfExists: ['preventOverflow'], fn: hide }); ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/offset.js function distanceAndSkiddingToXY(placement, rects, offset) { var basePlacement = getBasePlacement(placement); var invertDistance = [left, enums_top].indexOf(basePlacement) >= 0 ? -1 : 1; var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { placement: placement })) : offset, skidding = _ref[0], distance = _ref[1]; skidding = skidding || 0; distance = (distance || 0) * invertDistance; return [left, right].indexOf(basePlacement) >= 0 ? { x: distance, y: skidding } : { x: skidding, y: distance }; } function offset(_ref2) { var state = _ref2.state, options = _ref2.options, name = _ref2.name; var _options$offset = options.offset, offset = _options$offset === void 0 ? [0, 0] : _options$offset; var data = enums_placements.reduce(function (acc, placement) { acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset); return acc; }, {}); var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; if (state.modifiersData.popperOffsets != null) { state.modifiersData.popperOffsets.x += x; state.modifiersData.popperOffsets.y += y; } state.modifiersData[name] = data; } // eslint-disable-next-line import/no-unused-modules /* harmony default export */ const modifiers_offset = ({ name: 'offset', enabled: true, phase: 'main', requires: ['popperOffsets'], fn: offset }); ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js function popperOffsets(_ref) { var state = _ref.state, name = _ref.name; // Offsets are the actual position the popper needs to have to be // properly positioned near its reference element // This is the most basic placement, and will be adjusted by // the modifiers in the next step state.modifiersData[name] = computeOffsets({ reference: state.rects.reference, element: state.rects.popper, strategy: 'absolute', placement: state.placement }); } // eslint-disable-next-line import/no-unused-modules /* harmony default export */ const modifiers_popperOffsets = ({ name: 'popperOffsets', enabled: true, phase: 'read', fn: popperOffsets, data: {} }); ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getAltAxis.js function getAltAxis(axis) { return axis === 'x' ? 'y' : 'x'; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js function preventOverflow(_ref) { var state = _ref.state, options = _ref.options, name = _ref.name; var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; var overflow = detectOverflow(state, { boundary: boundary, rootBoundary: rootBoundary, padding: padding, altBoundary: altBoundary }); var basePlacement = getBasePlacement(state.placement); var variation = getVariation(state.placement); var isBasePlacement = !variation; var mainAxis = getMainAxisFromPlacement(basePlacement); var altAxis = getAltAxis(mainAxis); var popperOffsets = state.modifiersData.popperOffsets; var referenceRect = state.rects.reference; var popperRect = state.rects.popper; var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { placement: state.placement })) : tetherOffset; var data = { x: 0, y: 0 }; if (!popperOffsets) { return; } if (checkMainAxis || checkAltAxis) { var mainSide = mainAxis === 'y' ? enums_top : left; var altSide = mainAxis === 'y' ? bottom : right; var len = mainAxis === 'y' ? 'height' : 'width'; var offset = popperOffsets[mainAxis]; var min = popperOffsets[mainAxis] + overflow[mainSide]; var max = popperOffsets[mainAxis] - overflow[altSide]; var additive = tether ? -popperRect[len] / 2 : 0; var minLen = variation === start ? referenceRect[len] : popperRect[len]; var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go // outside the reference bounds var arrowElement = state.elements.arrow; var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { width: 0, height: 0 }; var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject(); var arrowPaddingMin = arrowPaddingObject[mainSide]; var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want // to include its full size in the calculation. If the reference is small // and near the edge of a boundary, the popper can overflow even if the // reference is not overflowing as well (e.g. virtual elements with no // width or height) var arrowLen = within(0, referenceRect[len], arrowRect[len]); var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue; var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue; var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0; var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset; var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue; if (checkMainAxis) { var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max); popperOffsets[mainAxis] = preventedOffset; data[mainAxis] = preventedOffset - offset; } if (checkAltAxis) { var _mainSide = mainAxis === 'x' ? enums_top : left; var _altSide = mainAxis === 'x' ? bottom : right; var _offset = popperOffsets[altAxis]; var _min = _offset + overflow[_mainSide]; var _max = _offset - overflow[_altSide]; var _preventedOffset = within(tether ? math_min(_min, tetherMin) : _min, _offset, tether ? math_max(_max, tetherMax) : _max); popperOffsets[altAxis] = _preventedOffset; data[altAxis] = _preventedOffset - _offset; } } state.modifiersData[name] = data; } // eslint-disable-next-line import/no-unused-modules /* harmony default export */ const modifiers_preventOverflow = ({ name: 'preventOverflow', enabled: true, phase: 'main', fn: preventOverflow, requiresIfExists: ['offset'] }); ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js function getHTMLElementScroll(element) { return { scrollLeft: element.scrollLeft, scrollTop: element.scrollTop }; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js function getNodeScroll(node) { if (node === getWindow(node) || !isHTMLElement(node)) { return getWindowScroll(node); } else { return getHTMLElementScroll(node); } } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js // Returns the composite rect of an element relative to its offsetParent. // Composite means it takes into account transforms as well as layout. function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { if (isFixed === void 0) { isFixed = false; } var documentElement = getDocumentElement(offsetParent); var rect = getBoundingClientRect(elementOrVirtualElement); var isOffsetParentAnElement = isHTMLElement(offsetParent); var scroll = { scrollLeft: 0, scrollTop: 0 }; var offsets = { x: 0, y: 0 }; if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 isScrollParent(documentElement)) { scroll = getNodeScroll(offsetParent); } if (isHTMLElement(offsetParent)) { offsets = getBoundingClientRect(offsetParent); offsets.x += offsetParent.clientLeft; offsets.y += offsetParent.clientTop; } else if (documentElement) { offsets.x = getWindowScrollBarX(documentElement); } } return { x: rect.left + scroll.scrollLeft - offsets.x, y: rect.top + scroll.scrollTop - offsets.y, width: rect.width, height: rect.height }; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/orderModifiers.js // source: https://stackoverflow.com/questions/49875255 function order(modifiers) { var map = new Map(); var visited = new Set(); var result = []; modifiers.forEach(function (modifier) { map.set(modifier.name, modifier); }); // On visiting object, check for its dependencies and visit them recursively function sort(modifier) { visited.add(modifier.name); var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); requires.forEach(function (dep) { if (!visited.has(dep)) { var depModifier = map.get(dep); if (depModifier) { sort(depModifier); } } }); result.push(modifier); } modifiers.forEach(function (modifier) { if (!visited.has(modifier.name)) { // check for visited object sort(modifier); } }); return result; } function orderModifiers(modifiers) { // order based on dependencies var orderedModifiers = order(modifiers); // order based on phase return modifierPhases.reduce(function (acc, phase) { return acc.concat(orderedModifiers.filter(function (modifier) { return modifier.phase === phase; })); }, []); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/debounce.js function debounce(fn) { var pending; return function () { if (!pending) { pending = new Promise(function (resolve) { Promise.resolve().then(function () { pending = undefined; resolve(fn()); }); }); } return pending; }; } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergeByName.js function mergeByName(modifiers) { var merged = modifiers.reduce(function (merged, current) { var existing = merged[current.name]; merged[current.name] = existing ? Object.assign({}, existing, current, { options: Object.assign({}, existing.options, current.options), data: Object.assign({}, existing.data, current.data) }) : current; return merged; }, {}); // IE11 does not support Object.values return Object.keys(merged).map(function (key) { return merged[key]; }); } ;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/createPopper.js var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.'; var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.'; var DEFAULT_OPTIONS = { placement: 'bottom', modifiers: [], strategy: 'absolute' }; function areValidElements() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return !args.some(function (element) { return !(element && typeof element.getBoundingClientRect === 'function'); }); } function popperGenerator(generatorOptions) { if (generatorOptions === void 0) { generatorOptions = {}; } var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; return function createPopper(reference, popper, options) { if (options === void 0) { options = defaultOptions; } var state = { placement: 'bottom', orderedModifiers: [], options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), modifiersData: {}, elements: { reference: reference, popper: popper }, attributes: {}, styles: {} }; var effectCleanupFns = []; var isDestroyed = false; var instance = { state: state, setOptions: function setOptions(options) { cleanupModifierEffects(); state.options = Object.assign({}, defaultOptions, state.options, options); state.scrollParents = { reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], popper: listScrollParents(popper) }; // Orders the modifiers based on their dependencies and `phase` // properties var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers state.orderedModifiers = orderedModifiers.filter(function (m) { return m.enabled; }); // Validate the provided modifiers so that the consumer will get warned // if one of the modifiers is invalid for any reason if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; } runModifierEffects(); return instance.update(); }, // Sync update – it will always be executed, even if not necessary. This // is useful for low frequency updates where sync behavior simplifies the // logic. // For high frequency updates (e.g. `resize` and `scroll` events), always // prefer the async Popper#update method forceUpdate: function forceUpdate() { if (isDestroyed) { return; } var _state$elements = state.elements, reference = _state$elements.reference, popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements // anymore if (!areValidElements(reference, popper)) { if (false) {} return; } // Store the reference and popper rects to be read by modifiers state.rects = { reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'), popper: getLayoutRect(popper) }; // Modifiers have the ability to reset the current update cycle. The // most common use case for this is the `flip` modifier changing the // placement, which then needs to re-run all the modifiers, because the // logic was previously ran for the previous placement and is therefore // stale/incorrect state.reset = false; state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier // is filled with the initial data specified by the modifier. This means // it doesn't persist and is fresh on each update. // To ensure persistent data, use `${name}#persistent` state.orderedModifiers.forEach(function (modifier) { return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); }); var __debug_loops__ = 0; for (var index = 0; index < state.orderedModifiers.length; index++) { if (false) {} if (state.reset === true) { state.reset = false; index = -1; continue; } var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; if (typeof fn === 'function') { state = fn({ state: state, options: _options, name: name, instance: instance }) || state; } } }, // Async and optimistically optimized update – it will not be executed if // not necessary (debounced to run at most once-per-tick) update: debounce(function () { return new Promise(function (resolve) { instance.forceUpdate(); resolve(state); }); }), destroy: function destroy() { cleanupModifierEffects(); isDestroyed = true; } }; if (!areValidElements(reference, popper)) { if (false) {} return instance; } instance.setOptions(options).then(function (state) { if (!isDestroyed && options.onFirstUpdate) { options.onFirstUpdate(state); } }); // Modifiers have the ability to execute arbitrary code before the first // update cycle runs. They will be executed in the same order as the update // cycle. This is useful when a modifier adds some persistent data that // other modifiers need to use, but the modifier is run after the dependent // one. function runModifierEffects() { state.orderedModifiers.forEach(function (_ref3) { var name = _ref3.name, _ref3$options = _ref3.options, options = _ref3$options === void 0 ? {} : _ref3$options, effect = _ref3.effect; if (typeof effect === 'function') { var cleanupFn = effect({ state: state, name: name, instance: instance, options: options }); var noopFn = function noopFn() {}; effectCleanupFns.push(cleanupFn || noopFn); } }); } function cleanupModifierEffects() { effectCleanupFns.forEach(function (fn) { return fn(); }); effectCleanupFns = []; } return instance; }; } var createPopper = /*#__PURE__*/(/* unused pure expression or super */ null && (popperGenerator())); // eslint-disable-next-line import/no-unused-modules ;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/popper.js // For the common JS build we will turn this file into a bundle with no imports. // This is b/c the Popper lib is all esm files, and would break in a common js only environment var popper_createPopper = popperGenerator({ defaultModifiers: [modifiers_hide, modifiers_popperOffsets, modifiers_computeStyles, eventListeners, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow] }); ;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/usePopper.js var initialPopperStyles = function initialPopperStyles(position) { return { position: position, top: '0', left: '0', opacity: '0', pointerEvents: 'none' }; }; var disabledApplyStylesModifier = { name: 'applyStyles', enabled: false }; // until docjs supports type exports... var ariaDescribedByModifier = { name: 'ariaDescribedBy', enabled: true, phase: 'afterWrite', effect: function effect(_ref) { var state = _ref.state; return function () { var _state$elements = state.elements, reference = _state$elements.reference, popper = _state$elements.popper; if ('removeAttribute' in reference) { var ids = (reference.getAttribute('aria-describedby') || '').split(',').filter(function (id) { return id.trim() !== popper.id; }); if (!ids.length) reference.removeAttribute('aria-describedby');else reference.setAttribute('aria-describedby', ids.join(',')); } }; }, fn: function fn(_ref2) { var _popper$getAttribute; var state = _ref2.state; var _state$elements2 = state.elements, popper = _state$elements2.popper, reference = _state$elements2.reference; var role = (_popper$getAttribute = popper.getAttribute('role')) == null ? void 0 : _popper$getAttribute.toLowerCase(); if (popper.id && role === 'tooltip' && 'setAttribute' in reference) { var ids = reference.getAttribute('aria-describedby'); if (ids && ids.split(',').indexOf(popper.id) !== -1) { return; } reference.setAttribute('aria-describedby', ids ? ids + "," + popper.id : popper.id); } } }; var EMPTY_MODIFIERS = []; /** * Position an element relative some reference element using Popper.js * * @param referenceElement * @param popperElement * @param {object} options * @param {object=} options.modifiers Popper.js modifiers * @param {boolean=} options.enabled toggle the popper functionality on/off * @param {string=} options.placement The popper element placement relative to the reference element * @param {string=} options.strategy the positioning strategy * @param {boolean=} options.eventsEnabled have Popper listen on window resize events to reposition the element * @param {function=} options.onCreate called when the popper is created * @param {function=} options.onUpdate called when the popper is updated * * @returns {UsePopperState} The popper state */ function usePopper(referenceElement, popperElement, _temp) { var _ref3 = _temp === void 0 ? {} : _temp, _ref3$enabled = _ref3.enabled, enabled = _ref3$enabled === void 0 ? true : _ref3$enabled, _ref3$placement = _ref3.placement, placement = _ref3$placement === void 0 ? 'bottom' : _ref3$placement, _ref3$strategy = _ref3.strategy, strategy = _ref3$strategy === void 0 ? 'absolute' : _ref3$strategy, _ref3$modifiers = _ref3.modifiers, modifiers = _ref3$modifiers === void 0 ? EMPTY_MODIFIERS : _ref3$modifiers, config = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref3, ["enabled", "placement", "strategy", "modifiers"]); var popperInstanceRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(); var update = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () { var _popperInstanceRef$cu; (_popperInstanceRef$cu = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu.update(); }, []); var forceUpdate = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () { var _popperInstanceRef$cu2; (_popperInstanceRef$cu2 = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu2.forceUpdate(); }, []); var _useSafeState = esm_useSafeState((0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({ placement: placement, update: update, forceUpdate: forceUpdate, attributes: {}, styles: { popper: initialPopperStyles(strategy), arrow: {} } })), popperState = _useSafeState[0], setState = _useSafeState[1]; var updateModifier = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { return { name: 'updateStateModifier', enabled: true, phase: 'write', requires: ['computeStyles'], fn: function fn(_ref4) { var state = _ref4.state; var styles = {}; var attributes = {}; Object.keys(state.elements).forEach(function (element) { styles[element] = state.styles[element]; attributes[element] = state.attributes[element]; }); setState({ state: state, styles: styles, attributes: attributes, update: update, forceUpdate: forceUpdate, placement: state.placement }); } }; }, [update, forceUpdate, setState]); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { if (!popperInstanceRef.current || !enabled) return; popperInstanceRef.current.setOptions({ placement: placement, strategy: strategy, modifiers: [].concat(modifiers, [updateModifier, disabledApplyStylesModifier]) }); // intentionally NOT re-running on new modifiers // eslint-disable-next-line react-hooks/exhaustive-deps }, [strategy, placement, updateModifier, enabled]); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { if (!enabled || referenceElement == null || popperElement == null) { return undefined; } popperInstanceRef.current = popper_createPopper(referenceElement, popperElement, extends_extends({}, config, { placement: placement, strategy: strategy, modifiers: [].concat(modifiers, [ariaDescribedByModifier, updateModifier]) })); return function () { if (popperInstanceRef.current != null) { popperInstanceRef.current.destroy(); popperInstanceRef.current = undefined; setState(function (s) { return extends_extends({}, s, { attributes: {}, styles: { popper: initialPopperStyles(strategy) } }); }); } }; // This is only run once to _create_ the popper // eslint-disable-next-line react-hooks/exhaustive-deps }, [enabled, referenceElement, popperElement]); return popperState; } /* harmony default export */ const esm_usePopper = (usePopper); ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/contains.js /* eslint-disable no-bitwise, no-cond-assign */ /** * Checks if an element contains another given element. * * @param context the context element * @param node the element to check */ function contains_contains(context, node) { // HTML DOM and SVG DOM may have different support levels, // so we need to check on context instead of a document root element. if (context.contains) return context.contains(node); if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16); } // EXTERNAL MODULE: ./node_modules/warning/warning.js var warning = __webpack_require__(459); var warning_default = /*#__PURE__*/__webpack_require__.n(warning); ;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/safeFindDOMNode.js function safeFindDOMNode(componentOrElement) { if (componentOrElement && 'setState' in componentOrElement) { return external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(componentOrElement); } return componentOrElement != null ? componentOrElement : null; } ;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/ownerDocument.js /* harmony default export */ const esm_ownerDocument = (function (componentOrElement) { return ownerDocument(safeFindDOMNode(componentOrElement)); }); ;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/useRootClose.js var escapeKeyCode = 27; var useRootClose_noop = function noop() {}; function isLeftClickEvent(event) { return event.button === 0; } function isModifiedEvent(event) { return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); } var getRefTarget = function getRefTarget(ref) { return ref && ('current' in ref ? ref.current : ref); }; /** * The `useRootClose` hook registers your callback on the document * when rendered. Powers the `` component. This is used achieve modal * style behavior where your callback is triggered when the user tries to * interact with the rest of the document or hits the `esc` key. * * @param {Ref| HTMLElement} ref The element boundary * @param {function} onRootClose * @param {object=} options * @param {boolean=} options.disabled * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on */ function useRootClose(ref, onRootClose, _temp) { var _ref = _temp === void 0 ? {} : _temp, disabled = _ref.disabled, _ref$clickTrigger = _ref.clickTrigger, clickTrigger = _ref$clickTrigger === void 0 ? 'click' : _ref$clickTrigger; var preventMouseRootCloseRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false); var onClose = onRootClose || useRootClose_noop; var handleMouseCapture = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) { var currentTarget = getRefTarget(ref); warning_default()(!!currentTarget, 'RootClose captured a close event but does not have a ref to compare it to. ' + 'useRootClose(), should be passed a ref that resolves to a DOM node'); preventMouseRootCloseRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains_contains(currentTarget, e.target); }, [ref]); var handleMouse = useEventCallback(function (e) { if (!preventMouseRootCloseRef.current) { onClose(e); } }); var handleKeyUp = useEventCallback(function (e) { if (e.keyCode === escapeKeyCode) { onClose(e); } }); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { if (disabled || ref == null) return undefined; // Store the current event to avoid triggering handlers immediately // https://github.com/facebook/react/issues/20074 var currentEvent = window.event; var doc = esm_ownerDocument(getRefTarget(ref)); // Use capture for this listener so it fires before React's listener, to // avoid false positives in the contains() check below if the target DOM // element is removed in the React mouse callback. var removeMouseCaptureListener = esm_listen(doc, clickTrigger, handleMouseCapture, true); var removeMouseListener = esm_listen(doc, clickTrigger, function (e) { // skip if this event is the same as the one running when we added the handlers if (e === currentEvent) { currentEvent = undefined; return; } handleMouse(e); }); var removeKeyupListener = esm_listen(doc, 'keyup', function (e) { // skip if this event is the same as the one running when we added the handlers if (e === currentEvent) { currentEvent = undefined; return; } handleKeyUp(e); }); var mobileSafariHackListeners = []; if ('ontouchstart' in doc.documentElement) { mobileSafariHackListeners = [].slice.call(doc.body.children).map(function (el) { return esm_listen(el, 'mousemove', useRootClose_noop); }); } return function () { removeMouseCaptureListener(); removeMouseListener(); removeKeyupListener(); mobileSafariHackListeners.forEach(function (remove) { return remove(); }); }; }, [ref, disabled, clickTrigger, handleMouseCapture, handleMouse, handleKeyUp]); } /* harmony default export */ const esm_useRootClose = (useRootClose); ;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/mergeOptionsWithPopperConfig.js function toModifierMap(modifiers) { var result = {}; if (!Array.isArray(modifiers)) { return modifiers || result; } // eslint-disable-next-line no-unused-expressions modifiers == null ? void 0 : modifiers.forEach(function (m) { result[m.name] = m; }); return result; } function toModifierArray(map) { if (map === void 0) { map = {}; } if (Array.isArray(map)) return map; return Object.keys(map).map(function (k) { map[k].name = k; return map[k]; }); } function mergeOptionsWithPopperConfig(_ref) { var _modifiers$preventOve, _modifiers$preventOve2, _modifiers$offset, _modifiers$arrow; var enabled = _ref.enabled, enableEvents = _ref.enableEvents, placement = _ref.placement, flip = _ref.flip, offset = _ref.offset, fixed = _ref.fixed, containerPadding = _ref.containerPadding, arrowElement = _ref.arrowElement, _ref$popperConfig = _ref.popperConfig, popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig; var modifiers = toModifierMap(popperConfig.modifiers); return extends_extends({}, popperConfig, { placement: placement, enabled: enabled, strategy: fixed ? 'fixed' : popperConfig.strategy, modifiers: toModifierArray(extends_extends({}, modifiers, { eventListeners: { enabled: enableEvents }, preventOverflow: extends_extends({}, modifiers.preventOverflow, { options: containerPadding ? extends_extends({ padding: containerPadding }, (_modifiers$preventOve = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve.options) : (_modifiers$preventOve2 = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve2.options }), offset: { options: extends_extends({ offset: offset }, (_modifiers$offset = modifiers.offset) == null ? void 0 : _modifiers$offset.options) }, arrow: extends_extends({}, modifiers.arrow, { enabled: !!arrowElement, options: extends_extends({}, (_modifiers$arrow = modifiers.arrow) == null ? void 0 : _modifiers$arrow.options, { element: arrowElement }) }), flip: extends_extends({ enabled: !!flip }, modifiers.flip) })) }); } ;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/DropdownMenu.js var DropdownMenu_noop = function noop() {}; /** * @memberOf Dropdown * @param {object} options * @param {boolean} options.flip Automatically adjust the menu `drop` position based on viewport edge detection * @param {[number, number]} options.offset Define an offset distance between the Menu and the Toggle * @param {boolean} options.show Display the menu manually, ignored in the context of a `Dropdown` * @param {boolean} options.usePopper opt in/out of using PopperJS to position menus. When disabled you must position it yourself. * @param {string} options.rootCloseEvent The pointer event to listen for when determining "clicks outside" the menu for triggering a close. * @param {object} options.popperConfig Options passed to the [`usePopper`](/api/usePopper) hook. */ function useDropdownMenu(options) { if (options === void 0) { options = {}; } var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_DropdownContext); var _useCallbackRef = useCallbackRef(), arrowElement = _useCallbackRef[0], attachArrowRef = _useCallbackRef[1]; var hasShownRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false); var _options = options, flip = _options.flip, offset = _options.offset, rootCloseEvent = _options.rootCloseEvent, _options$fixed = _options.fixed, fixed = _options$fixed === void 0 ? false : _options$fixed, _options$popperConfig = _options.popperConfig, popperConfig = _options$popperConfig === void 0 ? {} : _options$popperConfig, _options$usePopper = _options.usePopper, shouldUsePopper = _options$usePopper === void 0 ? !!context : _options$usePopper; var show = (context == null ? void 0 : context.show) == null ? !!options.show : context.show; var alignEnd = (context == null ? void 0 : context.alignEnd) == null ? options.alignEnd : context.alignEnd; if (show && !hasShownRef.current) { hasShownRef.current = true; } var handleClose = function handleClose(e) { context == null ? void 0 : context.toggle(false, e); }; var _ref = context || {}, drop = _ref.drop, setMenu = _ref.setMenu, menuElement = _ref.menuElement, toggleElement = _ref.toggleElement; var placement = alignEnd ? 'bottom-end' : 'bottom-start'; if (drop === 'up') placement = alignEnd ? 'top-end' : 'top-start';else if (drop === 'right') placement = alignEnd ? 'right-end' : 'right-start';else if (drop === 'left') placement = alignEnd ? 'left-end' : 'left-start'; var popper = esm_usePopper(toggleElement, menuElement, mergeOptionsWithPopperConfig({ placement: placement, enabled: !!(shouldUsePopper && show), enableEvents: show, offset: offset, flip: flip, fixed: fixed, arrowElement: arrowElement, popperConfig: popperConfig })); var menuProps = extends_extends({ ref: setMenu || DropdownMenu_noop, 'aria-labelledby': toggleElement == null ? void 0 : toggleElement.id }, popper.attributes.popper, { style: popper.styles.popper }); var metadata = { show: show, alignEnd: alignEnd, hasShown: hasShownRef.current, toggle: context == null ? void 0 : context.toggle, popper: shouldUsePopper ? popper : null, arrowProps: shouldUsePopper ? extends_extends({ ref: attachArrowRef }, popper.attributes.arrow, { style: popper.styles.arrow }) : {} }; esm_useRootClose(menuElement, handleClose, { clickTrigger: rootCloseEvent, disabled: !show }); return [menuProps, metadata]; } var DropdownMenu_propTypes = { /** * A render prop that returns a Menu element. The `props` * argument should spread through to **a component that can accept a ref**. * * @type {Function ({ * show: boolean, * alignEnd: boolean, * close: (?SyntheticEvent) => void, * placement: Placement, * update: () => void, * forceUpdate: () => void, * props: { * ref: (?HTMLElement) => void, * style: { [string]: string | number }, * aria-labelledby: ?string * }, * arrowProps: { * ref: (?HTMLElement) => void, * style: { [string]: string | number }, * }, * }) => React.Element} */ children: (prop_types_default()).func.isRequired, /** * Controls the visible state of the menu, generally this is * provided by the parent `Dropdown` component, * but may also be specified as a prop directly. */ show: (prop_types_default()).bool, /** * Aligns the dropdown menu to the 'end' of it's placement position. * Generally this is provided by the parent `Dropdown` component, * but may also be specified as a prop directly. */ alignEnd: (prop_types_default()).bool, /** * Enables the Popper.js `flip` modifier, allowing the Dropdown to * automatically adjust it's placement in case of overlap with the viewport or toggle. * Refer to the [flip docs](https://popper.js.org/popper-documentation.html#modifiers..flip.enabled) for more info */ flip: (prop_types_default()).bool, usePopper: prop_types_default().oneOf([true, false]), /** * A set of popper options and props passed directly to react-popper's Popper component. */ popperConfig: (prop_types_default()).object, /** * Override the default event used by RootCloseWrapper. */ rootCloseEvent: (prop_types_default()).string }; var DropdownMenu_defaultProps = { usePopper: true }; /** * Also exported as `` from `Dropdown`. * * @displayName DropdownMenu * @memberOf Dropdown */ function DropdownMenu(_ref2) { var children = _ref2.children, options = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, ["children"]); var _useDropdownMenu = useDropdownMenu(options), props = _useDropdownMenu[0], meta = _useDropdownMenu[1]; return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, meta.hasShown ? children(props, meta) : null); } DropdownMenu.displayName = 'ReactOverlaysDropdownMenu'; DropdownMenu.propTypes = DropdownMenu_propTypes; DropdownMenu.defaultProps = DropdownMenu_defaultProps; /** @component */ /* harmony default export */ const esm_DropdownMenu = (DropdownMenu); ;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/DropdownToggle.js var DropdownToggle_noop = function noop() {}; /** * Wires up Dropdown toggle functionality, returning a set a props to attach * to the element that functions as the dropdown toggle (generally a button). * * @memberOf Dropdown */ function useDropdownToggle() { var _ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_DropdownContext) || {}, _ref$show = _ref.show, show = _ref$show === void 0 ? false : _ref$show, _ref$toggle = _ref.toggle, toggle = _ref$toggle === void 0 ? DropdownToggle_noop : _ref$toggle, setToggle = _ref.setToggle; var handleClick = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) { toggle(!show, e); }, [show, toggle]); return [{ ref: setToggle || DropdownToggle_noop, onClick: handleClick, 'aria-haspopup': true, 'aria-expanded': !!show }, { show: show, toggle: toggle }]; } var DropdownToggle_propTypes = { /** * A render prop that returns a Toggle element. The `props` * argument should spread through to **a component that can accept a ref**. Use * the `onToggle` argument to toggle the menu open or closed * * @type {Function ({ * show: boolean, * toggle: (show: boolean) => void, * props: { * ref: (?HTMLElement) => void, * aria-haspopup: true * aria-expanded: boolean * }, * }) => React.Element} */ children: (prop_types_default()).func.isRequired }; /** * Also exported as `` from `Dropdown`. * * @displayName DropdownToggle * @memberOf Dropdown */ function DropdownToggle(_ref2) { var children = _ref2.children; var _useDropdownToggle = useDropdownToggle(), props = _useDropdownToggle[0], meta = _useDropdownToggle[1]; return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, children(props, meta)); } DropdownToggle.displayName = 'ReactOverlaysDropdownToggle'; DropdownToggle.propTypes = DropdownToggle_propTypes; /** @component */ /* harmony default export */ const esm_DropdownToggle = (DropdownToggle); ;// CONCATENATED MODULE: ./node_modules/react-overlays/esm/Dropdown.js var Dropdown_propTypes = { /** * A render prop that returns the root dropdown element. The `props` * argument should spread through to an element containing _both_ the * menu and toggle in order to handle keyboard events for focus management. * * @type {Function ({ * props: { * onKeyDown: (SyntheticEvent) => void, * }, * }) => React.Element} */ children: (prop_types_default()).node, /** * Determines the direction and location of the Menu in relation to it's Toggle. */ drop: prop_types_default().oneOf(['up', 'left', 'right', 'down']), /** * Controls the focus behavior for when the Dropdown is opened. Set to * `true` to always focus the first menu item, `keyboard` to focus only when * navigating via the keyboard, or `false` to disable completely * * The Default behavior is `false` **unless** the Menu has a `role="menu"` * where it will default to `keyboard` to match the recommended [ARIA Authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton). */ focusFirstItemOnShow: prop_types_default().oneOf([false, true, 'keyboard']), /** * A css slector string that will return __focusable__ menu items. * Selectors should be relative to the menu component: * e.g. ` > li:not('.disabled')` */ itemSelector: (prop_types_default()).string, /** * Align the menu to the 'end' side of the placement side of the Dropdown toggle. The default placement is `top-start` or `bottom-start`. */ alignEnd: (prop_types_default()).bool, /** * Whether or not the Dropdown is visible. * * @controllable onToggle */ show: (prop_types_default()).bool, /** * Sets the initial show position of the Dropdown. */ defaultShow: (prop_types_default()).bool, /** * A callback fired when the Dropdown wishes to change visibility. Called with the requested * `show` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`. * * ```ts static * function( * isOpen: boolean, * event: SyntheticEvent, * ): void * ``` * * @controllable show */ onToggle: (prop_types_default()).func }; function useRefWithUpdate() { var forceUpdate = useForceUpdate(); var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null); var attachRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (element) { ref.current = element; // ensure that a menu set triggers an update for consumers forceUpdate(); }, [forceUpdate]); return [ref, attachRef]; } /** * @displayName Dropdown * @public */ function Dropdown(_ref) { var drop = _ref.drop, alignEnd = _ref.alignEnd, defaultShow = _ref.defaultShow, rawShow = _ref.show, rawOnToggle = _ref.onToggle, _ref$itemSelector = _ref.itemSelector, itemSelector = _ref$itemSelector === void 0 ? '* > *' : _ref$itemSelector, focusFirstItemOnShow = _ref.focusFirstItemOnShow, children = _ref.children; var _useUncontrolledProp = useUncontrolledProp(rawShow, defaultShow, rawOnToggle), show = _useUncontrolledProp[0], onToggle = _useUncontrolledProp[1]; // We use normal refs instead of useCallbackRef in order to populate the // the value as quickly as possible, otherwise the effect to focus the element // may run before the state value is set var _useRefWithUpdate = useRefWithUpdate(), menuRef = _useRefWithUpdate[0], setMenu = _useRefWithUpdate[1]; var menuElement = menuRef.current; var _useRefWithUpdate2 = useRefWithUpdate(), toggleRef = _useRefWithUpdate2[0], setToggle = _useRefWithUpdate2[1]; var toggleElement = toggleRef.current; var lastShow = usePrevious(show); var lastSourceEvent = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null); var focusInDropdown = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false); var toggle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (nextShow, event) { onToggle(nextShow, event); }, [onToggle]); var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () { return { toggle: toggle, drop: drop, show: show, alignEnd: alignEnd, menuElement: menuElement, toggleElement: toggleElement, setMenu: setMenu, setToggle: setToggle }; }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]); if (menuElement && lastShow && !show) { focusInDropdown.current = menuElement.contains(document.activeElement); } var focusToggle = useEventCallback(function () { if (toggleElement && toggleElement.focus) { toggleElement.focus(); } }); var maybeFocusFirst = useEventCallback(function () { var type = lastSourceEvent.current; var focusType = focusFirstItemOnShow; if (focusType == null) { focusType = menuRef.current && matches(menuRef.current, '[role=menu]') ? 'keyboard' : false; } if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) { return; } var first = qsa(menuRef.current, itemSelector)[0]; if (first && first.focus) first.focus(); }); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { if (show) maybeFocusFirst();else if (focusInDropdown.current) { focusInDropdown.current = false; focusToggle(); } // only `show` should be changing }, [show, focusInDropdown, focusToggle, maybeFocusFirst]); (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () { lastSourceEvent.current = null; }); var getNextFocusedChild = function getNextFocusedChild(current, offset) { if (!menuRef.current) return null; var items = qsa(menuRef.current, itemSelector); var index = items.indexOf(current) + offset; index = Math.max(0, Math.min(index, items.length)); return items[index]; }; useGlobalListener('keydown', function (event) { var _menuRef$current, _toggleRef$current; var key = event.key; var target = event.target; var fromMenu = (_menuRef$current = menuRef.current) == null ? void 0 : _menuRef$current.contains(target); var fromToggle = (_toggleRef$current = toggleRef.current) == null ? void 0 : _toggleRef$current.contains(target); // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400 // in inscrutability var isInput = /input|textarea/i.test(target.tagName); if (isInput && (key === ' ' || key !== 'Escape' && fromMenu)) { return; } if (!fromMenu && !fromToggle) { return; } lastSourceEvent.current = event.type; switch (key) { case 'ArrowUp': { var next = getNextFocusedChild(target, -1); if (next && next.focus) next.focus(); event.preventDefault(); return; } case 'ArrowDown': event.preventDefault(); if (!show) { onToggle(true, event); } else { var _next = getNextFocusedChild(target, 1); if (_next && _next.focus) _next.focus(); } return; case 'Tab': // on keydown the target is the element being tabbed FROM, we need that // to know if this event is relevant to this dropdown (e.g. in this menu). // On `keyup` the target is the element being tagged TO which we use to check // if focus has left the menu esm_addEventListener(document, 'keyup', function (e) { if (e.key === 'Tab' && !e.target || !menuRef.current.contains(e.target)) { onToggle(false, event); } }, { once: true }); break; case 'Escape': event.preventDefault(); event.stopPropagation(); onToggle(false, event); break; default: } }); return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_DropdownContext.Provider, { value: context }, children); } Dropdown.displayName = 'ReactOverlaysDropdown'; Dropdown.propTypes = Dropdown_propTypes; Dropdown.Menu = esm_DropdownMenu; Dropdown.Toggle = esm_DropdownToggle; /* harmony default export */ const esm_Dropdown = (Dropdown); ;// CONCATENATED MODULE: ./src/NavContext.tsx // TODO: check this var NavContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null); NavContext.displayName = 'NavContext'; /* harmony default export */ const src_NavContext = (NavContext); ;// CONCATENATED MODULE: ./src/DropdownItem.tsx var DropdownItem_excluded = ["bsPrefix", "className", "children", "eventKey", "disabled", "href", "onClick", "onSelect", "active", "as"]; var DropdownItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownItem.tsx", DropdownItem_this = undefined; var DropdownItem_propTypes = { /** @default 'dropdown-item' */ bsPrefix: (prop_types_default()).string, /** * Highlight the menu item as active. */ active: (prop_types_default()).bool, /** * Disable the menu item, making it unselectable. */ disabled: (prop_types_default()).bool, /** * Value passed to the `onSelect` handler, useful for identifying the selected menu item. */ eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]), /** * HTML `href` attribute corresponding to `a.href`. */ href: (prop_types_default()).string, /** * Callback fired when the menu item is clicked. */ onClick: (prop_types_default()).func, /** * Callback fired when the menu item is selected. * * ```js * (eventKey: any, event: Object) => any * ``` */ onSelect: (prop_types_default()).func, as: (prop_types_default()).elementType }; var DropdownItem_defaultProps = { as: src_SafeAnchor, disabled: false }; var DropdownItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) { var bsPrefix = _ref.bsPrefix, className = _ref.className, children = _ref.children, eventKey = _ref.eventKey, disabled = _ref.disabled, href = _ref.href, onClick = _ref.onClick, onSelect = _ref.onSelect, propActive = _ref.active, Component = _ref.as, props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, DropdownItem_excluded); var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-item'); var onSelectCtx = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext); var navContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_NavContext); var _ref2 = navContext || {}, activeKey = _ref2.activeKey; var key = makeEventKey(eventKey, href); var active = propActive == null && key != null ? makeEventKey(activeKey) === key : propActive; var handleClick = useEventCallback(function (event) { // SafeAnchor handles the disabled case, but we handle it here // for other components if (disabled) return; if (onClick) onClick(event); if (onSelectCtx) onSelectCtx(key, event); if (onSelect) onSelect(key, event); }); return ( /*#__PURE__*/ // "TS2604: JSX element type 'Component' does not have any construct or call signatures." // @ts-ignore external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, { ref: ref, href: href, disabled: disabled, className: classnames_default()(className, prefix, active && 'active', disabled && 'disabled'), onClick: handleClick, __self: DropdownItem_this, __source: { fileName: DropdownItem_jsxFileName, lineNumber: 119, columnNumber: 7 } }), children) ); }); DropdownItem.displayName = 'DropdownItem'; DropdownItem.propTypes = DropdownItem_propTypes; DropdownItem.defaultProps = DropdownItem_defaultProps; /* harmony default export */ const src_DropdownItem = (DropdownItem); ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergedRefs.js var toFnRef = function toFnRef(ref) { return !ref || typeof ref === 'function' ? ref : function (value) { ref.current = value; }; }; function mergeRefs(refA, refB) { var a = toFnRef(refA); var b = toFnRef(refB); return function (value) { if (a) a(value); if (b) b(value); }; } /** * Create and returns a single callback ref composed from two other Refs. * * ```tsx * const Button = React.forwardRef((props, ref) => { * const [element, attachRef] = useCallbackRef(); * const mergedRef = useMergedRefs(ref, attachRef); * * return