diff --git a/package.json b/package.json index 89f38e92c8b1..1fb17c93d924 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@types/lodash": "^4.14.116", "@types/numeral": "^0.0.25", "@types/react-beautiful-dnd": "^10.1.0", + "@types/react-datepicker": "^2.11.0", "@types/react-input-autosize": "^2.0.2", "@types/react-virtualized": "^9.18.7", "chroma-js": "^2.0.4", @@ -61,6 +62,7 @@ "prop-types": "^15.6.0", "react-ace": "^7.0.5", "react-beautiful-dnd": "^10.1.0", + "react-datepicker": "^2.13.0", "react-focus-lock": "^1.17.7", "react-input-autosize": "^2.2.2", "react-is": "~16.3.0", diff --git a/packages/index.js b/packages/index.js index a30f054cd72c..e69de29bb2d1 100644 --- a/packages/index.js +++ b/packages/index.js @@ -1,5 +0,0 @@ -var ReactDatePicker = require('./react-datepicker').default; - -module.exports = { - ReactDatePicker: ReactDatePicker -}; diff --git a/packages/react-datepicker.js b/packages/react-datepicker.js deleted file mode 100644 index 7d65b53471ee..000000000000 --- a/packages/react-datepicker.js +++ /dev/null @@ -1,9374 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var React = require('react'); -var React__default = _interopDefault(React); -var PropTypes = _interopDefault(require('prop-types')); -var classnames = _interopDefault(require('classnames')); -var reactDom = require('react-dom'); -var moment = _interopDefault(require('moment')); - -var candidateSelectors = [ - 'input', - 'select', - 'textarea', - 'a[href]', - 'button', - '[tabindex]', - 'audio[controls]', - 'video[controls]', - '[contenteditable]:not([contenteditable="false"])', -]; -var candidateSelector = candidateSelectors.join(','); - -var matches = typeof Element === 'undefined' - ? function () {} - : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; - -function tabbable(el, options) { - options = options || {}; - - var elementDocument = el.ownerDocument || el; - var regularTabbables = []; - var orderedTabbables = []; - - var untouchabilityChecker = new UntouchabilityChecker(elementDocument); - var candidates = el.querySelectorAll(candidateSelector); - - if (options.includeContainer) { - if (matches.call(el, candidateSelector)) { - candidates = Array.prototype.slice.apply(candidates); - candidates.unshift(el); - } - } - - var i, candidate, candidateTabindex; - for (i = 0; i < candidates.length; i++) { - candidate = candidates[i]; - - if (!isNodeMatchingSelectorTabbable(candidate, untouchabilityChecker)) continue; - - candidateTabindex = getTabindex(candidate); - if (candidateTabindex === 0) { - regularTabbables.push(candidate); - } else { - orderedTabbables.push({ - documentOrder: i, - tabIndex: candidateTabindex, - node: candidate, - }); - } - } - - var tabbableNodes = orderedTabbables - .sort(sortOrderedTabbables) - .map(function(a) { return a.node }) - .concat(regularTabbables); - - return tabbableNodes; -} - -tabbable.isTabbable = isTabbable; -tabbable.isFocusable = isFocusable; - -function isNodeMatchingSelectorTabbable(node, untouchabilityChecker) { - if ( - !isNodeMatchingSelectorFocusable(node, untouchabilityChecker) - || isNonTabbableRadio(node) - || getTabindex(node) < 0 - ) { - return false; - } - return true; -} - -function isTabbable(node, untouchabilityChecker) { - if (!node) throw new Error('No node provided'); - if (matches.call(node, candidateSelector) === false) return false; - return isNodeMatchingSelectorTabbable(node, untouchabilityChecker); -} - -function isNodeMatchingSelectorFocusable(node, untouchabilityChecker) { - untouchabilityChecker = untouchabilityChecker || new UntouchabilityChecker(node.ownerDocument || node); - if ( - node.disabled - || isHiddenInput(node) - || untouchabilityChecker.isUntouchable(node) - ) { - return false; - } - return true; -} - -var focusableCandidateSelector = candidateSelectors.concat('iframe').join(','); -function isFocusable(node, untouchabilityChecker) { - if (!node) throw new Error('No node provided'); - if (matches.call(node, focusableCandidateSelector) === false) return false; - return isNodeMatchingSelectorFocusable(node, untouchabilityChecker); -} - -function getTabindex(node) { - var tabindexAttr = parseInt(node.getAttribute('tabindex'), 10); - if (!isNaN(tabindexAttr)) return tabindexAttr; - // Browsers do not return `tabIndex` correctly for contentEditable nodes; - // so if they don't have a tabindex attribute specifically set, assume it's 0. - if (isContentEditable(node)) return 0; - return node.tabIndex; -} - -function sortOrderedTabbables(a, b) { - return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex; -} - -// Array.prototype.find not available in IE. -function find(list, predicate) { - for (var i = 0, length = list.length; i < length; i++) { - if (predicate(list[i])) return list[i]; - } -} - -function isContentEditable(node) { - return node.contentEditable === 'true'; -} - -function isInput(node) { - return node.tagName === 'INPUT'; -} - -function isHiddenInput(node) { - return isInput(node) && node.type === 'hidden'; -} - -function isRadio(node) { - return isInput(node) && node.type === 'radio'; -} - -function isNonTabbableRadio(node) { - return isRadio(node) && !isTabbableRadio(node); -} - -function getCheckedRadio(nodes) { - for (var i = 0; i < nodes.length; i++) { - if (nodes[i].checked) { - return nodes[i]; - } - } -} - -function isTabbableRadio(node) { - if (!node.name) return true; - // This won't account for the edge case where you have radio groups with the same - // in separate forms on the same page. - var radioSet = node.ownerDocument.querySelectorAll('input[type="radio"][name="' + node.name + '"]'); - var checked = getCheckedRadio(radioSet); - return !checked || checked === node; -} - -// An element is "untouchable" if *it or one of its ancestors* has -// `visibility: hidden` or `display: none`. -function UntouchabilityChecker(elementDocument) { - this.doc = elementDocument; - // Node cache must be refreshed on every check, in case - // the content of the element has changed. The cache contains tuples - // mapping nodes to their boolean result. - this.cache = []; -} - -// getComputedStyle accurately reflects `visibility: hidden` of ancestors -// but not `display: none`, so we need to recursively check parents. -UntouchabilityChecker.prototype.hasDisplayNone = function hasDisplayNone(node, nodeComputedStyle) { - if (node === this.doc.documentElement) return false; - - // Search for a cached result. - var cached = find(this.cache, function(item) { - return item === node; - }); - if (cached) return cached[1]; - - nodeComputedStyle = nodeComputedStyle || this.doc.defaultView.getComputedStyle(node); - - var result = false; - - if (nodeComputedStyle.display === 'none') { - result = true; - } else if (node.parentNode) { - result = this.hasDisplayNone(node.parentNode); - } - - this.cache.push([node, result]); - - return result; -}; - -UntouchabilityChecker.prototype.isUntouchable = function isUntouchable(node) { - if (node === this.doc.documentElement) return false; - var computedStyle = this.doc.defaultView.getComputedStyle(node); - if (this.hasDisplayNone(node, computedStyle)) return true; - return computedStyle.visibility === 'hidden'; -}; - -var tabbable_1 = tabbable; - -var tabbable$1 = /*#__PURE__*/Object.freeze({ - default: tabbable_1, - __moduleExports: tabbable_1 -}); - -var immutable = extend; - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend() { - var target = {}; - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target -} - -var tabbable$2 = ( tabbable$1 && tabbable_1 ) || tabbable$1; - -var listeningFocusTrap = null; - -function focusTrap(element, userOptions) { - var doc = document; - var container = - typeof element === 'string' ? doc.querySelector(element) : element; - - var config = immutable( - { - returnFocusOnDeactivate: true, - escapeDeactivates: true - }, - userOptions - ); - - var state = { - firstTabbableNode: null, - lastTabbableNode: null, - nodeFocusedBeforeActivation: null, - mostRecentlyFocusedNode: null, - active: false, - paused: false - }; - - var trap = { - activate: activate, - deactivate: deactivate, - pause: pause, - unpause: unpause - }; - - return trap; - - function activate(activateOptions) { - if (state.active) return; - - updateTabbableNodes(); - - state.active = true; - state.paused = false; - state.nodeFocusedBeforeActivation = doc.activeElement; - - var onActivate = - activateOptions && activateOptions.onActivate - ? activateOptions.onActivate - : config.onActivate; - if (onActivate) { - onActivate(); - } - - addListeners(); - return trap; - } - - function deactivate(deactivateOptions) { - if (!state.active) return; - - removeListeners(); - state.active = false; - state.paused = false; - - var onDeactivate = - deactivateOptions && deactivateOptions.onDeactivate !== undefined - ? deactivateOptions.onDeactivate - : config.onDeactivate; - if (onDeactivate) { - onDeactivate(); - } - - var returnFocus = - deactivateOptions && deactivateOptions.returnFocus !== undefined - ? deactivateOptions.returnFocus - : config.returnFocusOnDeactivate; - if (returnFocus) { - delay(function() { - tryFocus(state.nodeFocusedBeforeActivation); - }); - } - - return trap; - } - - function pause() { - if (state.paused || !state.active) return; - state.paused = true; - removeListeners(); - } - - function unpause() { - if (!state.paused || !state.active) return; - state.paused = false; - addListeners(); - } - - function addListeners() { - if (!state.active) return; - - // There can be only one listening focus trap at a time - if (listeningFocusTrap) { - listeningFocusTrap.pause(); - } - listeningFocusTrap = trap; - - updateTabbableNodes(); - - // Delay ensures that the focused element doesn't capture the event - // that caused the focus trap activation. - delay(function() { - tryFocus(getInitialFocusNode()); - }); - doc.addEventListener('focusin', checkFocusIn, true); - doc.addEventListener('mousedown', checkPointerDown, true); - doc.addEventListener('touchstart', checkPointerDown, true); - doc.addEventListener('click', checkClick, true); - doc.addEventListener('keydown', checkKey, true); - - return trap; - } - - function removeListeners() { - if (!state.active || listeningFocusTrap !== trap) return; - - doc.removeEventListener('focusin', checkFocusIn, true); - doc.removeEventListener('mousedown', checkPointerDown, true); - doc.removeEventListener('touchstart', checkPointerDown, true); - doc.removeEventListener('click', checkClick, true); - doc.removeEventListener('keydown', checkKey, true); - - listeningFocusTrap = null; - - return trap; - } - - function getNodeForOption(optionName) { - var optionValue = config[optionName]; - var node = optionValue; - if (!optionValue) { - return null; - } - if (typeof optionValue === 'string') { - node = doc.querySelector(optionValue); - if (!node) { - throw new Error('`' + optionName + '` refers to no known node'); - } - } - if (typeof optionValue === 'function') { - node = optionValue(); - if (!node) { - throw new Error('`' + optionName + '` did not return a node'); - } - } - return node; - } - - function getInitialFocusNode() { - var node; - if (getNodeForOption('initialFocus') !== null) { - node = getNodeForOption('initialFocus'); - } else if (container.contains(doc.activeElement)) { - node = doc.activeElement; - } else { - node = state.firstTabbableNode || getNodeForOption('fallbackFocus'); - } - - if (!node) { - throw new Error( - "You can't have a focus-trap without at least one focusable element" - ); - } - - return node; - } - - // This needs to be done on mousedown and touchstart instead of click - // so that it precedes the focus event. - function checkPointerDown(e) { - if (container.contains(e.target)) return; - if (config.clickOutsideDeactivates) { - deactivate({ - returnFocus: !tabbable$2.isFocusable(e.target) - }); - } else { - e.preventDefault(); - } - } - - // In case focus escapes the trap for some strange reason, pull it back in. - function checkFocusIn(e) { - // In Firefox when you Tab out of an iframe the Document is briefly focused. - if (container.contains(e.target) || e.target instanceof Document) { - return; - } - e.stopImmediatePropagation(); - tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode()); - } - - function checkKey(e) { - if (config.escapeDeactivates !== false && isEscapeEvent(e)) { - e.preventDefault(); - deactivate(); - return; - } - if (isTabEvent(e)) { - checkTab(e); - return; - } - } - - // Hijack Tab events on the first and last focusable nodes of the trap, - // in order to prevent focus from escaping. If it escapes for even a - // moment it can end up scrolling the page and causing confusion so we - // kind of need to capture the action at the keydown phase. - function checkTab(e) { - updateTabbableNodes(); - if (e.shiftKey && e.target === state.firstTabbableNode) { - e.preventDefault(); - tryFocus(state.lastTabbableNode); - return; - } - if (!e.shiftKey && e.target === state.lastTabbableNode) { - e.preventDefault(); - tryFocus(state.firstTabbableNode); - return; - } - } - - function checkClick(e) { - if (config.clickOutsideDeactivates) return; - if (container.contains(e.target)) return; - e.preventDefault(); - e.stopImmediatePropagation(); - } - - function updateTabbableNodes() { - var tabbableNodes = tabbable$2(container); - state.firstTabbableNode = tabbableNodes[0] || getInitialFocusNode(); - state.lastTabbableNode = - tabbableNodes[tabbableNodes.length - 1] || getInitialFocusNode(); - } - - function tryFocus(node) { - if (node === doc.activeElement) return; - if (!node || !node.focus) { - tryFocus(getInitialFocusNode()); - return; - } - - node.focus(); - state.mostRecentlyFocusedNode = node; - if (isSelectableInput(node)) { - node.select(); - } - } -} - -function isSelectableInput(node) { - return ( - node.tagName && - node.tagName.toLowerCase() === 'input' && - typeof node.select === 'function' - ); -} - -function isEscapeEvent(e) { - return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27; -} - -function isTabEvent(e) { - return e.key === 'Tab' || e.keyCode === 9; -} - -function delay(fn) { - return setTimeout(fn, 0); -} - -var focusTrap_1 = focusTrap; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - - - -var checkedProps = ['active', 'paused', 'tag', 'focusTrapOptions', '_createFocusTrap']; - -var FocusTrap = function (_React$Component) { - _inherits(FocusTrap, _React$Component); - - function FocusTrap(props) { - _classCallCheck(this, FocusTrap); - - var _this = _possibleConstructorReturn(this, (FocusTrap.__proto__ || Object.getPrototypeOf(FocusTrap)).call(this, props)); - - _this.setNode = function (el) { - _this.node = el; - }; - - if (typeof document !== 'undefined') { - _this.previouslyFocusedElement = document.activeElement; - } - return _this; - } - - _createClass(FocusTrap, [{ - key: 'componentDidMount', - value: function componentDidMount() { - // We need to hijack the returnFocusOnDeactivate option, - // because React can move focus into the element before we arrived at - // this lifecycle hook (e.g. with autoFocus inputs). So the component - // captures the previouslyFocusedElement in componentWillMount, - // then (optionally) returns focus to it in componentWillUnmount. - var specifiedFocusTrapOptions = this.props.focusTrapOptions; - var tailoredFocusTrapOptions = { - returnFocusOnDeactivate: false - }; - for (var optionName in specifiedFocusTrapOptions) { - if (!specifiedFocusTrapOptions.hasOwnProperty(optionName)) continue; - if (optionName === 'returnFocusOnDeactivate') continue; - tailoredFocusTrapOptions[optionName] = specifiedFocusTrapOptions[optionName]; - } - - this.focusTrap = this.props._createFocusTrap(this.node, tailoredFocusTrapOptions); - if (this.props.active) { - this.focusTrap.activate(); - } - if (this.props.paused) { - this.focusTrap.pause(); - } - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps) { - if (prevProps.active && !this.props.active) { - var returnFocusOnDeactivate = this.props.focusTrapOptions.returnFocusOnDeactivate; - - var returnFocus = returnFocusOnDeactivate || false; - var config = { returnFocus: returnFocus }; - this.focusTrap.deactivate(config); - } else if (!prevProps.active && this.props.active) { - this.focusTrap.activate(); - } - - if (prevProps.paused && !this.props.paused) { - this.focusTrap.unpause(); - } else if (!prevProps.paused && this.props.paused) { - this.focusTrap.pause(); - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.focusTrap.deactivate(); - if (this.props.focusTrapOptions.returnFocusOnDeactivate !== false && this.previouslyFocusedElement && this.previouslyFocusedElement.focus) { - this.previouslyFocusedElement.focus(); - } - } - }, { - key: 'render', - value: function render() { - var elementProps = { - ref: this.setNode - }; - - // This will get id, className, style, etc. -- arbitrary element props - for (var prop in this.props) { - if (!this.props.hasOwnProperty(prop)) continue; - if (checkedProps.indexOf(prop) !== -1) continue; - elementProps[prop] = this.props[prop]; - } - - return React__default.createElement(this.props.tag, elementProps, this.props.children); - } - }]); - - return FocusTrap; -}(React__default.Component); - -FocusTrap.defaultProps = { - active: true, - tag: 'div', - paused: false, - focusTrapOptions: {}, - _createFocusTrap: focusTrap_1 -}; - -var focusTrapReact = FocusTrap; - -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 classCallCheck = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}; - -var createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; -}(); - -var _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; -}; - -var inherits = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; -}; - -var possibleConstructorReturn = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; -}; - -var ScreenReaderOnly = function ScreenReaderOnly(_ref) { - var children = _ref.children; - - var classes = classnames("react-datepicker__screenReaderOnly", children.props.className); - - var props = _extends({}, children.props, { - className: classes - }); - - return React.cloneElement(children, props); -}; - -ScreenReaderOnly.propTypes = { - children: PropTypes.node -}; - -function generateYears(year, noOfYear, minDate, maxDate) { - var list = []; - for (var i = 0; i < 2 * noOfYear + 1; i++) { - var newYear = year + noOfYear - i; - var isInRange = true; - - if (minDate) { - isInRange = minDate.year() <= newYear; - } - - if (maxDate && isInRange) { - isInRange = maxDate.year() >= newYear; - } - - if (isInRange) { - list.push(newYear); - } - } - - return list; -} - -var YearDropdownOptions = function (_React$Component) { - inherits(YearDropdownOptions, _React$Component); - - function YearDropdownOptions(props) { - classCallCheck(this, YearDropdownOptions); - - var _this = possibleConstructorReturn(this, _React$Component.call(this, props)); - - _this.renderOptions = function () { - var selectedYear = _this.props.year; - var options = _this.state.yearsList.map(function (year) { - return React__default.createElement( - "div", - { - className: classnames("react-datepicker__year-option", { - "react-datepicker__year-option--selected_year": selectedYear === year, - "react-datepicker__year-option--preselected": _this.props.accessibleMode && _this.state.preSelection === year - }), - key: year, - ref: function ref(div) { - if (_this.props.accessibleMode && _this.state.preSelection === year) { - _this.preSelectionDiv = div; - } - }, - onClick: _this.onChange.bind(_this, year) - }, - selectedYear === year ? React__default.createElement( - "span", - { className: "react-datepicker__year-option--selected" }, - "\u2713" - ) : "", - year - ); - }); - - var minYear = _this.props.minDate ? _this.props.minDate.year() : null; - var maxYear = _this.props.maxDate ? _this.props.maxDate.year() : null; - - if (!maxYear || !_this.state.yearsList.find(function (year) { - return year === maxYear; - })) { - options.unshift(React__default.createElement( - "div", - { - className: "react-datepicker__year-option", - ref: "upcoming", - key: "upcoming", - onClick: _this.incrementYears - }, - React__default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" }) - )); - } - - if (!minYear || !_this.state.yearsList.find(function (year) { - return year === minYear; - })) { - options.push(React__default.createElement( - "div", - { - className: "react-datepicker__year-option", - ref: "previous", - key: "previous", - onClick: _this.decrementYears - }, - React__default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous" }) - )); - } - - return options; - }; - - _this.onFocus = function () { - if (_this.props.accessibleMode) { - _this.setState({ readInstructions: true }); - } - }; - - _this.onChange = function (year) { - _this.props.onChange(year); - }; - - _this.handleClickOutside = function () { - _this.props.onCancel(); - }; - - _this.shiftYears = function (amount) { - var years = _this.state.yearsList.map(function (year) { - return year + amount; - }); - - _this.setState({ - yearsList: years - }); - }; - - _this.incrementYears = function () { - return _this.shiftYears(1); - }; - - _this.decrementYears = function () { - return _this.shiftYears(-1); - }; - - _this.onInputKeyDown = function (event) { - var eventKey = event.key; - var selectionChange = 0; - switch (eventKey) { - case "ArrowUp": - event.preventDefault(); - event.stopPropagation(); - selectionChange = -1; - break; - case "ArrowDown": - event.preventDefault(); - event.stopPropagation(); - selectionChange = 1; - break; - case "Escape": - event.preventDefault(); - event.stopPropagation(); - _this.props.onCancel(); - break; - case " ": - case "Enter": - event.preventDefault(); - event.stopPropagation(); - _this.props.onChange(_this.state.preSelection); - break; - } - if (selectionChange) { - _this.setState(function (_ref) { - var preSelection = _ref.preSelection; - - var maxYear = _this.state.yearsList[0]; - var minYear = _this.state.yearsList[_this.state.yearsList.length - 1]; - var nextSelection = preSelection + selectionChange; - if (nextSelection < minYear) nextSelection = maxYear; - if (nextSelection > maxYear) nextSelection = minYear; - return { preSelection: nextSelection }; - }); - } - }; - - var yearDropdownItemNumber = props.yearDropdownItemNumber, - scrollableYearDropdown = props.scrollableYearDropdown; - - var noOfYear = yearDropdownItemNumber || (scrollableYearDropdown ? 10 : 5); - - _this.state = { - yearsList: generateYears(_this.props.year, noOfYear, _this.props.minDate, _this.props.maxDate), - preSelection: _this.props.year, - readInstructions: false - }; - return _this; - } - - YearDropdownOptions.prototype.componentDidMount = function componentDidMount() { - if (this.preSelectionDiv) { - this.preSelectionDiv.scrollIntoView({ - behavior: "instant", - block: "nearest", - inline: "nearest" - }); - } - }; - - YearDropdownOptions.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { - if (this.preSelectionDiv && prevState.preSelection !== this.state.preSelection) { - this.preSelectionDiv.scrollIntoView({ - behavior: "instant", - block: "nearest", - inline: "nearest" - }); - } - }; - - YearDropdownOptions.prototype.render = function render() { - var dropdownClass = classnames({ - "react-datepicker__year-dropdown": true, - "react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown - }); - - var screenReaderInstructions = void 0; - if (this.state.readInstructions) { - screenReaderInstructions = React__default.createElement( - "p", - { "aria-live": true }, - "You are focused on a year selector menu. Use the up and down arrows to select a year, then hit enter to confirm your selection.", - this.state.preSelection, - " is the currently focused year." - ); - } - - return this.props.accessibleMode ? React__default.createElement( - focusTrapReact, - null, - React__default.createElement( - "div", - { - className: dropdownClass, - tabIndex: "0", - onKeyDown: this.onInputKeyDown, - onFocus: this.onFocus - }, - React__default.createElement( - ScreenReaderOnly, - null, - React__default.createElement( - "span", - null, - screenReaderInstructions - ) - ), - this.renderOptions() - ) - ) : React__default.createElement( - "div", - { className: dropdownClass }, - this.renderOptions() - ); - }; - - return YearDropdownOptions; -}(React__default.Component); - -YearDropdownOptions.propTypes = { - minDate: PropTypes.object, - maxDate: PropTypes.object, - onCancel: PropTypes.func.isRequired, - onChange: PropTypes.func.isRequired, - scrollableYearDropdown: PropTypes.bool, - year: PropTypes.number.isRequired, - yearDropdownItemNumber: PropTypes.number, - accessibleMode: PropTypes.bool -}; - -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; -} - -function _objectWithoutProperties(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]; - } - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } - } - - return target; -} - -/** - * Check whether some DOM node is our Component's node. - */ -function isNodeFound(current, componentNode, ignoreClass) { - if (current === componentNode) { - return true; - } // SVG elements do not technically reside in the rendered DOM, so - // they do not have classList directly, but they offer a link to their - // corresponding element, which can have classList. This extra check is for - // that case. - // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement - // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17 - - - if (current.correspondingElement) { - return current.correspondingElement.classList.contains(ignoreClass); - } - - return current.classList.contains(ignoreClass); -} -/** - * Try to find our node in a hierarchy of nodes, returning the document - * node as highest node if our node is not found in the path up. - */ - -function findHighest(current, componentNode, ignoreClass) { - if (current === componentNode) { - return true; - } // If source=local then this event came from 'somewhere' - // inside and should be ignored. We could handle this with - // a layered approach, too, but that requires going back to - // thinking in terms of Dom node nesting, running counter - // to React's 'you shouldn't care about the DOM' philosophy. - - - while (current.parentNode) { - if (isNodeFound(current, componentNode, ignoreClass)) { - return true; - } - - current = current.parentNode; - } - - return current; -} -/** - * Check if the browser scrollbar was clicked - */ - -function clickedScrollbar(evt) { - return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY; -} - -// ideally will get replaced with external dep -// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in -var testPassiveEventSupport = function testPassiveEventSupport() { - if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') { - return; - } - - var passive = false; - var options = Object.defineProperty({}, 'passive', { - get: function get() { - passive = true; - } - }); - - var noop = function noop() {}; - - window.addEventListener('testPassiveEventSupport', noop, options); - window.removeEventListener('testPassiveEventSupport', noop, options); - return passive; -}; - -function autoInc(seed) { - if (seed === void 0) { - seed = 0; - } - - return function () { - return ++seed; - }; -} - -var uid = autoInc(); - -var passiveEventSupport; -var handlersMap = {}; -var enabledInstances = {}; -var touchEvents = ['touchstart', 'touchmove']; -var IGNORE_CLASS_NAME = 'ignore-react-onclickoutside'; -/** - * Options for addEventHandler and removeEventHandler - */ - -function getEventHandlerOptions(instance, eventName) { - var handlerOptions = null; - var isTouchEvent = touchEvents.indexOf(eventName) !== -1; - - if (isTouchEvent && passiveEventSupport) { - handlerOptions = { - passive: !instance.props.preventDefault - }; - } - - return handlerOptions; -} -/** - * This function generates the HOC function that you'll use - * in order to impart onOutsideClick listening to an - * arbitrary component. It gets called at the end of the - * bootstrapping code to yield an instance of the - * onClickOutsideHOC function defined inside setupHOC(). - */ - - -function onClickOutsideHOC(WrappedComponent, config) { - var _class, _temp; - - return _temp = _class = - /*#__PURE__*/ - function (_Component) { - _inheritsLoose(onClickOutside, _Component); - - function onClickOutside(props) { - var _this; - - _this = _Component.call(this, props) || this; - - _this.__outsideClickHandler = function (event) { - if (typeof _this.__clickOutsideHandlerProp === 'function') { - _this.__clickOutsideHandlerProp(event); - - return; - } - - var instance = _this.getInstance(); - - if (typeof instance.props.handleClickOutside === 'function') { - instance.props.handleClickOutside(event); - return; - } - - if (typeof instance.handleClickOutside === 'function') { - instance.handleClickOutside(event); - return; - } - - throw new Error('WrappedComponent lacks a handleClickOutside(event) function for processing outside click events.'); - }; - - _this.enableOnClickOutside = function () { - if (typeof document === 'undefined' || enabledInstances[_this._uid]) { - return; - } - - if (typeof passiveEventSupport === 'undefined') { - passiveEventSupport = testPassiveEventSupport(); - } - - enabledInstances[_this._uid] = true; - var events = _this.props.eventTypes; - - if (!events.forEach) { - events = [events]; - } - - handlersMap[_this._uid] = function (event) { - if (_this.props.disableOnClickOutside) return; - if (_this.componentNode === null) return; - - if (_this.props.preventDefault) { - event.preventDefault(); - } - - if (_this.props.stopPropagation) { - event.stopPropagation(); - } - - if (_this.props.excludeScrollbar && clickedScrollbar(event)) return; - var current = event.target; - - if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) { - return; - } - - _this.__outsideClickHandler(event); - }; - - events.forEach(function (eventName) { - document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName)); - }); - }; - - _this.disableOnClickOutside = function () { - delete enabledInstances[_this._uid]; - var fn = handlersMap[_this._uid]; - - if (fn && typeof document !== 'undefined') { - var events = _this.props.eventTypes; - - if (!events.forEach) { - events = [events]; - } - - events.forEach(function (eventName) { - return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName)); - }); - delete handlersMap[_this._uid]; - } - }; - - _this.getRef = function (ref) { - return _this.instanceRef = ref; - }; - - _this._uid = uid(); - return _this; - } - /** - * Access the WrappedComponent's instance. - */ - - - var _proto = onClickOutside.prototype; - - _proto.getInstance = function getInstance() { - if (!WrappedComponent.prototype.isReactComponent) { - return this; - } - - var ref = this.instanceRef; - return ref.getInstance ? ref.getInstance() : ref; - }; - - /** - * Add click listeners to the current document, - * linked to this component's state. - */ - _proto.componentDidMount = function componentDidMount() { - // If we are in an environment without a DOM such - // as shallow rendering or snapshots then we exit - // early to prevent any unhandled errors being thrown. - if (typeof document === 'undefined' || !document.createElement) { - return; - } - - var instance = this.getInstance(); - - if (config && typeof config.handleClickOutside === 'function') { - this.__clickOutsideHandlerProp = config.handleClickOutside(instance); - - if (typeof this.__clickOutsideHandlerProp !== 'function') { - throw new Error('WrappedComponent lacks a function for processing outside click events specified by the handleClickOutside config option.'); - } - } - - this.componentNode = reactDom.findDOMNode(this.getInstance()); - this.enableOnClickOutside(); - }; - - _proto.componentDidUpdate = function componentDidUpdate() { - this.componentNode = reactDom.findDOMNode(this.getInstance()); - }; - /** - * Remove all document's event listeners for this component - */ - - - _proto.componentWillUnmount = function componentWillUnmount() { - this.disableOnClickOutside(); - }; - /** - * Can be called to explicitly enable event listening - * for clicks and touches outside of this element. - */ - - - /** - * Pass-through render - */ - _proto.render = function render() { - // eslint-disable-next-line no-unused-vars - var _props = this.props, - excludeScrollbar = _props.excludeScrollbar, - props = _objectWithoutProperties(_props, ["excludeScrollbar"]); - - if (WrappedComponent.prototype.isReactComponent) { - props.ref = this.getRef; - } else { - props.wrappedRef = this.getRef; - } - - props.disableOnClickOutside = this.disableOnClickOutside; - props.enableOnClickOutside = this.enableOnClickOutside; - return React.createElement(WrappedComponent, props); - }; - - return onClickOutside; - }(React.Component), _class.displayName = "OnClickOutside(" + (WrappedComponent.displayName || WrappedComponent.name || 'Component') + ")", _class.defaultProps = { - eventTypes: ['mousedown', 'touchstart'], - excludeScrollbar: config && config.excludeScrollbar || false, - outsideClickIgnoreClass: IGNORE_CLASS_NAME, - preventDefault: false, - stopPropagation: false - }, _class.getClass = function () { - return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent; - }, _temp; -} - -var dayOfWeekCodes = { - 1: "mon", - 2: "tue", - 3: "wed", - 4: "thu", - 5: "fri", - 6: "sat", - 7: "sun" -}; - -// These functions are not exported so -// that we avoid magic strings like 'days' -function set$1(date, unit, to) { - return date.set(unit, to); -} - -function add(date, amount, unit) { - return date.add(amount, unit); -} - -function subtract(date, amount, unit) { - return date.subtract(amount, unit); -} - -function get$1(date, unit) { - return date.get(unit); -} - -function getStartOf(date, unit) { - return date.startOf(unit); -} - -// ** Date Constructors ** - -function newDate(point) { - return moment(point); -} - -function newDateWithOffset(utcOffset) { - return moment().utc().utcOffset(utcOffset); -} - -function now(maybeFixedUtcOffset) { - if (maybeFixedUtcOffset == null) { - return newDate(); - } - return newDateWithOffset(maybeFixedUtcOffset); -} - -function cloneDate(date) { - return date.clone(); -} - -function parseDate(value, _ref) { - var dateFormat = _ref.dateFormat, - locale = _ref.locale; - - var m = moment(value, dateFormat, locale || moment.locale(), true); - return m.isValid() ? m : null; -} - -// ** Date "Reflection" ** - -function isMoment(date) { - return moment.isMoment(date); -} - -function isDate(date) { - return moment.isDate(date); -} - -// ** Date Formatting ** - -function formatDate(date, format) { - return date.format(format); -} - -function safeDateFormat(date, _ref2) { - var dateFormat = _ref2.dateFormat, - locale = _ref2.locale; - - return date && date.clone().locale(locale || moment.locale()).format(Array.isArray(dateFormat) ? dateFormat[0] : dateFormat) || ""; -} - -// ** Date Setters ** - -function setTime(date, _ref3) { - var hour = _ref3.hour, - minute = _ref3.minute, - second = _ref3.second, - millisecond = _ref3.millisecond; - - date.set({ hour: hour, minute: minute, second: second, millisecond: millisecond }); - return date; -} - -function setMonth(date, month) { - return set$1(date, "month", month); -} - -function setYear(date, year) { - return set$1(date, "year", year); -} - -// ** Date Getters ** - -function getMillisecond(date) { - return get$1(date, "millisecond"); -} - -function getSecond(date) { - return get$1(date, "second"); -} - -function getMinute(date) { - return get$1(date, "minute"); -} - -function getHour(date) { - return get$1(date, "hour"); -} - -// Returns day of week -function getDay(date) { - return get$1(date, "day"); -} - -function getWeek(date) { - return get$1(date, "week"); -} - -function getMonth(date) { - return get$1(date, "month"); -} - -function getYear(date) { - return get$1(date, "year"); -} - -// Returns day of month -function getDate(date) { - return get$1(date, "date"); -} - -function getDayOfWeekCode(day) { - return dayOfWeekCodes[day.isoWeekday()]; -} - -// *** Start of *** - -function getStartOfDay(date) { - return getStartOf(date, "day"); -} - -function getStartOfWeek(date) { - return getStartOf(date, "week"); -} -function getStartOfMonth(date) { - return getStartOf(date, "month"); -} - -function getStartOfDate(date) { - return getStartOf(date, "date"); -} - -// ** Date Math ** - -// *** Addition *** - -function addMinutes(date, amount) { - return add(date, amount, "minutes"); -} - -function addHours(date, amount) { - return add(date, amount, "hours"); -} - -function addDays(date, amount) { - return add(date, amount, "days"); -} - -function addWeeks(date, amount) { - return add(date, amount, "weeks"); -} - -function addMonths(date, amount) { - return add(date, amount, "months"); -} - -function addYears(date, amount) { - return add(date, amount, "years"); -} - -// *** Subtraction *** -function subtractDays(date, amount) { - return subtract(date, amount, "days"); -} - -function subtractWeeks(date, amount) { - return subtract(date, amount, "weeks"); -} - -function subtractMonths(date, amount) { - return subtract(date, amount, "months"); -} - -function subtractYears(date, amount) { - return subtract(date, amount, "years"); -} - -// ** Date Comparison ** - -function isBefore(date1, date2) { - return date1.isBefore(date2); -} - -function isAfter(date1, date2) { - return date1.isAfter(date2); -} - -function equals(date1, date2) { - return date1.isSame(date2); -} - -function isSameYear(date1, date2) { - if (date1 && date2) { - return date1.isSame(date2, "year"); - } else { - return !date1 && !date2; - } -} - -function isSameMonth(date1, date2) { - if (date1 && date2) { - return date1.isSame(date2, "month"); - } else { - return !date1 && !date2; - } -} - -function isSameDay(moment1, moment2) { - if (moment1 && moment2) { - return moment1.isSame(moment2, "day"); - } else { - return !moment1 && !moment2; - } -} - -function isDayInRange(day, startDate, endDate) { - var before = startDate.clone().startOf("day").subtract(1, "seconds"); - var after = endDate.clone().startOf("day").add(1, "seconds"); - return day.clone().startOf("day").isBetween(before, after); -} - -// ** Date Localization ** - -function localizeDate(date, locale) { - return date.clone().locale(locale || moment.locale()); -} - -function getLocaleData(date) { - return date.localeData(); -} - -function getLocaleDataForLocale(locale) { - return moment.localeData(locale); -} - -function getFormattedWeekdayInLocale(locale, date, formatFunc) { - return formatFunc(locale.weekdays(date)); -} - -function getWeekdayMinInLocale(locale, date) { - return locale.weekdaysMin(date); -} - -function getWeekdayShortInLocale(locale, date) { - return locale.weekdaysShort(date); -} - -// TODO what is this format exactly? -function getMonthInLocale(locale, date, format) { - return locale.months(date, format); -} - -function getMonthShortInLocale(locale, date) { - return locale.monthsShort(date); -} - -// ** Utils for some components ** - -function isDayDisabled(day) { - var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - minDate = _ref4.minDate, - maxDate = _ref4.maxDate, - excludeDates = _ref4.excludeDates, - includeDates = _ref4.includeDates, - filterDate = _ref4.filterDate; - - return minDate && day.isBefore(minDate, "day") || maxDate && day.isAfter(maxDate, "day") || excludeDates && excludeDates.some(function (excludeDate) { - return isSameDay(day, excludeDate); - }) || includeDates && !includeDates.some(function (includeDate) { - return isSameDay(day, includeDate); - }) || filterDate && !filterDate(day.clone()) || false; -} - -function isOutOfBounds(day) { - var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - minDate = _ref5.minDate, - maxDate = _ref5.maxDate; - - return minDate && day.isBefore(minDate, "day") || maxDate && day.isAfter(maxDate, "day"); -} - -function isTimeDisabled(time, disabledTimes) { - var l = disabledTimes.length; - for (var i = 0; i < l; i++) { - if (disabledTimes[i].get("hours") === time.get("hours") && disabledTimes[i].get("minutes") === time.get("minutes")) { - return true; - } - } - - return false; -} - -function isTimeInDisabledRange(time, _ref6) { - var minTime = _ref6.minTime, - maxTime = _ref6.maxTime; - - if (!minTime || !maxTime) { - throw new Error("Both minTime and maxTime props required"); - } - - var base = moment().hours(0).minutes(0).seconds(0); - var baseTime = base.clone().hours(time.get("hours")).minutes(time.get("minutes")); - var min = base.clone().hours(minTime.get("hours")).minutes(minTime.get("minutes")); - var max = base.clone().hours(maxTime.get("hours")).minutes(maxTime.get("minutes")); - - return !(baseTime.isSameOrAfter(min) && baseTime.isSameOrBefore(max)); -} - -function allDaysDisabledBefore(day, unit) { - var _ref7 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - minDate = _ref7.minDate, - includeDates = _ref7.includeDates; - - var dateBefore = day.clone().subtract(1, unit); - return minDate && dateBefore.isBefore(minDate, unit) || includeDates && includeDates.every(function (includeDate) { - return dateBefore.isBefore(includeDate, unit); - }) || false; -} - -function allDaysDisabledAfter(day, unit) { - var _ref8 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - maxDate = _ref8.maxDate, - includeDates = _ref8.includeDates; - - var dateAfter = day.clone().add(1, unit); - return maxDate && dateAfter.isAfter(maxDate, unit) || includeDates && includeDates.every(function (includeDate) { - return dateAfter.isAfter(includeDate, unit); - }) || false; -} - -function getEffectiveMinDate(_ref9) { - var minDate = _ref9.minDate, - includeDates = _ref9.includeDates; - - if (includeDates && minDate) { - return moment.min(includeDates.filter(function (includeDate) { - return minDate.isSameOrBefore(includeDate, "day"); - })); - } else if (includeDates) { - return moment.min(includeDates); - } else { - return minDate; - } -} - -function getEffectiveMaxDate(_ref10) { - var maxDate = _ref10.maxDate, - includeDates = _ref10.includeDates; - - if (includeDates && maxDate) { - return moment.max(includeDates.filter(function (includeDate) { - return maxDate.isSameOrAfter(includeDate, "day"); - })); - } else if (includeDates) { - return moment.max(includeDates); - } else { - return maxDate; - } -} - -function getHightLightDaysMap() { - var highlightDates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var defaultClassName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "react-datepicker__day--highlighted"; - - var dateClasses = new Map(); - for (var i = 0, len = highlightDates.length; i < len; i++) { - var obj = highlightDates[i]; - if (isMoment(obj)) { - var key = obj.format("MM.DD.YYYY"); - var classNamesArr = dateClasses.get(key) || []; - if (!classNamesArr.includes(defaultClassName)) { - classNamesArr.push(defaultClassName); - dateClasses.set(key, classNamesArr); - } - } else if ((typeof obj === "undefined" ? "undefined" : _typeof(obj)) === "object") { - var keys = Object.keys(obj); - var className = keys[0]; - var arrOfMoments = obj[keys[0]]; - if (typeof className === "string" && arrOfMoments.constructor === Array) { - for (var k = 0, _len = arrOfMoments.length; k < _len; k++) { - var _key = arrOfMoments[k].format("MM.DD.YYYY"); - var _classNamesArr = dateClasses.get(_key) || []; - if (!_classNamesArr.includes(className)) { - _classNamesArr.push(className); - dateClasses.set(_key, _classNamesArr); - } - } - } - } - } - - return dateClasses; -} - -function timesToInjectAfter(startOfDay, currentTime, currentMultiplier, intervals, injectedTimes) { - var l = injectedTimes.length; - var times = []; - for (var i = 0; i < l; i++) { - var injectedTime = addMinutes(addHours(cloneDate(startOfDay), getHour(injectedTimes[i])), getMinute(injectedTimes[i])); - var nextTime = addMinutes(cloneDate(startOfDay), (currentMultiplier + 1) * intervals); - - if (injectedTime.isBetween(currentTime, nextTime)) { - times.push(injectedTimes[i]); - } - } - - return times; -} - -var WrappedYearDropdownOptions = onClickOutsideHOC(YearDropdownOptions); - -var YearDropdown = function (_React$Component) { - inherits(YearDropdown, _React$Component); - - function YearDropdown() { - var _temp, _this, _ret; - - classCallCheck(this, YearDropdown); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { - dropdownVisible: false - }, _this.setReadViewRef = function (ref) { - _this.readViewref = ref; - }, _this.onReadViewKeyDown = function (event) { - var eventKey = event.key; - switch (eventKey) { - case " ": - case "Enter": - event.preventDefault(); - event.stopPropagation(); - _this.toggleDropdown(); - break; - } - }, _this.onDropDownKeyDown = function (event) { - var eventKey = event.key; - switch (eventKey) { - case " ": - case "Enter": - event.preventDefault(); - event.stopPropagation(); - _this.toggleDropdown(); - break; - } - }, _this.renderSelectOptions = function () { - var minYear = _this.props.minDate ? getYear(_this.props.minDate) : 1900; - var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100; - - var options = []; - for (var i = minYear; i <= maxYear; i++) { - options.push(React__default.createElement( - "option", - { key: i, value: i }, - i - )); - } - return options; - }, _this.onSelectChange = function (e) { - _this.onChange(e.target.value); - }, _this.renderSelectMode = function () { - return React__default.createElement( - "select", - { - value: _this.props.year, - className: "react-datepicker__year-select", - onChange: _this.onSelectChange - }, - _this.renderSelectOptions() - ); - }, _this.renderReadView = function (visible) { - return React__default.createElement( - "div", - { - key: "read", - ref: _this.setReadViewRef, - style: { visibility: visible ? "visible" : "hidden" }, - className: "react-datepicker__year-read-view", - onClick: function onClick(event) { - return _this.toggleDropdown(event); - }, - onKeyDown: _this.onReadViewKeyDown, - tabIndex: _this.props.accessibleMode ? "0" : undefined, - "aria-label": "Button. Open the year selector. " + _this.props.year + " is currently selected." - }, - React__default.createElement("span", { className: "react-datepicker__year-read-view--down-arrow" }), - React__default.createElement( - "span", - { className: "react-datepicker__year-read-view--selected-year" }, - _this.props.year - ) - ); - }, _this.renderDropdown = function () { - return React__default.createElement(WrappedYearDropdownOptions, { - key: "dropdown", - ref: "options", - year: _this.props.year, - onChange: _this.onChange, - onCancel: _this.toggleDropdown, - minDate: _this.props.minDate, - maxDate: _this.props.maxDate, - scrollableYearDropdown: _this.props.scrollableYearDropdown, - yearDropdownItemNumber: _this.props.yearDropdownItemNumber, - accessibleMode: _this.props.accessibleMode - }); - }, _this.renderScrollMode = function () { - var dropdownVisible = _this.state.dropdownVisible; - - var result = [_this.renderReadView(!dropdownVisible)]; - if (dropdownVisible) { - result.unshift(_this.renderDropdown()); - } - return result; - }, _this.onChange = function (year) { - _this.toggleDropdown(); - if (year === _this.props.year) return; - _this.props.onChange(year); - }, _this.toggleDropdown = function (event) { - _this.setState({ - dropdownVisible: !_this.state.dropdownVisible - }, function () { - if (_this.props.adjustDateOnChange) { - _this.handleYearChange(_this.props.date, event); - } - }); - }, _this.handleYearChange = function (date, event) { - _this.onSelect(date, event); - _this.setOpen(); - }, _this.onSelect = function (date, event) { - if (_this.props.onSelect) { - _this.props.onSelect(date, event); - } - }, _this.setOpen = function () { - if (_this.props.setOpen) { - _this.props.setOpen(true); - } - }, _temp), possibleConstructorReturn(_this, _ret); - } - - YearDropdown.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { - if (this.props.accessibleMode && // in accessibleMode - prevState.dropdownVisible !== this.state.dropdownVisible && // dropdown visibility changed - this.state.dropdownVisible === false // dropdown is no longer visible - ) { - this.readViewref.focus(); - } - }; - - YearDropdown.prototype.render = function render() { - var renderedDropdown = void 0; - switch (this.props.dropdownMode) { - case "scroll": - renderedDropdown = this.renderScrollMode(); - break; - case "select": - renderedDropdown = this.renderSelectMode(); - break; - } - - return React__default.createElement( - "div", - { - className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--" + this.props.dropdownMode - }, - renderedDropdown - ); - }; - - return YearDropdown; -}(React__default.Component); - -YearDropdown.propTypes = { - adjustDateOnChange: PropTypes.bool, - dropdownMode: PropTypes.oneOf(["scroll", "select"]).isRequired, - maxDate: PropTypes.object, - minDate: PropTypes.object, - onChange: PropTypes.func.isRequired, - scrollableYearDropdown: PropTypes.bool, - year: PropTypes.number.isRequired, - yearDropdownItemNumber: PropTypes.number, - date: PropTypes.object, - onSelect: PropTypes.func, - setOpen: PropTypes.func, - accessibleMode: PropTypes.bool -}; - -var MonthDropdownOptions = function (_React$Component) { - inherits(MonthDropdownOptions, _React$Component); - - function MonthDropdownOptions() { - classCallCheck(this, MonthDropdownOptions); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var _this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))); - - _this.renderOptions = function () { - return _this.props.monthNames.map(function (month, i) { - return React__default.createElement( - "div", - { - className: classnames("react-datepicker__month-option", { - "react-datepicker__month-option--selected_month": _this.props.month === i, - "react-datepicker__month-option--preselected": _this.props.accessibleMode && _this.state.preSelection === i - }), - key: month, - ref: month, - onClick: _this.onChange.bind(_this, i) - }, - _this.props.month === i ? React__default.createElement( - "span", - { className: "react-datepicker__month-option--selected" }, - "\u2713" - ) : "", - month - ); - }); - }; - - _this.onFocus = function () { - if (_this.props.accessibleMode) { - _this.setState({ readInstructions: true }); - } - }; - - _this.onChange = function (month) { - return _this.props.onChange(month); - }; - - _this.handleClickOutside = function () { - return _this.props.onCancel(); - }; - - _this.onInputKeyDown = function (event) { - var eventKey = event.key; - var selectionChange = 0; - switch (eventKey) { - case "ArrowUp": - event.preventDefault(); - event.stopPropagation(); - selectionChange = -1; - break; - case "ArrowDown": - event.preventDefault(); - event.stopPropagation(); - selectionChange = 1; - break; - case "Escape": - event.preventDefault(); - event.stopPropagation(); - _this.props.onCancel(); - break; - case " ": - case "Enter": - event.preventDefault(); - event.stopPropagation(); - _this.props.onChange(_this.state.preSelection); - break; - } - if (selectionChange) { - _this.setState(function (_ref) { - var preSelection = _ref.preSelection; - - var nextSelection = preSelection + selectionChange; - if (nextSelection < 0) nextSelection = 11; - if (nextSelection === 12) nextSelection = 0; - return { preSelection: nextSelection }; - }); - } - }; - - _this.state = { - preSelection: _this.props.month, - readInstructions: false - }; - return _this; - } - - MonthDropdownOptions.prototype.render = function render() { - var screenReaderInstructions = void 0; - if (this.state.readInstructions) { - screenReaderInstructions = React__default.createElement( - "p", - { "aria-live": true }, - "You are focused on a month selector menu. Use the up and down arrows to select a year, then hit enter to confirm your selection.", - this.props.monthNames[this.state.preSelection], - " is the currently focused month." - ); - } - - return this.props.accessibleMode ? React__default.createElement( - focusTrapReact, - null, - React__default.createElement( - "div", - { - className: "react-datepicker__month-dropdown", - tabIndex: "0", - onKeyDown: this.onInputKeyDown, - onFocus: this.onFocus - }, - React__default.createElement( - ScreenReaderOnly, - null, - React__default.createElement( - "span", - null, - screenReaderInstructions - ) - ), - this.renderOptions() - ) - ) : React__default.createElement( - "div", - { className: "react-datepicker__month-dropdown" }, - this.renderOptions() - ); - }; - - return MonthDropdownOptions; -}(React__default.Component); - -MonthDropdownOptions.propTypes = { - onCancel: PropTypes.func.isRequired, - onChange: PropTypes.func.isRequired, - month: PropTypes.number.isRequired, - monthNames: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired, - accessibleMode: PropTypes.bool -}; - -var WrappedMonthDropdownOptions = onClickOutsideHOC(MonthDropdownOptions); - -var MonthDropdown = function (_React$Component) { - inherits(MonthDropdown, _React$Component); - - function MonthDropdown(props) { - classCallCheck(this, MonthDropdown); - - var _this = possibleConstructorReturn(this, _React$Component.call(this, props)); - - _this.setReadViewRef = function (ref) { - _this.readViewref = ref; - }; - - _this.onReadViewKeyDown = function (event) { - var eventKey = event.key; - switch (eventKey) { - case " ": - case "Enter": - event.preventDefault(); - event.stopPropagation(); - _this.toggleDropdown(); - break; - } - }; - - _this.onDropDownKeyDown = function (event) { - var eventKey = event.key; - switch (eventKey) { - case " ": - case "Enter": - event.preventDefault(); - event.stopPropagation(); - _this.toggleDropdown(); - break; - } - }; - - _this.renderSelectOptions = function (monthNames) { - return monthNames.map(function (M, i) { - return React__default.createElement( - "option", - { key: i, value: i }, - M - ); - }); - }; - - _this.renderSelectMode = function (monthNames) { - return React__default.createElement( - "select", - { - value: _this.props.month, - className: "react-datepicker__month-select", - onChange: function onChange(e) { - return _this.onChange(e.target.value); - } - }, - _this.renderSelectOptions(monthNames) - ); - }; - - _this.renderReadView = function (visible, monthNames) { - return React__default.createElement( - "div", - { - key: "read", - ref: _this.setReadViewRef, - style: { visibility: visible ? "visible" : "hidden" }, - className: "react-datepicker__month-read-view", - onClick: _this.toggleDropdown, - onKeyDown: _this.onReadViewKeyDown, - tabIndex: _this.props.accessibleMode ? "0" : undefined, - "aria-label": "Button. Open the month selector. " + monthNames[_this.props.month] + " is currently selected." - }, - React__default.createElement("span", { className: "react-datepicker__month-read-view--down-arrow" }), - React__default.createElement( - "span", - { className: "react-datepicker__month-read-view--selected-month" }, - monthNames[_this.props.month] - ) - ); - }; - - _this.renderDropdown = function (monthNames) { - return React__default.createElement(WrappedMonthDropdownOptions, { - key: "dropdown", - ref: "options", - month: _this.props.month, - monthNames: monthNames, - onChange: _this.onChange, - onCancel: _this.toggleDropdown, - accessibleMode: _this.props.accessibleMode - }); - }; - - _this.renderScrollMode = function (monthNames) { - var dropdownVisible = _this.state.dropdownVisible; - - var result = [_this.renderReadView(!dropdownVisible, monthNames)]; - if (dropdownVisible) { - result.unshift(_this.renderDropdown(monthNames)); - } - return result; - }; - - _this.onChange = function (month) { - _this.toggleDropdown(); - if (month !== _this.props.month) { - _this.props.onChange(month); - } - }; - - _this.toggleDropdown = function () { - return _this.setState({ - dropdownVisible: !_this.state.dropdownVisible - }); - }; - - _this.localeData = getLocaleDataForLocale(_this.props.locale); - _this.monthNames = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(_this.props.useShortMonthInDropdown ? function (M) { - return getMonthShortInLocale(_this.localeData, newDate({ M: M })); - } : function (M) { - return getMonthInLocale(_this.localeData, newDate({ M: M }), _this.props.dateFormat); - }); - - _this.state = { - dropdownVisible: false - }; - return _this; - } - - MonthDropdown.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { - var _this2 = this; - - if (this.props.accessibleMode && // in accessibleMode - prevState.dropdownVisible !== this.state.dropdownVisible && // dropdown visibility changed - this.state.dropdownVisible === false // dropdown is no longer visible - ) { - this.readViewref.focus(); - } - - if (prevProps.locale !== this.props.locale) { - this.localeData = getLocaleDataForLocale(this.props.locale); - this.monthNames = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(this.props.useShortMonthInDropdown ? function (M) { - return getMonthShortInLocale(_this2.localeData, newDate({ M: M })); - } : function (M) { - return getMonthInLocale(_this2.localeData, newDate({ M: M }), _this2.props.dateFormat); - }); - this.forceUpdate(); - } - }; - - MonthDropdown.prototype.render = function render() { - var renderedDropdown = void 0; - switch (this.props.dropdownMode) { - case "scroll": - renderedDropdown = this.renderScrollMode(this.monthNames); - break; - case "select": - renderedDropdown = this.renderSelectMode(this.monthNames); - break; - } - - return React__default.createElement( - "div", - { - className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--" + this.props.dropdownMode - }, - renderedDropdown - ); - }; - - return MonthDropdown; -}(React__default.Component); - -MonthDropdown.propTypes = { - dropdownMode: PropTypes.oneOf(["scroll", "select"]).isRequired, - locale: PropTypes.string, - dateFormat: PropTypes.string.isRequired, - month: PropTypes.number.isRequired, - onChange: PropTypes.func.isRequired, - useShortMonthInDropdown: PropTypes.bool, - accessibleMode: PropTypes.bool -}; - -function generateMonthYears(minDate, maxDate) { - var list = []; - - var currDate = getStartOfMonth(cloneDate(minDate)); - var lastDate = getStartOfMonth(cloneDate(maxDate)); - - while (!isAfter(currDate, lastDate)) { - list.push(cloneDate(currDate)); - - addMonths(currDate, 1); - } - - return list; -} - -var MonthYearDropdownOptions = function (_React$Component) { - inherits(MonthYearDropdownOptions, _React$Component); - - function MonthYearDropdownOptions(props) { - classCallCheck(this, MonthYearDropdownOptions); - - var _this = possibleConstructorReturn(this, _React$Component.call(this, props)); - - _this.renderOptions = function () { - return _this.state.monthYearsList.map(function (monthYear) { - var monthYearPoint = monthYear.valueOf(); - - var isSameMonthYear = isSameYear(_this.props.date, monthYear) && isSameMonth(_this.props.date, monthYear); - - var isPreselectionSameMonthYear = isSameYear(_this.state.preSelection, monthYear) && isSameMonth(_this.state.preSelection, monthYear); - - return React__default.createElement( - "div", - { - className: classnames("react-datepicker__month-year-option", { - "--selected_month-year": isSameMonthYear, - "react-datepicker__month-year-option--preselected": _this.props.accessibleMode && isPreselectionSameMonthYear - }), - key: monthYearPoint, - ref: function ref(div) { - if (_this.props.accessibleMode && isPreselectionSameMonthYear) { - _this.preSelectionDiv = div; - } - }, - onClick: _this.onChange.bind(_this, monthYearPoint) - }, - isSameMonthYear ? React__default.createElement( - "span", - { className: "react-datepicker__month-year-option--selected" }, - "\u2713" - ) : "", - formatDate(monthYear, _this.props.dateFormat) - ); - }); - }; - - _this.onFocus = function () { - if (_this.props.accessibleMode) { - _this.setState({ readInstructions: true }); - } - }; - - _this.onChange = function (monthYear) { - return _this.props.onChange(monthYear); - }; - - _this.handleClickOutside = function () { - _this.props.onCancel(); - }; - - _this.onInputKeyDown = function (event) { - var eventKey = event.key; - var newSelection = void 0; - switch (eventKey) { - case "ArrowUp": - event.preventDefault(); - event.stopPropagation(); - newSelection = addMonths(cloneDate(_this.state.preSelection), -1); - break; - case "ArrowDown": - event.preventDefault(); - event.stopPropagation(); - newSelection = addMonths(cloneDate(_this.state.preSelection), 1); - break; - case "Escape": - event.preventDefault(); - event.stopPropagation(); - _this.props.onCancel(); - break; - case " ": - case "Enter": - event.preventDefault(); - event.stopPropagation(); - _this.props.onChange(_this.state.preSelection.valueOf()); - break; - } - if (newSelection) { - var minMonthYear = _this.state.monthYearsList[0]; - var maxMonthYear = _this.state.monthYearsList[_this.state.monthYearsList.length - 1]; - if (isBefore(newSelection, minMonthYear)) newSelection = maxMonthYear; - if (isAfter(newSelection, maxMonthYear)) newSelection = minMonthYear; - _this.setState({ preSelection: newSelection }); - } - }; - - _this.state = { - monthYearsList: generateMonthYears(_this.props.minDate, _this.props.maxDate), - preSelection: getStartOfMonth(cloneDate(_this.props.date)), - readInstructions: false - }; - return _this; - } - - MonthYearDropdownOptions.prototype.componentDidMount = function componentDidMount() { - if (this.preSelectionDiv) { - this.preSelectionDiv.scrollIntoView({ - behavior: "instant", - block: "nearest", - inline: "nearest" - }); - } - }; - - MonthYearDropdownOptions.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { - if (this.preSelectionDiv) { - this.preSelectionDiv.scrollIntoView({ - behavior: "instant", - block: "nearest", - inline: "nearest" - }); - } - }; - - MonthYearDropdownOptions.prototype.render = function render() { - var dropdownClass = classnames({ - "react-datepicker__month-year-dropdown": true, - "react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown - }); - - var screenReaderInstructions = void 0; - if (this.state.readInstructions) { - screenReaderInstructions = React__default.createElement( - "p", - { "aria-live": true }, - "You are focused on a month / year selector menu. Use the up and down arrows to select a month / year combination, then hit enter to confirm your selection.", - formatDate(this.state.preSelection, this.props.dateFormat), - " is the currently focused month / year." - ); - } - - return this.props.accessibleMode ? React__default.createElement( - focusTrapReact, - null, - React__default.createElement( - "div", - { - className: dropdownClass, - tabIndex: "0", - onKeyDown: this.onInputKeyDown, - onFocus: this.onFocus - }, - React__default.createElement( - ScreenReaderOnly, - null, - React__default.createElement( - "span", - null, - screenReaderInstructions - ) - ), - this.renderOptions() - ) - ) : React__default.createElement( - "div", - { className: dropdownClass }, - this.renderOptions() - ); - - return React__default.createElement( - "div", - { className: dropdownClass }, - this.renderOptions() - ); - }; - - return MonthYearDropdownOptions; -}(React__default.Component); - -MonthYearDropdownOptions.propTypes = { - minDate: PropTypes.object.isRequired, - maxDate: PropTypes.object.isRequired, - onCancel: PropTypes.func.isRequired, - onChange: PropTypes.func.isRequired, - scrollableMonthYearDropdown: PropTypes.bool, - date: PropTypes.object.isRequired, - dateFormat: PropTypes.string.isRequired, - accessibleMode: PropTypes.bool -}; - -var WrappedMonthYearDropdownOptions = onClickOutsideHOC(MonthYearDropdownOptions); - -var MonthYearDropdown = function (_React$Component) { - inherits(MonthYearDropdown, _React$Component); - - function MonthYearDropdown() { - var _temp, _this, _ret; - - classCallCheck(this, MonthYearDropdown); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { - dropdownVisible: false - }, _this.setReadViewRef = function (ref) { - _this.readViewref = ref; - }, _this.onReadViewKeyDown = function (event) { - var eventKey = event.key; - switch (eventKey) { - case " ": - case "Enter": - event.preventDefault(); - event.stopPropagation(); - _this.toggleDropdown(); - break; - } - }, _this.onDropDownKeyDown = function (event) { - var eventKey = event.key; - switch (eventKey) { - case " ": - case "Enter": - event.preventDefault(); - event.stopPropagation(); - _this.toggleDropdown(); - break; - } - }, _this.renderSelectOptions = function () { - var currDate = getStartOfMonth(localizeDate(_this.props.minDate, _this.props.locale)); - var lastDate = getStartOfMonth(localizeDate(_this.props.maxDate, _this.props.locale)); - - var options = []; - - while (!isAfter(currDate, lastDate)) { - var timepoint = currDate.valueOf(); - options.push(React__default.createElement( - "option", - { key: timepoint, value: timepoint }, - formatDate(currDate, _this.props.dateFormat) - )); - - addMonths(currDate, 1); - } - - return options; - }, _this.onSelectChange = function (e) { - _this.onChange(e.target.value); - }, _this.renderSelectMode = function () { - return React__default.createElement( - "select", - { - value: getStartOfMonth(_this.props.date).valueOf(), - className: "react-datepicker__month-year-select", - onChange: _this.onSelectChange - }, - _this.renderSelectOptions() - ); - }, _this.renderReadView = function (visible) { - var yearMonth = formatDate(localizeDate(newDate(_this.props.date), _this.props.locale), _this.props.dateFormat); - - return React__default.createElement( - "div", - { - key: "read", - ref: _this.setReadViewRef, - style: { visibility: visible ? "visible" : "hidden" }, - className: "react-datepicker__month-year-read-view", - onClick: function onClick(event) { - return _this.toggleDropdown(event); - }, - onKeyDown: _this.onReadViewKeyDown, - tabIndex: _this.props.accessibleMode ? "0" : undefined, - "aria-label": "Button. Open the month selector. " + yearMonth + " is currently selected." - }, - React__default.createElement("span", { className: "react-datepicker__month-year-read-view--down-arrow" }), - React__default.createElement( - "span", - { className: "react-datepicker__month-year-read-view--selected-month-year" }, - yearMonth - ) - ); - }, _this.renderDropdown = function () { - return React__default.createElement(WrappedMonthYearDropdownOptions, { - key: "dropdown", - ref: "options", - date: _this.props.date, - dateFormat: _this.props.dateFormat, - onChange: _this.onChange, - onCancel: _this.toggleDropdown, - minDate: localizeDate(_this.props.minDate, _this.props.locale), - maxDate: localizeDate(_this.props.maxDate, _this.props.locale), - scrollableMonthYearDropdown: _this.props.scrollableMonthYearDropdown, - accessibleMode: _this.props.accessibleMode - }); - }, _this.renderScrollMode = function () { - var dropdownVisible = _this.state.dropdownVisible; - - var result = [_this.renderReadView(!dropdownVisible)]; - if (dropdownVisible) { - result.unshift(_this.renderDropdown()); - } - return result; - }, _this.onChange = function (monthYearPoint) { - _this.toggleDropdown(); - - var changedDate = newDate(parseInt(monthYearPoint)); - - if (isSameYear(_this.props.date, changedDate) && isSameMonth(_this.props.date, changedDate)) { - return; - } - - _this.props.onChange(changedDate); - }, _this.toggleDropdown = function () { - return _this.setState({ - dropdownVisible: !_this.state.dropdownVisible - }); - }, _temp), possibleConstructorReturn(_this, _ret); - } - - MonthYearDropdown.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { - if (this.props.accessibleMode && // in accessibleMode - prevState.dropdownVisible !== this.state.dropdownVisible && // dropdown visibility changed - this.state.dropdownVisible === false // dropdown is no longer visible - ) { - this.readViewref.focus(); - } - }; - - MonthYearDropdown.prototype.render = function render() { - var renderedDropdown = void 0; - switch (this.props.dropdownMode) { - case "scroll": - renderedDropdown = this.renderScrollMode(); - break; - case "select": - renderedDropdown = this.renderSelectMode(); - break; - } - - return React__default.createElement( - "div", - { - className: "react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--" + this.props.dropdownMode - }, - renderedDropdown - ); - }; - - return MonthYearDropdown; -}(React__default.Component); - -MonthYearDropdown.propTypes = { - dropdownMode: PropTypes.oneOf(["scroll", "select"]).isRequired, - dateFormat: PropTypes.string.isRequired, - locale: PropTypes.string, - maxDate: PropTypes.object.isRequired, - minDate: PropTypes.object.isRequired, - date: PropTypes.object.isRequired, - onChange: PropTypes.func.isRequired, - scrollableMonthYearDropdown: PropTypes.bool, - accessibleMode: PropTypes.bool -}; - -var Day = function (_React$Component) { - inherits(Day, _React$Component); - - function Day() { - var _temp, _this, _ret; - - classCallCheck(this, Day); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) { - if (!_this.isDisabled() && _this.props.onClick) { - _this.props.onClick(event); - } - }, _this.handleMouseEnter = function (event) { - if (!_this.isDisabled() && _this.props.onMouseEnter) { - _this.props.onMouseEnter(event); - } - }, _this.isSameDay = function (other) { - return isSameDay(_this.props.day, other); - }, _this.isKeyboardSelected = function () { - return !_this.props.disabledKeyboardNavigation && (!_this.props.inline || _this.props.accessibleMode) && !_this.isSameDay(_this.props.selected) && _this.isSameDay(_this.props.preSelection); - }, _this.isDisabled = function () { - return isDayDisabled(_this.props.day, _this.props); - }, _this.getHighLightedClass = function (defaultClassName) { - var _this$props = _this.props, - day = _this$props.day, - highlightDates = _this$props.highlightDates; - - - if (!highlightDates) { - return false; - } - - // Looking for className in the Map of {'day string, 'className'} - var dayStr = day.format("MM.DD.YYYY"); - return highlightDates.get(dayStr); - }, _this.isInRange = function () { - var _this$props2 = _this.props, - day = _this$props2.day, - startDate = _this$props2.startDate, - endDate = _this$props2.endDate; - - if (!startDate || !endDate) { - return false; - } - return isDayInRange(day, startDate, endDate); - }, _this.isInSelectingRange = function () { - var _this$props3 = _this.props, - day = _this$props3.day, - selectsStart = _this$props3.selectsStart, - selectsEnd = _this$props3.selectsEnd, - selectingDate = _this$props3.selectingDate, - startDate = _this$props3.startDate, - endDate = _this$props3.endDate; - - - if (!(selectsStart || selectsEnd) || !selectingDate || _this.isDisabled()) { - return false; - } - - if (selectsStart && endDate && selectingDate.isSameOrBefore(endDate)) { - return isDayInRange(day, selectingDate, endDate); - } - - if (selectsEnd && startDate && selectingDate.isSameOrAfter(startDate)) { - return isDayInRange(day, startDate, selectingDate); - } - - return false; - }, _this.isSelectingRangeStart = function () { - if (!_this.isInSelectingRange()) { - return false; - } - - var _this$props4 = _this.props, - day = _this$props4.day, - selectingDate = _this$props4.selectingDate, - startDate = _this$props4.startDate, - selectsStart = _this$props4.selectsStart; - - - if (selectsStart) { - return isSameDay(day, selectingDate); - } else { - return isSameDay(day, startDate); - } - }, _this.isSelectingRangeEnd = function () { - if (!_this.isInSelectingRange()) { - return false; - } - - var _this$props5 = _this.props, - day = _this$props5.day, - selectingDate = _this$props5.selectingDate, - endDate = _this$props5.endDate, - selectsEnd = _this$props5.selectsEnd; - - - if (selectsEnd) { - return isSameDay(day, selectingDate); - } else { - return isSameDay(day, endDate); - } - }, _this.isRangeStart = function () { - var _this$props6 = _this.props, - day = _this$props6.day, - startDate = _this$props6.startDate, - endDate = _this$props6.endDate; - - if (!startDate || !endDate) { - return false; - } - return isSameDay(startDate, day); - }, _this.isRangeEnd = function () { - var _this$props7 = _this.props, - day = _this$props7.day, - startDate = _this$props7.startDate, - endDate = _this$props7.endDate; - - if (!startDate || !endDate) { - return false; - } - return isSameDay(endDate, day); - }, _this.isWeekend = function () { - var weekday = getDay(_this.props.day); - return weekday === 0 || weekday === 6; - }, _this.isOutsideMonth = function () { - return _this.props.month !== undefined && _this.props.month !== getMonth(_this.props.day); - }, _this.getClassNames = function (date) { - var dayClassName = _this.props.dayClassName ? _this.props.dayClassName(date) : undefined; - return classnames("react-datepicker__day", dayClassName, "react-datepicker__day--" + getDayOfWeekCode(_this.props.day), { - "react-datepicker__day--disabled": _this.isDisabled(), - "react-datepicker__day--selected": _this.isSameDay(_this.props.selected), - "react-datepicker__day--keyboard-selected": _this.isKeyboardSelected(), - "react-datepicker__day--range-start": _this.isRangeStart(), - "react-datepicker__day--range-end": _this.isRangeEnd(), - "react-datepicker__day--in-range": _this.isInRange(), - "react-datepicker__day--in-selecting-range": _this.isInSelectingRange(), - "react-datepicker__day--selecting-range-start": _this.isSelectingRangeStart(), - "react-datepicker__day--selecting-range-end": _this.isSelectingRangeEnd(), - "react-datepicker__day--today": _this.isSameDay(now(_this.props.utcOffset)), - "react-datepicker__day--weekend": _this.isWeekend(), - "react-datepicker__day--outside-month": _this.isOutsideMonth() - }, _this.getHighLightedClass("react-datepicker__day--highlighted")); - }, _temp), possibleConstructorReturn(_this, _ret); - } - - Day.prototype.render = function render() { - return React__default.createElement( - "div", - { - className: this.getClassNames(this.props.day), - onClick: this.handleClick, - onMouseEnter: this.handleMouseEnter, - "aria-label": "day-" + getDate(this.props.day) - }, - this.props.renderDayContents ? this.props.renderDayContents(getDate(this.props.day)) : getDate(this.props.day) - ); - }; - - return Day; -}(React__default.Component); - -Day.propTypes = { - disabledKeyboardNavigation: PropTypes.bool, - day: PropTypes.object.isRequired, - dayClassName: PropTypes.func, - endDate: PropTypes.object, - highlightDates: PropTypes.instanceOf(Map), - inline: PropTypes.bool, - month: PropTypes.number, - onClick: PropTypes.func, - onMouseEnter: PropTypes.func, - preSelection: PropTypes.object, - selected: PropTypes.object, - selectingDate: PropTypes.object, - selectsEnd: PropTypes.bool, - selectsStart: PropTypes.bool, - startDate: PropTypes.object, - utcOffset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - renderDayContents: PropTypes.func, - accessibleMode: PropTypes.bool -}; - -var WeekNumber = function (_React$Component) { - inherits(WeekNumber, _React$Component); - - function WeekNumber() { - var _temp, _this, _ret; - - classCallCheck(this, WeekNumber); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) { - if (_this.props.onClick) { - _this.props.onClick(event); - } - }, _temp), possibleConstructorReturn(_this, _ret); - } - - WeekNumber.prototype.render = function render() { - var weekNumberClasses = { - "react-datepicker__week-number": true, - "react-datepicker__week-number--clickable": !!this.props.onClick - }; - return React__default.createElement( - "div", - { - className: classnames(weekNumberClasses), - "aria-label": "week-" + this.props.weekNumber, - onClick: this.handleClick - }, - this.props.weekNumber - ); - }; - - return WeekNumber; -}(React__default.Component); - -WeekNumber.propTypes = { - weekNumber: PropTypes.number.isRequired, - onClick: PropTypes.func -}; - -var Week = function (_React$Component) { - inherits(Week, _React$Component); - - function Week() { - var _temp, _this, _ret; - - classCallCheck(this, Week); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleDayClick = function (day, event) { - if (_this.props.onDayClick) { - _this.props.onDayClick(day, event); - } - }, _this.handleDayMouseEnter = function (day) { - if (_this.props.onDayMouseEnter) { - _this.props.onDayMouseEnter(day); - } - }, _this.handleWeekClick = function (day, weekNumber, event) { - if (typeof _this.props.onWeekSelect === "function") { - _this.props.onWeekSelect(day, weekNumber, event); - } - if (_this.props.shouldCloseOnSelect) { - _this.props.setOpen(false); - } - }, _this.formatWeekNumber = function (startOfWeek) { - if (_this.props.formatWeekNumber) { - return _this.props.formatWeekNumber(startOfWeek); - } - return getWeek(startOfWeek); - }, _this.renderDays = function () { - var startOfWeek = getStartOfWeek(cloneDate(_this.props.day)); - var days = []; - var weekNumber = _this.formatWeekNumber(startOfWeek); - if (_this.props.showWeekNumber) { - var onClickAction = _this.props.onWeekSelect ? _this.handleWeekClick.bind(_this, startOfWeek, weekNumber) : undefined; - days.push(React__default.createElement(WeekNumber, { key: "W", weekNumber: weekNumber, onClick: onClickAction })); - } - return days.concat([0, 1, 2, 3, 4, 5, 6].map(function (offset) { - var day = addDays(cloneDate(startOfWeek), offset); - return React__default.createElement(Day, { - key: offset, - day: day, - month: _this.props.month, - onClick: _this.handleDayClick.bind(_this, day), - onMouseEnter: _this.handleDayMouseEnter.bind(_this, day), - minDate: _this.props.minDate, - maxDate: _this.props.maxDate, - excludeDates: _this.props.excludeDates, - includeDates: _this.props.includeDates, - inline: _this.props.inline, - highlightDates: _this.props.highlightDates, - selectingDate: _this.props.selectingDate, - filterDate: _this.props.filterDate, - preSelection: _this.props.preSelection, - selected: _this.props.selected, - selectsStart: _this.props.selectsStart, - selectsEnd: _this.props.selectsEnd, - startDate: _this.props.startDate, - endDate: _this.props.endDate, - dayClassName: _this.props.dayClassName, - utcOffset: _this.props.utcOffset, - renderDayContents: _this.props.renderDayContents, - disabledKeyboardNavigation: _this.props.disabledKeyboardNavigation, - accessibleMode: _this.props.accessibleMode - }); - })); - }, _temp), possibleConstructorReturn(_this, _ret); - } - - Week.prototype.render = function render() { - return React__default.createElement( - "div", - { className: "react-datepicker__week" }, - this.renderDays() - ); - }; - - createClass(Week, null, [{ - key: "defaultProps", - get: function get$$1() { - return { - shouldCloseOnSelect: true - }; - } - }]); - return Week; -}(React__default.Component); - -Week.propTypes = { - disabledKeyboardNavigation: PropTypes.bool, - day: PropTypes.object.isRequired, - dayClassName: PropTypes.func, - endDate: PropTypes.object, - excludeDates: PropTypes.array, - filterDate: PropTypes.func, - formatWeekNumber: PropTypes.func, - highlightDates: PropTypes.instanceOf(Map), - includeDates: PropTypes.array, - inline: PropTypes.bool, - maxDate: PropTypes.object, - minDate: PropTypes.object, - month: PropTypes.number, - onDayClick: PropTypes.func, - onDayMouseEnter: PropTypes.func, - onWeekSelect: PropTypes.func, - preSelection: PropTypes.object, - selected: PropTypes.object, - selectingDate: PropTypes.object, - selectsEnd: PropTypes.bool, - selectsStart: PropTypes.bool, - showWeekNumber: PropTypes.bool, - startDate: PropTypes.object, - setOpen: PropTypes.func, - shouldCloseOnSelect: PropTypes.bool, - utcOffset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - renderDayContents: PropTypes.func, - accessibleMode: PropTypes.bool -}; - -var FIXED_HEIGHT_STANDARD_WEEK_COUNT = 6; - -var Month = function (_React$Component) { - inherits(Month, _React$Component); - - function Month(props) { - classCallCheck(this, Month); - - var _this = possibleConstructorReturn(this, _React$Component.call(this, props)); - - _this.handleDayClick = function (day, event) { - if (_this.props.onDayClick) { - _this.props.onDayClick(day, event); - } - }; - - _this.handleDayMouseEnter = function (day) { - if (_this.props.onDayMouseEnter) { - _this.props.onDayMouseEnter(day); - } - }; - - _this.handleMouseLeave = function () { - if (_this.props.onMouseLeave) { - _this.props.onMouseLeave(); - } - }; - - _this.onFocus = function () { - if (_this.props.accessibleMode) { - _this.setState({ readInstructions: true }); - } - }; - - _this.onInputKeyDown = function (event) { - var eventKey = event.key; - var copy = newDate(_this.props.preSelection); - var newSelection = void 0; - switch (eventKey) { - case "ArrowLeft": - newSelection = subtractDays(copy, 1); - break; - case "ArrowRight": - newSelection = addDays(copy, 1); - break; - case "ArrowUp": - newSelection = subtractWeeks(copy, 1); - break; - case "ArrowDown": - newSelection = addWeeks(copy, 1); - break; - case "PageUp": - newSelection = subtractMonths(copy, 1); - break; - case "PageDown": - newSelection = addMonths(copy, 1); - break; - case "Home": - newSelection = subtractYears(copy, 1); - break; - case "End": - newSelection = addYears(copy, 1); - break; - case " ": - case "Enter": - event.preventDefault(); - _this.handleDayClick(_this.props.preSelection, event); - break; - } - if (!newSelection) return; // Let the input component handle this keydown - event.preventDefault(); - _this.props.updateSelection(newSelection); - }; - - _this.isWeekInMonth = function (startOfWeek) { - var day = _this.props.day; - var endOfWeek = addDays(cloneDate(startOfWeek), 6); - return isSameMonth(startOfWeek, day) || isSameMonth(endOfWeek, day); - }; - - _this.renderWeeks = function () { - var weeks = []; - var isFixedHeight = _this.props.fixedHeight; - var currentWeekStart = getStartOfWeek(getStartOfMonth(cloneDate(_this.props.day))); - var i = 0; - var breakAfterNextPush = false; - - while (true) { - weeks.push(React__default.createElement(Week, { - key: i, - day: currentWeekStart, - month: getMonth(_this.props.day), - onDayClick: _this.handleDayClick, - onDayMouseEnter: _this.handleDayMouseEnter, - onWeekSelect: _this.props.onWeekSelect, - formatWeekNumber: _this.props.formatWeekNumber, - minDate: _this.props.minDate, - maxDate: _this.props.maxDate, - excludeDates: _this.props.excludeDates, - includeDates: _this.props.includeDates, - inline: _this.props.inline, - highlightDates: _this.props.highlightDates, - selectingDate: _this.props.selectingDate, - filterDate: _this.props.filterDate, - preSelection: _this.props.preSelection, - selected: _this.props.selected, - selectsStart: _this.props.selectsStart, - selectsEnd: _this.props.selectsEnd, - showWeekNumber: _this.props.showWeekNumbers, - startDate: _this.props.startDate, - endDate: _this.props.endDate, - dayClassName: _this.props.dayClassName, - utcOffset: _this.props.utcOffset, - setOpen: _this.props.setOpen, - shouldCloseOnSelect: _this.props.shouldCloseOnSelect, - disabledKeyboardNavigation: _this.props.disabledKeyboardNavigation, - renderDayContents: _this.props.renderDayContents, - accessibleMode: _this.props.accessibleMode - })); - - if (breakAfterNextPush) break; - - i++; - currentWeekStart = addWeeks(cloneDate(currentWeekStart), 1); - - // If one of these conditions is true, we will either break on this week - // or break on the next week - var isFixedAndFinalWeek = isFixedHeight && i >= FIXED_HEIGHT_STANDARD_WEEK_COUNT; - var isNonFixedAndOutOfMonth = !isFixedHeight && !_this.isWeekInMonth(currentWeekStart); - - if (isFixedAndFinalWeek || isNonFixedAndOutOfMonth) { - if (_this.props.peekNextMonth) { - breakAfterNextPush = true; - } else { - break; - } - } - } - - return weeks; - }; - - _this.getClassNames = function () { - var _this$props = _this.props, - selectingDate = _this$props.selectingDate, - selectsStart = _this$props.selectsStart, - selectsEnd = _this$props.selectsEnd; - - return classnames("react-datepicker__month", { - "react-datepicker__month--accessible": _this.props.accessibleMode, - "react-datepicker__month--selecting-range": selectingDate && (selectsStart || selectsEnd) - }); - }; - - _this.dayFormat = "MMMM D, YYYY."; - _this.state = { - readInstructions: false - }; - return _this; - } - - Month.prototype.render = function render() { - var screenReaderInstructions = void 0; - if (this.state.readInstructions) { - screenReaderInstructions = React__default.createElement( - "p", - { "aria-live": true }, - "You are focused on a calendar. Use the arrow keys to navigate the days in the month. Use the page up and down keys to navigate from month to month. Use the home and end keys to navigate from year to year.", - formatDate(this.props.preSelection, this.dayFormat), - " is the currently focused date." - ); - } - - return React__default.createElement( - "div", - { - className: this.getClassNames(), - onMouseLeave: this.handleMouseLeave, - role: "listbox", - "aria-label": "month-" + this.props.day.format("YYYY-MM"), - tabIndex: this.props.accessibleMode ? 0 : -1, - onKeyDown: this.onInputKeyDown, - onFocus: this.onFocus - }, - React__default.createElement( - ScreenReaderOnly, - null, - React__default.createElement( - "span", - null, - screenReaderInstructions - ) - ), - this.renderWeeks() - ); - }; - - return Month; -}(React__default.Component); - -Month.propTypes = { - disabledKeyboardNavigation: PropTypes.bool, - day: PropTypes.object.isRequired, - dayClassName: PropTypes.func, - endDate: PropTypes.object, - excludeDates: PropTypes.array, - filterDate: PropTypes.func, - fixedHeight: PropTypes.bool, - formatWeekNumber: PropTypes.func, - highlightDates: PropTypes.instanceOf(Map), - includeDates: PropTypes.array, - inline: PropTypes.bool, - maxDate: PropTypes.object, - minDate: PropTypes.object, - onDayClick: PropTypes.func, - onDayMouseEnter: PropTypes.func, - onMouseLeave: PropTypes.func, - onWeekSelect: PropTypes.func, - peekNextMonth: PropTypes.bool, - preSelection: PropTypes.object, - selected: PropTypes.object, - selectingDate: PropTypes.object, - selectsEnd: PropTypes.bool, - selectsStart: PropTypes.bool, - showWeekNumbers: PropTypes.bool, - startDate: PropTypes.object, - setOpen: PropTypes.func, - shouldCloseOnSelect: PropTypes.bool, - utcOffset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - renderDayContents: PropTypes.func, - updateSelection: PropTypes.func.isRequired, - accessibleMode: PropTypes.bool -}; - -function doHoursAndMinutesAlign(time1, time2) { - if (time1 == null || time2 == null) return false; - return getHour(time1) === getHour(time2) && getMinute(time1) === getMinute(time2); -} - -var Time = function (_React$Component) { - inherits(Time, _React$Component); - createClass(Time, null, [{ - key: "defaultProps", - get: function get$$1() { - return { - intervals: 30, - onTimeChange: function onTimeChange() {}, - todayButton: null, - timeCaption: "Time" - }; - } - }]); - - function Time() { - classCallCheck(this, Time); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var _this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))); - - _initialiseProps.call(_this); - - var times = _this.generateTimes(); - var preSelection = times.reduce(function (preSelection, time) { - if (preSelection) return preSelection; - if (doHoursAndMinutesAlign(time, _this.props.selected)) { - return time; - } - }, null); - - if (preSelection == null) { - // there is no exact pre-selection, find the element closest to the selected time and preselect it - var currH = _this.props.selected ? getHour(_this.props.selected) : getHour(newDate()); - var currM = _this.props.selected ? getMinute(_this.props.selected) : getMinute(newDate()); - var closestTimeIndex = Math.floor((60 * currH + currM) / _this.props.intervals); - var closestMinutes = closestTimeIndex * _this.props.intervals; - preSelection = setTime(newDate(), { - hour: Math.floor(closestMinutes / 60), - minute: closestMinutes % 60, - second: 0, - millisecond: 0 - }); - } - - _this.timeFormat = "hh:mm A"; - _this.state = { - preSelection: preSelection, - needsScrollToPreSelection: false, - readInstructions: false, - isFocused: false - }; - return _this; - } - - Time.prototype.componentDidMount = function componentDidMount() { - // code to ensure selected time will always be in focus within time window when it first appears - var scrollParent = this.list; - - scrollParent.scrollTop = Time.calcCenterPosition(this.props.monthRef ? this.props.monthRef.clientHeight - this.header.clientHeight : this.list.clientHeight, this.selectedLi || this.preselectedLi); - }; - - Time.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { - // if selection changed, scroll to the selected item - if (this.props.selected && this.props.selected.isSame(prevProps.selected) === false) { - var scrollToElement = this.selectedLi; - - if (scrollToElement) { - // an element matches the selected time, scroll to it - scrollToElement.scrollIntoView({ - behavior: "instant", - block: "nearest", - inline: "nearest" - }); - } - - // update preSelection to the selection - this.setState({ - preSelection: this.props.selected - }); - } - - if (this.state.needsScrollToPreSelection) { - var _scrollToElement = this.preselectedLi; - - if (_scrollToElement) { - // an element matches the selected time, scroll to it - _scrollToElement.scrollIntoView({ - behavior: "instant", - block: "nearest", - inline: "nearest" - }); - } - - this.setState({ needsScrollToPreSelection: false }); - } - }; - - Time.prototype.render = function render() { - var _this2 = this; - - var height = null; - if (this.props.monthRef && this.header) { - height = this.props.monthRef.clientHeight - this.header.clientHeight; - } - - var classNames = classnames("react-datepicker__time-container", { - "react-datepicker__time-container--with-today-button": this.props.todayButton, - "react-datepicker__time-container--focus": this.state.isFocused - }); - - var timeBoxClassNames = classnames("react-datepicker__time-box", { - "react-datepicker__time-box--accessible": this.props.accessibleMode - }); - - var screenReaderInstructions = void 0; - if (this.state.readInstructions) { - screenReaderInstructions = React__default.createElement( - "p", - { "aria-live": true }, - "You are a in a time selector. Use the up and down keys to select from other common times then press enter to confirm.", - formatDate(this.state.preSelection, this.timeFormat), - " is currently focused." - ); - } - - return React__default.createElement( - "div", - { className: classNames }, - React__default.createElement( - "div", - { - className: "react-datepicker__header react-datepicker__header--time", - ref: function ref(header) { - _this2.header = header; - } - }, - React__default.createElement( - "div", - { className: "react-datepicker-time__header" }, - this.props.timeCaption - ), - React__default.createElement( - ScreenReaderOnly, - null, - React__default.createElement( - "span", - null, - screenReaderInstructions - ) - ) - ), - React__default.createElement( - "div", - { className: "react-datepicker__time" }, - React__default.createElement( - "div", - { - className: timeBoxClassNames, - tabIndex: this.props.accessibleMode ? 0 : -1, - onKeyDown: this.onInputKeyDown, - onFocus: this.onFocus, - onBlur: this.onBlur - }, - React__default.createElement( - "ul", - { - className: "react-datepicker__time-list", - ref: function ref(list) { - _this2.list = list; - }, - style: height ? { height: height } : {}, - role: "listbox" - }, - this.renderTimes.bind(this)() - ) - ) - ) - ); - }; - - return Time; -}(React__default.Component); - -Time.propTypes = { - format: PropTypes.string, - includeTimes: PropTypes.array, - intervals: PropTypes.number, - selected: PropTypes.object, - onChange: PropTypes.func, - todayButton: PropTypes.node, - minTime: PropTypes.object, - maxTime: PropTypes.object, - excludeTimes: PropTypes.array, - monthRef: PropTypes.object, - timeCaption: PropTypes.string, - injectTimes: PropTypes.array, - accessibleMode: PropTypes.bool -}; - -Time.calcCenterPosition = function (listHeight, centerLiRef) { - return centerLiRef.offsetTop - (listHeight / 2 - centerLiRef.clientHeight / 2); -}; - -var _initialiseProps = function _initialiseProps() { - var _this3 = this; - - this.onFocus = function () { - if (_this3.props.accessibleMode) { - _this3.setState({ readInstructions: true, isFocused: true }); - } - }; - - this.onBlur = function () { - if (_this3.props.accessibleMode) { - _this3.setState({ isFocused: false }); - } - }; - - this.onInputKeyDown = function (event) { - var eventKey = event.key; - var copy = newDate(_this3.state.preSelection); - var newSelection = void 0; - switch (eventKey) { - case "ArrowUp": - newSelection = addMinutes(copy, -_this3.props.intervals); - break; - case "ArrowDown": - newSelection = addMinutes(copy, _this3.props.intervals); - break; - case " ": - case "Enter": - event.preventDefault(); - _this3.handleClick(_this3.state.preSelection); - break; - } - if (!newSelection) return; // Let the input component handle this keydown - event.preventDefault(); - _this3.setState({ - preSelection: newSelection, - needsScrollToPreSelection: true - }); - }; - - this.handleClick = function (time) { - if ((_this3.props.minTime || _this3.props.maxTime) && isTimeInDisabledRange(time, _this3.props) || _this3.props.excludeTimes && isTimeDisabled(time, _this3.props.excludeTimes) || _this3.props.includeTimes && !isTimeDisabled(time, _this3.props.includeTimes)) { - return; - } - - _this3.props.onChange(time); - }; - - this.liClasses = function (time, activeTime) { - var classes = ["react-datepicker__time-list-item"]; - - if (doHoursAndMinutesAlign(time, activeTime)) { - classes.push("react-datepicker__time-list-item--selected"); - } else if (_this3.state.preSelection && doHoursAndMinutesAlign(time, _this3.state.preSelection)) { - classes.push("react-datepicker__time-list-item--preselected"); - } - if ((_this3.props.minTime || _this3.props.maxTime) && isTimeInDisabledRange(time, _this3.props) || _this3.props.excludeTimes && isTimeDisabled(time, _this3.props.excludeTimes) || _this3.props.includeTimes && !isTimeDisabled(time, _this3.props.includeTimes)) { - classes.push("react-datepicker__time-list-item--disabled"); - } - if (_this3.props.injectTimes && (getHour(time) * 60 + getMinute(time)) % _this3.props.intervals !== 0) { - classes.push("react-datepicker__time-list-item--injected"); - } - - return classes.join(" "); - }; - - this.generateTimes = function () { - var times = []; - var intervals = _this3.props.intervals; - var base = getStartOfDay(newDate()); - var multiplier = 1440 / intervals; - var sortedInjectTimes = _this3.props.injectTimes && _this3.props.injectTimes.sort(function (a, b) { - return a - b; - }); - for (var i = 0; i < multiplier; i++) { - var currentTime = addMinutes(cloneDate(base), i * intervals); - times.push(currentTime); - - if (sortedInjectTimes) { - var timesToInject = timesToInjectAfter(base, currentTime, i, intervals, sortedInjectTimes); - times = times.concat(timesToInject); - } - } - return times; - }; - - this.renderTimes = function () { - var times = _this3.generateTimes(); - var activeTime = _this3.props.selected ? _this3.props.selected : newDate(); - var format = _this3.props.format ? _this3.props.format : _this3.timeFormat; - var currH = getHour(activeTime); - var currM = getMinute(activeTime); - return times.map(function (time, i) { - return React__default.createElement( - "li", - { - key: i, - onClick: _this3.handleClick.bind(_this3, time), - className: _this3.liClasses(time, activeTime), - ref: function ref(li) { - if (li && li.classList.contains("react-datepicker__time-list-item--preselected")) { - _this3.preselectedLi = li; - } - - if (li && li.classList.contains("react-datepicker__time-list-item--selected")) { - _this3.selectedLi = li; - } - }, - role: "option", - id: i - }, - formatDate(time, format) - ); - }); - }; -}; - -function CalendarContainer(_ref) { - var className = _ref.className, - children = _ref.children, - _ref$arrowProps = _ref.arrowProps, - arrowProps = _ref$arrowProps === undefined ? {} : _ref$arrowProps; - - return React__default.createElement( - "div", - { className: className }, - React__default.createElement("div", _extends({ className: "react-datepicker__triangle" }, arrowProps)), - children - ); -} - -CalendarContainer.propTypes = { - className: PropTypes.string, - children: PropTypes.node, - arrowProps: PropTypes.object // react-popper arrow props -}; - -var FocusTrapContainer = React__default.forwardRef(function (props, ref) { - return React__default.createElement("div", _extends({ ref: ref, className: "react-datepicker__focusTrap" }, props)); -}); - -var DROPDOWN_FOCUS_CLASSNAMES = ["react-datepicker__year-select", "react-datepicker__month-select", "react-datepicker__month-year-select"]; - -var isDropdownSelect = function isDropdownSelect() { - var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var classNames = (element.className || "").split(/\s+/); - return DROPDOWN_FOCUS_CLASSNAMES.some(function (testClassname) { - return classNames.indexOf(testClassname) >= 0; - }); -}; - -var Calendar = function (_React$Component) { - inherits(Calendar, _React$Component); - createClass(Calendar, null, [{ - key: "defaultProps", - get: function get$$1() { - return { - onDropdownFocus: function onDropdownFocus() {}, - monthsShown: 1, - forceShowMonthNavigation: false, - timeCaption: "Time" - }; - } - }]); - - function Calendar(props) { - classCallCheck(this, Calendar); - - var _this = possibleConstructorReturn(this, _React$Component.call(this, props)); - - _this.handleClickOutside = function (event) { - _this.props.onClickOutside(event); - }; - - _this.handleDropdownFocus = function (event) { - if (isDropdownSelect(event.target)) { - _this.props.onDropdownFocus(); - } - }; - - _this.getDateInView = function () { - var _this$props = _this.props, - preSelection = _this$props.preSelection, - selected = _this$props.selected, - openToDate = _this$props.openToDate, - utcOffset = _this$props.utcOffset; - - var minDate = getEffectiveMinDate(_this.props); - var maxDate = getEffectiveMaxDate(_this.props); - var current = now(utcOffset); - var initialDate = openToDate || selected || preSelection; - if (initialDate) { - return initialDate; - } else { - if (minDate && isBefore(current, minDate)) { - return minDate; - } else if (maxDate && isAfter(current, maxDate)) { - return maxDate; - } - } - return current; - }; - - _this.localizeDate = function (date) { - return localizeDate(date, _this.props.locale); - }; - - _this.increaseMonth = function () { - _this.setState({ - date: addMonths(cloneDate(_this.state.date), 1) - }, function () { - return _this.handleMonthChange(_this.state.date); - }); - }; - - _this.decreaseMonth = function () { - _this.setState({ - date: subtractMonths(cloneDate(_this.state.date), 1) - }, function () { - return _this.handleMonthChange(_this.state.date); - }); - }; - - _this.handleDayClick = function (day, event) { - return _this.props.onSelect(day, event); - }; - - _this.handleDayMouseEnter = function (day) { - return _this.setState({ selectingDate: day }); - }; - - _this.handleMonthMouseLeave = function () { - return _this.setState({ selectingDate: null }); - }; - - _this.handleYearChange = function (date) { - if (_this.props.onYearChange) { - _this.props.onYearChange(date); - } - if (_this.props.accessibleMode) { - _this.handleSelectionChange(date); - } - }; - - _this.handleMonthChange = function (date) { - if (_this.props.onMonthChange) { - _this.props.onMonthChange(date); - } - if (_this.props.adjustDateOnChange) { - if (_this.props.onSelect) { - _this.props.onSelect(date); - } - if (_this.props.setOpen) { - _this.props.setOpen(true); - } - } - if (_this.props.accessibleMode) { - _this.handleSelectionChange(date); - } - }; - - _this.handleSelectionChange = function (date) { - if (_this.props.adjustDateOnChange) { - _this.props.updateSelection(date); - } else { - _this.props.updateSelection(getStartOfMonth(cloneDate(date))); - } - }; - - _this.handleMonthYearChange = function (date) { - _this.handleYearChange(date); - _this.handleMonthChange(date); - }; - - _this.changeYear = function (year) { - _this.setState({ - date: setYear(cloneDate(_this.state.date), year) - }, function () { - return _this.handleYearChange(_this.state.date); - }); - }; - - _this.changeMonth = function (month) { - _this.setState({ - date: setMonth(cloneDate(_this.state.date), month) - }, function () { - return _this.handleMonthChange(_this.state.date); - }); - }; - - _this.changeMonthYear = function (monthYear) { - _this.setState({ - date: setYear(setMonth(cloneDate(_this.state.date), getMonth(monthYear)), getYear(monthYear)) - }, function () { - return _this.handleMonthYearChange(_this.state.date); - }); - }; - - _this.header = function () { - var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.state.date; - - var startOfWeek = getStartOfWeek(cloneDate(date)); - var dayNames = []; - if (_this.props.showWeekNumbers) { - dayNames.push(React__default.createElement( - "div", - { key: "W", className: "react-datepicker__day-name" }, - _this.props.weekLabel || "#" - )); - } - return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function (offset) { - var day = addDays(cloneDate(startOfWeek), offset); - var localeData = getLocaleData(day); - var weekDayName = _this.formatWeekday(localeData, day); - - return React__default.createElement( - "div", - { key: offset, className: "react-datepicker__day-name" }, - weekDayName - ); - })); - }; - - _this.formatWeekday = function (localeData, day) { - if (_this.props.formatWeekDay) { - return getFormattedWeekdayInLocale(localeData, day, _this.props.formatWeekDay); - } - return _this.props.useWeekdaysShort ? getWeekdayShortInLocale(localeData, day) : getWeekdayMinInLocale(localeData, day); - }; - - _this.renderPreviousMonthButton = function () { - if (_this.props.renderCustomHeader) { - return; - } - - var allPrevDaysDisabled = allDaysDisabledBefore(_this.state.date, "month", _this.props); - - if (!_this.props.forceShowMonthNavigation && !_this.props.showDisabledMonthNavigation && allPrevDaysDisabled || _this.props.showTimeSelectOnly) { - return; - } - - var classes = ["react-datepicker__navigation", "react-datepicker__navigation--previous"]; - - var clickHandler = _this.decreaseMonth; - - if (allPrevDaysDisabled && _this.props.showDisabledMonthNavigation) { - classes.push("react-datepicker__navigation--previous--disabled"); - clickHandler = null; - } - - return React__default.createElement( - "button", - { - type: "button", - className: classes.join(" "), - onClick: clickHandler - }, - _this.props.previousMonthButtonLabel - ); - }; - - _this.renderNextMonthButton = function () { - if (_this.props.renderCustomHeader) { - return; - } - - var allNextDaysDisabled = allDaysDisabledAfter(_this.state.date, "month", _this.props); - - if (!_this.props.forceShowMonthNavigation && !_this.props.showDisabledMonthNavigation && allNextDaysDisabled || _this.props.showTimeSelectOnly) { - return; - } - - var classes = ["react-datepicker__navigation", "react-datepicker__navigation--next"]; - if (_this.props.showTimeSelect) { - classes.push("react-datepicker__navigation--next--with-time"); - } - if (_this.props.todayButton) { - classes.push("react-datepicker__navigation--next--with-today-button"); - } - - var clickHandler = _this.increaseMonth; - - if (allNextDaysDisabled && _this.props.showDisabledMonthNavigation) { - classes.push("react-datepicker__navigation--next--disabled"); - clickHandler = null; - } - - return React__default.createElement( - "button", - { - type: "button", - className: classes.join(" "), - onClick: clickHandler - }, - _this.props.nextMonthButtonLabel - ); - }; - - _this.renderCurrentMonth = function () { - var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.state.date; - - var classes = ["react-datepicker__current-month"]; - - if (_this.props.showYearDropdown) { - classes.push("react-datepicker__current-month--hasYearDropdown"); - } - if (_this.props.showMonthDropdown) { - classes.push("react-datepicker__current-month--hasMonthDropdown"); - } - if (_this.props.showMonthYearDropdown) { - classes.push("react-datepicker__current-month--hasMonthYearDropdown"); - } - return React__default.createElement( - "div", - { className: classes.join(" ") }, - formatDate(date, _this.props.dateFormat) - ); - }; - - _this.renderYearDropdown = function () { - var overrideHide = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - if (!_this.props.showYearDropdown || overrideHide) { - return; - } - return React__default.createElement(YearDropdown, { - adjustDateOnChange: _this.props.adjustDateOnChange, - date: _this.state.date, - onSelect: _this.props.onSelect, - setOpen: _this.props.setOpen, - dropdownMode: _this.props.dropdownMode, - onChange: _this.changeYear, - minDate: _this.props.minDate, - maxDate: _this.props.maxDate, - year: getYear(_this.state.date), - scrollableYearDropdown: _this.props.scrollableYearDropdown, - yearDropdownItemNumber: _this.props.yearDropdownItemNumber, - accessibleMode: _this.props.accessibleMode - }); - }; - - _this.renderMonthDropdown = function () { - var overrideHide = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - if (!_this.props.showMonthDropdown || overrideHide) { - return; - } - return React__default.createElement(MonthDropdown, { - dropdownMode: _this.props.dropdownMode, - locale: _this.props.locale, - dateFormat: _this.props.dateFormat, - onChange: _this.changeMonth, - month: getMonth(_this.state.date), - useShortMonthInDropdown: _this.props.useShortMonthInDropdown, - accessibleMode: _this.props.accessibleMode - }); - }; - - _this.renderMonthYearDropdown = function () { - var overrideHide = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - if (!_this.props.showMonthYearDropdown || overrideHide) { - return; - } - return React__default.createElement(MonthYearDropdown, { - dropdownMode: _this.props.dropdownMode, - locale: _this.props.locale, - dateFormat: _this.props.dateFormat, - onChange: _this.changeMonthYear, - minDate: _this.props.minDate, - maxDate: _this.props.maxDate, - date: _this.state.date, - scrollableMonthYearDropdown: _this.props.scrollableMonthYearDropdown, - accessibleMode: _this.props.accessibleMode - }); - }; - - _this.renderTodayButton = function () { - if (!_this.props.todayButton || _this.props.showTimeSelectOnly) { - return; - } - return React__default.createElement( - "div", - { - className: "react-datepicker__today-button", - onClick: function onClick(e) { - return _this.props.onSelect(getStartOfDate(now(_this.props.utcOffset)), e); - } - }, - _this.props.todayButton - ); - }; - - _this.renderDefaultHeader = function (_ref) { - var monthDate = _ref.monthDate, - i = _ref.i; - return React__default.createElement( - "div", - { className: "react-datepicker__header" }, - _this.renderCurrentMonth(monthDate), - React__default.createElement( - "div", - { - className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--" + _this.props.dropdownMode, - onFocus: _this.handleDropdownFocus - }, - _this.renderMonthDropdown(i !== 0), - _this.renderMonthYearDropdown(i !== 0), - _this.renderYearDropdown(i !== 0) - ), - React__default.createElement( - "div", - { className: "react-datepicker__day-names" }, - _this.header(monthDate) - ) - ); - }; - - _this.renderCustomHeader = function (_ref2) { - var monthDate = _ref2.monthDate, - i = _ref2.i; - - if (i !== 0) { - return null; - } - - var prevMonthButtonDisabled = allDaysDisabledBefore(_this.state.date, "month", _this.props); - - var nextMonthButtonDisabled = allDaysDisabledAfter(_this.state.date, "month", _this.props); - - return React__default.createElement( - "div", - { - className: "react-datepicker__header react-datepicker__header--custom", - onFocus: _this.props.onDropdownFocus - }, - _this.props.renderCustomHeader(_extends({}, _this.state, { - changeMonth: _this.changeMonth, - changeYear: _this.changeYear, - decreaseMonth: _this.decreaseMonth, - increaseMonth: _this.increaseMonth, - prevMonthButtonDisabled: prevMonthButtonDisabled, - nextMonthButtonDisabled: nextMonthButtonDisabled - })), - React__default.createElement( - "div", - { className: "react-datepicker__day-names" }, - _this.header(monthDate) - ) - ); - }; - - _this.renderMonths = function () { - if (_this.props.showTimeSelectOnly) { - return; - } - - var monthList = []; - for (var i = 0; i < _this.props.monthsShown; ++i) { - var monthDate = addMonths(cloneDate(_this.state.date), i); - var monthKey = "month-" + i; - monthList.push(React__default.createElement( - "div", - { - key: monthKey, - ref: function ref(div) { - _this.monthContainer = div; - }, - className: "react-datepicker__month-container" - }, - _this.props.renderCustomHeader ? _this.renderCustomHeader({ monthDate: monthDate, i: i }) : _this.renderDefaultHeader({ monthDate: monthDate, i: i }), - React__default.createElement(Month, { - day: monthDate, - dayClassName: _this.props.dayClassName, - onDayClick: _this.handleDayClick, - onDayMouseEnter: _this.handleDayMouseEnter, - onMouseLeave: _this.handleMonthMouseLeave, - onWeekSelect: _this.props.onWeekSelect, - formatWeekNumber: _this.props.formatWeekNumber, - minDate: _this.props.minDate, - maxDate: _this.props.maxDate, - excludeDates: _this.props.excludeDates, - highlightDates: _this.props.highlightDates, - selectingDate: _this.state.selectingDate, - includeDates: _this.props.includeDates, - inline: _this.props.inline, - fixedHeight: _this.props.fixedHeight, - filterDate: _this.props.filterDate, - preSelection: _this.props.preSelection, - selected: _this.props.selected, - selectsStart: _this.props.selectsStart, - selectsEnd: _this.props.selectsEnd, - showWeekNumbers: _this.props.showWeekNumbers, - startDate: _this.props.startDate, - endDate: _this.props.endDate, - peekNextMonth: _this.props.peekNextMonth, - utcOffset: _this.props.utcOffset, - setOpen: _this.props.setOpen, - shouldCloseOnSelect: _this.props.shouldCloseOnSelect, - renderDayContents: _this.props.renderDayContents, - disabledKeyboardNavigation: _this.props.disabledKeyboardNavigation, - updateSelection: _this.props.updateSelection, - accessibleMode: _this.props.accessibleMode - }) - )); - } - return monthList; - }; - - _this.renderTimeSection = function () { - if (_this.props.showTimeSelect && (_this.state.monthContainer || _this.props.showTimeSelectOnly)) { - return React__default.createElement(Time, { - selected: _this.props.selected, - onChange: _this.props.onTimeChange, - format: _this.props.timeFormat, - includeTimes: _this.props.includeTimes, - intervals: _this.props.timeIntervals, - minTime: _this.props.minTime, - maxTime: _this.props.maxTime, - excludeTimes: _this.props.excludeTimes, - timeCaption: _this.props.timeCaption, - todayButton: _this.props.todayButton, - showMonthDropdown: _this.props.showMonthDropdown, - showMonthYearDropdown: _this.props.showMonthYearDropdown, - showYearDropdown: _this.props.showYearDropdown, - withPortal: _this.props.withPortal, - monthRef: _this.state.monthContainer, - injectTimes: _this.props.injectTimes, - accessibleMode: _this.props.accessibleMode - }); - } - }; - - _this.state = { - date: _this.localizeDate(_this.getDateInView()), - selectingDate: null, - monthContainer: null - }; - return _this; - } - - Calendar.prototype.componentDidMount = function componentDidMount() { - var _this2 = this; - - // monthContainer height is needed in time component - // to determine the height for the ul in the time component - // setState here so height is given after final component - // layout is rendered - if (this.props.showTimeSelect) { - this.assignMonthContainer = function () { - _this2.setState({ monthContainer: _this2.monthContainer }); - }(); - } - }; - - Calendar.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { - if (this.props.preSelection && !isSameDay(this.props.preSelection, prevProps.preSelection)) { - this.setState({ - date: this.localizeDate(this.props.preSelection) - }); - } else if (this.props.openToDate && !isSameDay(this.props.openToDate, prevProps.openToDate)) { - this.setState({ - date: this.localizeDate(this.props.openToDate) - }); - } - }; - - Calendar.prototype.render = function render() { - var _this3 = this; - - var Container = this.props.container || CalendarContainer; - - var trapFocus = this.props.accessibleMode && !this.props.inline; - var initialFocusTarget = this.props.showTimeSelectOnly ? ".react-datepicker__time-box--accessible" : ".react-datepicker__month--accessible"; - - if (trapFocus) { - return React__default.createElement( - Container, - { - className: classnames("react-datepicker", this.props.className, { - "react-datepicker--time-only": this.props.showTimeSelectOnly - }) - }, - React__default.createElement( - focusTrapReact, - { - tag: FocusTrapContainer, - focusTrapOptions: { - onDeactivate: function onDeactivate() { - return _this3.props.setOpen(false); - }, - initialFocus: initialFocusTarget - } - }, - this.renderPreviousMonthButton(), - this.renderNextMonthButton(), - this.renderMonths(), - this.renderTodayButton(), - this.renderTimeSection(), - this.props.children - ) - ); - } else { - return React__default.createElement( - Container, - { - className: classnames("react-datepicker", this.props.className, { - "react-datepicker--time-only": this.props.showTimeSelectOnly - }) - }, - this.renderPreviousMonthButton(), - this.renderNextMonthButton(), - this.renderMonths(), - this.renderTodayButton(), - this.renderTimeSection(), - this.props.children - ); - } - }; - - return Calendar; -}(React__default.Component); - -Calendar.propTypes = { - adjustDateOnChange: PropTypes.bool, - className: PropTypes.string, - children: PropTypes.node, - container: PropTypes.func, - dateFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.array]).isRequired, - dayClassName: PropTypes.func, - disabledKeyboardNavigation: PropTypes.bool, - dropdownMode: PropTypes.oneOf(["scroll", "select"]), - endDate: PropTypes.object, - excludeDates: PropTypes.array, - filterDate: PropTypes.func, - fixedHeight: PropTypes.bool, - formatWeekNumber: PropTypes.func, - highlightDates: PropTypes.instanceOf(Map), - includeDates: PropTypes.array, - includeTimes: PropTypes.array, - injectTimes: PropTypes.array, - inline: PropTypes.bool, - locale: PropTypes.string, - maxDate: PropTypes.object, - minDate: PropTypes.object, - monthsShown: PropTypes.number, - onClickOutside: PropTypes.func.isRequired, - onMonthChange: PropTypes.func, - onYearChange: PropTypes.func, - forceShowMonthNavigation: PropTypes.bool, - onDropdownFocus: PropTypes.func, - onSelect: PropTypes.func.isRequired, - onWeekSelect: PropTypes.func, - showTimeSelect: PropTypes.bool, - showTimeSelectOnly: PropTypes.bool, - timeFormat: PropTypes.string, - timeIntervals: PropTypes.number, - onTimeChange: PropTypes.func, - minTime: PropTypes.object, - maxTime: PropTypes.object, - excludeTimes: PropTypes.array, - timeCaption: PropTypes.string, - openToDate: PropTypes.object, - peekNextMonth: PropTypes.bool, - scrollableYearDropdown: PropTypes.bool, - scrollableMonthYearDropdown: PropTypes.bool, - preSelection: PropTypes.object, - selected: PropTypes.object, - selectsEnd: PropTypes.bool, - selectsStart: PropTypes.bool, - showMonthDropdown: PropTypes.bool, - showMonthYearDropdown: PropTypes.bool, - showWeekNumbers: PropTypes.bool, - showYearDropdown: PropTypes.bool, - startDate: PropTypes.object, - todayButton: PropTypes.node, - useWeekdaysShort: PropTypes.bool, - formatWeekDay: PropTypes.func, - withPortal: PropTypes.bool, - utcOffset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - weekLabel: PropTypes.string, - yearDropdownItemNumber: PropTypes.number, - setOpen: PropTypes.func, - shouldCloseOnSelect: PropTypes.bool, - useShortMonthInDropdown: PropTypes.bool, - showDisabledMonthNavigation: PropTypes.bool, - previousMonthButtonLabel: PropTypes.string, - nextMonthButtonLabel: PropTypes.string, - renderCustomHeader: PropTypes.func, - renderDayContents: PropTypes.func, - updateSelection: PropTypes.func.isRequired, - accessibleMode: PropTypes.bool -}; - -var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - -function unwrapExports (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; -} - -function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; -} - -var _global = createCommonjsModule(function (module) { -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef -}); - -var _core = createCommonjsModule(function (module) { -var core = module.exports = { version: '2.5.1' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef -}); -var _core_1 = _core.version; - -var _aFunction = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - -// optional / simple context binding - -var _ctx = function (fn, that, length) { - _aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - -var _isObject = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - -var _anObject = function (it) { - if (!_isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - -var _fails = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - -// Thank's IE8 for his funny defineProperty -var _descriptors = !_fails(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - -var document$1 = _global.document; -// typeof document.createElement is 'object' in old IE -var is = _isObject(document$1) && _isObject(document$1.createElement); -var _domCreate = function (it) { - return is ? document$1.createElement(it) : {}; -}; - -var _ie8DomDefine = !_descriptors && !_fails(function () { - return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; -}); - -// 7.1.1 ToPrimitive(input [, PreferredType]) - -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -var _toPrimitive = function (it, S) { - if (!_isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - -var dP = Object.defineProperty; - -var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { - _anObject(O); - P = _toPrimitive(P, true); - _anObject(Attributes); - if (_ie8DomDefine) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - -var _objectDp = { - f: f -}; - -var _propertyDesc = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - -var _hide = _descriptors ? function (object, key, value) { - return _objectDp.f(object, key, _propertyDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var IS_WRAP = type & $export.W; - var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); - var expProto = exports[PROTOTYPE]; - var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE]; - var key, own, out; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if (own && key in exports) continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? _ctx(out, _global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function (C) { - var F = function (a, b, c) { - if (this instanceof C) { - switch (arguments.length) { - case 0: return new C(); - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if (IS_PROTO) { - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out); - } - } -}; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -var _export = $export; - -var hasOwnProperty$1 = {}.hasOwnProperty; -var _has = function (it, key) { - return hasOwnProperty$1.call(it, key); -}; - -var toString = {}.toString; - -var _cof = function (it) { - return toString.call(it).slice(8, -1); -}; - -// fallback for non-array-like ES3 and non-enumerable old V8 strings - -// eslint-disable-next-line no-prototype-builtins -var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return _cof(it) == 'String' ? it.split('') : Object(it); -}; - -// 7.2.1 RequireObjectCoercible(argument) -var _defined = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - -// to indexed object, toObject with fallback for non-array-like ES3 strings - - -var _toIobject = function (it) { - return _iobject(_defined(it)); -}; - -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -var _toInteger = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - -// 7.1.15 ToLength - -var min = Math.min; -var _toLength = function (it) { - return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - -var max = Math.max; -var min$1 = Math.min; -var _toAbsoluteIndex = function (index, length) { - index = _toInteger(index); - return index < 0 ? max(index + length, 0) : min$1(index, length); -}; - -// false -> Array#indexOf -// true -> Array#includes - - - -var _arrayIncludes = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = _toIobject($this); - var length = _toLength(O.length); - var index = _toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; - -var SHARED = '__core-js_shared__'; -var store = _global[SHARED] || (_global[SHARED] = {}); -var _shared = function (key) { - return store[key] || (store[key] = {}); -}; - -var id = 0; -var px = Math.random(); -var _uid = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - -var shared = _shared('keys'); - -var _sharedKey = function (key) { - return shared[key] || (shared[key] = _uid(key)); -}; - -var arrayIndexOf = _arrayIncludes(false); -var IE_PROTO = _sharedKey('IE_PROTO'); - -var _objectKeysInternal = function (object, names) { - var O = _toIobject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (_has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; - -// IE 8- don't enum bug keys -var _enumBugKeys = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) - - - -var _objectKeys = Object.keys || function keys(O) { - return _objectKeysInternal(O, _enumBugKeys); -}; - -var f$1 = Object.getOwnPropertySymbols; - -var _objectGops = { - f: f$1 -}; - -var f$2 = {}.propertyIsEnumerable; - -var _objectPie = { - f: f$2 -}; - -// 7.1.13 ToObject(argument) - -var _toObject = function (it) { - return Object(_defined(it)); -}; - -// 19.1.2.1 Object.assign(target, source, ...) - - - - - -var $assign = Object.assign; - -// should work with symbols and should have deterministic property order (V8 bug) -var _objectAssign = !$assign || _fails(function () { - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var S = Symbol(); - var K = 'abcdefghijklmnopqrst'; - A[S] = 7; - K.split('').forEach(function (k) { B[k] = k; }); - return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; -}) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = _toObject(target); - var aLen = arguments.length; - var index = 1; - var getSymbols = _objectGops.f; - var isEnum = _objectPie.f; - while (aLen > index) { - var S = _iobject(arguments[index++]); - var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; - } return T; -} : $assign; - -// 19.1.3.1 Object.assign(target, source) - - -_export(_export.S + _export.F, 'Object', { assign: _objectAssign }); - -var assign = _core.Object.assign; - -var assign$1 = createCommonjsModule(function (module) { -module.exports = { "default": assign, __esModule: true }; -}); - -unwrapExports(assign$1); - -var _extends$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; - - - -var _assign2 = _interopRequireDefault(assign$1); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _assign2.default || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; -}; -}); - -var _extends$2 = unwrapExports(_extends$1); - -var classCallCheck$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; - -exports.default = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}; -}); - -var _classCallCheck$1 = unwrapExports(classCallCheck$1); - -// true -> String#at -// false -> String#codePointAt -var _stringAt = function (TO_STRING) { - return function (that, pos) { - var s = String(_defined(that)); - var i = _toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; - -var _library = true; - -var _redefine = _hide; - -var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) { - _anObject(O); - var keys = _objectKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]); - return O; -}; - -var document$2 = _global.document; -var _html = document$2 && document$2.documentElement; - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) - - - -var IE_PROTO$1 = _sharedKey('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE$1 = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = _domCreate('iframe'); - var i = _enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - _html.appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]]; - return createDict(); -}; - -var _objectCreate = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE$1] = _anObject(O); - result = new Empty(); - Empty[PROTOTYPE$1] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO$1] = O; - } else result = createDict(); - return Properties === undefined ? result : _objectDps(result, Properties); -}; - -var _wks = createCommonjsModule(function (module) { -var store = _shared('wks'); - -var Symbol = _global.Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name)); -}; - -$exports.store = store; -}); - -var def = _objectDp.f; - -var TAG = _wks('toStringTag'); - -var _setToStringTag = function (it, tag, stat) { - if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; - -var IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -_hide(IteratorPrototype, _wks('iterator'), function () { return this; }); - -var _iterCreate = function (Constructor, NAME, next) { - Constructor.prototype = _objectCreate(IteratorPrototype, { next: _propertyDesc(1, next) }); - _setToStringTag(Constructor, NAME + ' Iterator'); -}; - -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) - - -var IE_PROTO$2 = _sharedKey('IE_PROTO'); -var ObjectProto = Object.prototype; - -var _objectGpo = Object.getPrototypeOf || function (O) { - O = _toObject(O); - if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; - -var ITERATOR = _wks('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; - -var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - _iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = _objectGpo($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - _setToStringTag(IteratorPrototype, TAG, true); - } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - _hide(proto, ITERATOR, $default); - } - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) _redefine(proto, key, methods[key]); - } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; - -var $at = _stringAt(true); - -// 21.1.3.27 String.prototype[@@iterator]() -_iterDefine(String, 'String', function (iterated) { - this._t = String(iterated); // target - this._i = 0; // next index -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { value: undefined, done: true }; - point = $at(O, index); - this._i += point.length; - return { value: point, done: false }; -}); - -var _iterStep = function (done, value) { - return { value: value, done: !!done }; -}; - -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) { - this._t = _toIobject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return _iterStep(1); - } - if (kind == 'keys') return _iterStep(0, index); - if (kind == 'values') return _iterStep(0, O[index]); - return _iterStep(0, [index, O[index]]); -}, 'values'); - -var TO_STRING_TAG = _wks('toStringTag'); - -var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + - 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + - 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + - 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + - 'TextTrackList,TouchList').split(','); - -for (var i = 0; i < DOMIterables.length; i++) { - var NAME = DOMIterables[i]; - var Collection = _global[NAME]; - var proto = Collection && Collection.prototype; - if (proto && !proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME); -} - -var f$3 = _wks; - -var _wksExt = { - f: f$3 -}; - -var iterator = _wksExt.f('iterator'); - -var iterator$1 = createCommonjsModule(function (module) { -module.exports = { "default": iterator, __esModule: true }; -}); - -unwrapExports(iterator$1); - -var _meta = createCommonjsModule(function (module) { -var META = _uid('meta'); - - -var setDesc = _objectDp.f; -var id = 0; -var isExtensible = Object.isExtensible || function () { - return true; -}; -var FREEZE = !_fails(function () { - return isExtensible(Object.preventExtensions({})); -}); -var setMeta = function (it) { - setDesc(it, META, { value: { - i: 'O' + ++id, // object ID - w: {} // weak collections IDs - } }); -}; -var fastKey = function (it, create) { - // return primitive with prefix - if (!_isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if (!_has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return 'F'; - // not necessary to add metadata - if (!create) return 'E'; - // add missing metadata - setMeta(it); - // return object ID - } return it[META].i; -}; -var getWeak = function (it, create) { - if (!_has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return true; - // not necessary to add metadata - if (!create) return false; - // add missing metadata - setMeta(it); - // return hash weak collections IDs - } return it[META].w; -}; -// add metadata on freeze-family methods calling -var onFreeze = function (it) { - if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it); - return it; -}; -var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, - onFreeze: onFreeze -}; -}); -var _meta_1 = _meta.KEY; -var _meta_2 = _meta.NEED; -var _meta_3 = _meta.fastKey; -var _meta_4 = _meta.getWeak; -var _meta_5 = _meta.onFreeze; - -var defineProperty$1 = _objectDp.f; -var _wksDefine = function (name) { - var $Symbol = _core.Symbol || (_core.Symbol = _library ? {} : _global.Symbol || {}); - if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty$1($Symbol, name, { value: _wksExt.f(name) }); -}; - -// all enumerable object keys, includes symbols - - - -var _enumKeys = function (it) { - var result = _objectKeys(it); - var getSymbols = _objectGops.f; - if (getSymbols) { - var symbols = getSymbols(it); - var isEnum = _objectPie.f; - var i = 0; - var key; - while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); - } return result; -}; - -// 7.2.2 IsArray(argument) - -var _isArray = Array.isArray || function isArray(arg) { - return _cof(arg) == 'Array'; -}; - -// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) - -var hiddenKeys = _enumBugKeys.concat('length', 'prototype'); - -var f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return _objectKeysInternal(O, hiddenKeys); -}; - -var _objectGopn = { - f: f$4 -}; - -// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window - -var gOPN = _objectGopn.f; -var toString$1 = {}.toString; - -var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames - ? Object.getOwnPropertyNames(window) : []; - -var getWindowNames = function (it) { - try { - return gOPN(it); - } catch (e) { - return windowNames.slice(); - } -}; - -var f$5 = function getOwnPropertyNames(it) { - return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(_toIobject(it)); -}; - -var _objectGopnExt = { - f: f$5 -}; - -var gOPD = Object.getOwnPropertyDescriptor; - -var f$6 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) { - O = _toIobject(O); - P = _toPrimitive(P, true); - if (_ie8DomDefine) try { - return gOPD(O, P); - } catch (e) { /* empty */ } - if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]); -}; - -var _objectGopd = { - f: f$6 -}; - -// ECMAScript 6 symbols shim - - - - - -var META = _meta.KEY; - - - - - - - - - - - - - - - - - - -var gOPD$1 = _objectGopd.f; -var dP$1 = _objectDp.f; -var gOPN$1 = _objectGopnExt.f; -var $Symbol = _global.Symbol; -var $JSON = _global.JSON; -var _stringify = $JSON && $JSON.stringify; -var PROTOTYPE$2 = 'prototype'; -var HIDDEN = _wks('_hidden'); -var TO_PRIMITIVE = _wks('toPrimitive'); -var isEnum = {}.propertyIsEnumerable; -var SymbolRegistry = _shared('symbol-registry'); -var AllSymbols = _shared('symbols'); -var OPSymbols = _shared('op-symbols'); -var ObjectProto$1 = Object[PROTOTYPE$2]; -var USE_NATIVE = typeof $Symbol == 'function'; -var QObject = _global.QObject; -// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 -var setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild; - -// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 -var setSymbolDesc = _descriptors && _fails(function () { - return _objectCreate(dP$1({}, 'a', { - get: function () { return dP$1(this, 'a', { value: 7 }).a; } - })).a != 7; -}) ? function (it, key, D) { - var protoDesc = gOPD$1(ObjectProto$1, key); - if (protoDesc) delete ObjectProto$1[key]; - dP$1(it, key, D); - if (protoDesc && it !== ObjectProto$1) dP$1(ObjectProto$1, key, protoDesc); -} : dP$1; - -var wrap = function (tag) { - var sym = AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2]); - sym._k = tag; - return sym; -}; - -var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { - return typeof it == 'symbol'; -} : function (it) { - return it instanceof $Symbol; -}; - -var $defineProperty = function defineProperty(it, key, D) { - if (it === ObjectProto$1) $defineProperty(OPSymbols, key, D); - _anObject(it); - key = _toPrimitive(key, true); - _anObject(D); - if (_has(AllSymbols, key)) { - if (!D.enumerable) { - if (!_has(it, HIDDEN)) dP$1(it, HIDDEN, _propertyDesc(1, {})); - it[HIDDEN][key] = true; - } else { - if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; - D = _objectCreate(D, { enumerable: _propertyDesc(0, false) }); - } return setSymbolDesc(it, key, D); - } return dP$1(it, key, D); -}; -var $defineProperties = function defineProperties(it, P) { - _anObject(it); - var keys = _enumKeys(P = _toIobject(P)); - var i = 0; - var l = keys.length; - var key; - while (l > i) $defineProperty(it, key = keys[i++], P[key]); - return it; -}; -var $create = function create(it, P) { - return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P); -}; -var $propertyIsEnumerable = function propertyIsEnumerable(key) { - var E = isEnum.call(this, key = _toPrimitive(key, true)); - if (this === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false; - return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true; -}; -var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { - it = _toIobject(it); - key = _toPrimitive(key, true); - if (it === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return; - var D = gOPD$1(it, key); - if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; - return D; -}; -var $getOwnPropertyNames = function getOwnPropertyNames(it) { - var names = gOPN$1(_toIobject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (!_has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); - } return result; -}; -var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { - var IS_OP = it === ObjectProto$1; - var names = gOPN$1(IS_OP ? OPSymbols : _toIobject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (_has(AllSymbols, key = names[i++]) && (IS_OP ? _has(ObjectProto$1, key) : true)) result.push(AllSymbols[key]); - } return result; -}; - -// 19.4.1.1 Symbol([description]) -if (!USE_NATIVE) { - $Symbol = function Symbol() { - if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); - var tag = _uid(arguments.length > 0 ? arguments[0] : undefined); - var $set = function (value) { - if (this === ObjectProto$1) $set.call(OPSymbols, value); - if (_has(this, HIDDEN) && _has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; - setSymbolDesc(this, tag, _propertyDesc(1, value)); - }; - if (_descriptors && setter) setSymbolDesc(ObjectProto$1, tag, { configurable: true, set: $set }); - return wrap(tag); - }; - _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() { - return this._k; - }); - - _objectGopd.f = $getOwnPropertyDescriptor; - _objectDp.f = $defineProperty; - _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames; - _objectPie.f = $propertyIsEnumerable; - _objectGops.f = $getOwnPropertySymbols; - - if (_descriptors && !_library) { - _redefine(ObjectProto$1, 'propertyIsEnumerable', $propertyIsEnumerable, true); - } - - _wksExt.f = function (name) { - return wrap(_wks(name)); - }; -} - -_export(_export.G + _export.W + _export.F * !USE_NATIVE, { Symbol: $Symbol }); - -for (var es6Symbols = ( - // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 - 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' -).split(','), j = 0; es6Symbols.length > j;)_wks(es6Symbols[j++]); - -for (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]); - -_export(_export.S + _export.F * !USE_NATIVE, 'Symbol', { - // 19.4.2.1 Symbol.for(key) - 'for': function (key) { - return _has(SymbolRegistry, key += '') - ? SymbolRegistry[key] - : SymbolRegistry[key] = $Symbol(key); - }, - // 19.4.2.5 Symbol.keyFor(sym) - keyFor: function keyFor(sym) { - if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); - for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; - }, - useSetter: function () { setter = true; }, - useSimple: function () { setter = false; } -}); - -_export(_export.S + _export.F * !USE_NATIVE, 'Object', { - // 19.1.2.2 Object.create(O [, Properties]) - create: $create, - // 19.1.2.4 Object.defineProperty(O, P, Attributes) - defineProperty: $defineProperty, - // 19.1.2.3 Object.defineProperties(O, Properties) - defineProperties: $defineProperties, - // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) - getOwnPropertyDescriptor: $getOwnPropertyDescriptor, - // 19.1.2.7 Object.getOwnPropertyNames(O) - getOwnPropertyNames: $getOwnPropertyNames, - // 19.1.2.8 Object.getOwnPropertySymbols(O) - getOwnPropertySymbols: $getOwnPropertySymbols -}); - -// 24.3.2 JSON.stringify(value [, replacer [, space]]) -$JSON && _export(_export.S + _export.F * (!USE_NATIVE || _fails(function () { - var S = $Symbol(); - // MS Edge converts symbol values to JSON as {} - // WebKit converts symbol values to JSON as null - // V8 throws on boxed symbols - return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; -})), 'JSON', { - stringify: function stringify(it) { - if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined - var args = [it]; - var i = 1; - var replacer, $replacer; - while (arguments.length > i) args.push(arguments[i++]); - replacer = args[1]; - if (typeof replacer == 'function') $replacer = replacer; - if ($replacer || !_isArray(replacer)) replacer = function (key, value) { - if ($replacer) value = $replacer.call(this, key, value); - if (!isSymbol(value)) return value; - }; - args[1] = replacer; - return _stringify.apply($JSON, args); - } -}); - -// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) -$Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf); -// 19.4.3.5 Symbol.prototype[@@toStringTag] -_setToStringTag($Symbol, 'Symbol'); -// 20.2.1.9 Math[@@toStringTag] -_setToStringTag(Math, 'Math', true); -// 24.3.3 JSON[@@toStringTag] -_setToStringTag(_global.JSON, 'JSON', true); - -_wksDefine('asyncIterator'); - -_wksDefine('observable'); - -var symbol = _core.Symbol; - -var symbol$1 = /*#__PURE__*/Object.freeze({ - default: symbol, - __moduleExports: symbol -}); - -var require$$0 = ( symbol$1 && symbol ) || symbol$1; - -var symbol$2 = createCommonjsModule(function (module) { -module.exports = { "default": require$$0, __esModule: true }; -}); - -unwrapExports(symbol$2); - -var _typeof_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; - - - -var _iterator2 = _interopRequireDefault(iterator$1); - - - -var _symbol2 = _interopRequireDefault(symbol$2); - -var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { - return typeof obj === "undefined" ? "undefined" : _typeof(obj); -} : function (obj) { - return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); -}; -}); - -unwrapExports(_typeof_1); - -var possibleConstructorReturn$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; - - - -var _typeof3 = _interopRequireDefault(_typeof_1); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; -}; -}); - -var _possibleConstructorReturn$1 = unwrapExports(possibleConstructorReturn$1); - -// Works with __proto__ only. Old v8 can't work with null proto objects. -/* eslint-disable no-proto */ - - -var check = function (O, proto) { - _anObject(O); - if (!_isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); -}; -var _setProto = { - set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line - function (test, buggy, set) { - try { - set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch (e) { buggy = true; } - return function setPrototypeOf(O, proto) { - check(O, proto); - if (buggy) O.__proto__ = proto; - else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check -}; - -// 19.1.3.19 Object.setPrototypeOf(O, proto) - -_export(_export.S, 'Object', { setPrototypeOf: _setProto.set }); - -var setPrototypeOf = _core.Object.setPrototypeOf; - -var setPrototypeOf$1 = createCommonjsModule(function (module) { -module.exports = { "default": setPrototypeOf, __esModule: true }; -}); - -unwrapExports(setPrototypeOf$1); - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -_export(_export.S, 'Object', { create: _objectCreate }); - -var $Object = _core.Object; -var create = function create(P, D) { - return $Object.create(P, D); -}; - -var create$1 = createCommonjsModule(function (module) { -module.exports = { "default": create, __esModule: true }; -}); - -unwrapExports(create$1); - -var inherits$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; - - - -var _setPrototypeOf2 = _interopRequireDefault(setPrototypeOf$1); - - - -var _create2 = _interopRequireDefault(create$1); - - - -var _typeof3 = _interopRequireDefault(_typeof_1); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); - } - - subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; -}; -}); - -var _inherits$1 = unwrapExports(inherits$1); - -/**! - * @fileOverview Kickass library to create and place poppers near their reference elements. - * @version 1.14.1 - * @license - * Copyright (c) 2016 Federico Zivolo and contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined'; -var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; -var timeoutDuration = 0; -for (var i$1 = 0; i$1 < longerTimeoutBrowsers.length; i$1 += 1) { - if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i$1]) >= 0) { - timeoutDuration = 1; - break; - } -} - -function microtaskDebounce(fn) { - var called = false; - return function () { - if (called) { - return; - } - called = true; - window.Promise.resolve().then(function () { - called = false; - fn(); - }); - }; -} - -function taskDebounce(fn) { - var scheduled = false; - return function () { - if (!scheduled) { - scheduled = true; - setTimeout(function () { - scheduled = false; - fn(); - }, timeoutDuration); - } - }; -} - -var supportsMicroTasks = isBrowser && window.Promise; - -/** -* Create a debounced version of a method, that's asynchronously deferred -* but called in the minimum time possible. -* -* @method -* @memberof Popper.Utils -* @argument {Function} fn -* @returns {Function} -*/ -var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; - -/** - * Check if the given variable is a function - * @method - * @memberof Popper.Utils - * @argument {Any} functionToCheck - variable to check - * @returns {Boolean} answer to: is a function? - */ -function isFunction(functionToCheck) { - var getType = {}; - return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; -} - -/** - * Get CSS computed property of the given element - * @method - * @memberof Popper.Utils - * @argument {Eement} element - * @argument {String} property - */ -function getStyleComputedProperty(element, property) { - if (element.nodeType !== 1) { - return []; - } - // NOTE: 1 DOM access here - var css = getComputedStyle(element, null); - return property ? css[property] : css; -} - -/** - * Returns the parentNode or the host of the element - * @method - * @memberof Popper.Utils - * @argument {Element} element - * @returns {Element} parent - */ -function getParentNode(element) { - if (element.nodeName === 'HTML') { - return element; - } - return element.parentNode || element.host; -} - -/** - * Returns the scrolling parent of the given element - * @method - * @memberof Popper.Utils - * @argument {Element} element - * @returns {Element} scroll parent - */ -function getScrollParent(element) { - // Return body, `getScroll` will take care to get the correct `scrollTop` from it - if (!element) { - return document.body; - } - - switch (element.nodeName) { - case 'HTML': - case 'BODY': - return element.ownerDocument.body; - case '#document': - return element.body; - } - - // Firefox want us to check `-x` and `-y` variations as well - - var _getStyleComputedProp = getStyleComputedProperty(element), - overflow = _getStyleComputedProp.overflow, - overflowX = _getStyleComputedProp.overflowX, - overflowY = _getStyleComputedProp.overflowY; - - if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { - return element; - } - - return getScrollParent(getParentNode(element)); -} - -/** - * Tells if you are running Internet Explorer - * @method - * @memberof Popper.Utils - * @argument {number} version to check - * @returns {Boolean} isIE - */ -var cache = {}; - -var isIE = function () { - var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all'; - - version = version.toString(); - if (cache.hasOwnProperty(version)) { - return cache[version]; - } - switch (version) { - case '11': - cache[version] = navigator.userAgent.indexOf('Trident') !== -1; - break; - case '10': - cache[version] = navigator.appVersion.indexOf('MSIE 10') !== -1; - break; - case 'all': - cache[version] = navigator.userAgent.indexOf('Trident') !== -1 || navigator.userAgent.indexOf('MSIE') !== -1; - break; - } - - //Set IE - cache.all = cache.all || Object.keys(cache).some(function (key) { - return cache[key]; - }); - return cache[version]; -}; - -/** - * Returns the offset parent of the given element - * @method - * @memberof Popper.Utils - * @argument {Element} element - * @returns {Element} offset parent - */ -function getOffsetParent(element) { - if (!element) { - return document.documentElement; - } - - var noOffsetParent = isIE(10) ? document.body : null; - - // NOTE: 1 DOM access here - var offsetParent = element.offsetParent; - // Skip hidden elements which don't have an offsetParent - while (offsetParent === noOffsetParent && element.nextElementSibling) { - offsetParent = (element = element.nextElementSibling).offsetParent; - } - - var nodeName = offsetParent && offsetParent.nodeName; - - if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { - return element ? element.ownerDocument.documentElement : document.documentElement; - } - - // .offsetParent will return the closest TD or TABLE in case - // no offsetParent is present, I hate this job... - if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { - return getOffsetParent(offsetParent); - } - - return offsetParent; -} - -function isOffsetContainer(element) { - var nodeName = element.nodeName; - - if (nodeName === 'BODY') { - return false; - } - return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element; -} - -/** - * Finds the root node (document, shadowDOM root) of the given element - * @method - * @memberof Popper.Utils - * @argument {Element} node - * @returns {Element} root node - */ -function getRoot(node) { - if (node.parentNode !== null) { - return getRoot(node.parentNode); - } - - return node; -} - -/** - * Finds the offset parent common to the two provided nodes - * @method - * @memberof Popper.Utils - * @argument {Element} element1 - * @argument {Element} element2 - * @returns {Element} common offset parent - */ -function findCommonOffsetParent(element1, element2) { - // This check is needed to avoid errors in case one of the elements isn't defined for any reason - if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) { - return document.documentElement; - } - - // Here we make sure to give as "start" the element that comes first in the DOM - var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING; - var start = order ? element1 : element2; - var end = order ? element2 : element1; - - // Get common ancestor container - var range = document.createRange(); - range.setStart(start, 0); - range.setEnd(end, 0); - var commonAncestorContainer = range.commonAncestorContainer; - - // Both nodes are inside #document - - if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) { - if (isOffsetContainer(commonAncestorContainer)) { - return commonAncestorContainer; - } - - return getOffsetParent(commonAncestorContainer); - } - - // one of the nodes is inside shadowDOM, find which one - var element1root = getRoot(element1); - if (element1root.host) { - return findCommonOffsetParent(element1root.host, element2); - } else { - return findCommonOffsetParent(element1, getRoot(element2).host); - } -} - -/** - * Gets the scroll value of the given element in the given side (top and left) - * @method - * @memberof Popper.Utils - * @argument {Element} element - * @argument {String} side `top` or `left` - * @returns {number} amount of scrolled pixels - */ -function getScroll(element) { - var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top'; - - var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft'; - var nodeName = element.nodeName; - - if (nodeName === 'BODY' || nodeName === 'HTML') { - var html = element.ownerDocument.documentElement; - var scrollingElement = element.ownerDocument.scrollingElement || html; - return scrollingElement[upperSide]; - } - - return element[upperSide]; -} - -/* - * Sum or subtract the element scroll values (left and top) from a given rect object - * @method - * @memberof Popper.Utils - * @param {Object} rect - Rect object you want to change - * @param {HTMLElement} element - The element from the function reads the scroll values - * @param {Boolean} subtract - set to true if you want to subtract the scroll values - * @return {Object} rect - The modifier rect object - */ -function includeScroll(rect, element) { - var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - - var scrollTop = getScroll(element, 'top'); - var scrollLeft = getScroll(element, 'left'); - var modifier = subtract ? -1 : 1; - rect.top += scrollTop * modifier; - rect.bottom += scrollTop * modifier; - rect.left += scrollLeft * modifier; - rect.right += scrollLeft * modifier; - return rect; -} - -/* - * Helper to detect borders of a given element - * @method - * @memberof Popper.Utils - * @param {CSSStyleDeclaration} styles - * Result of `getStyleComputedProperty` on the given element - * @param {String} axis - `x` or `y` - * @return {number} borders - The borders size of the given axis - */ - -function getBordersSize(styles, axis) { - var sideA = axis === 'x' ? 'Left' : 'Top'; - var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; - - return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10); -} - -function getSize(axis, body, html, computedStyle) { - return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); -} - -function getWindowSizes() { - var body = document.body; - var html = document.documentElement; - var computedStyle = isIE(10) && getComputedStyle(html); - - return { - height: getSize('Height', body, html, computedStyle), - width: getSize('Width', body, html, computedStyle) - }; -} - -var classCallCheck$2 = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}; - -var createClass$1 = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; -}(); - - - - - -var defineProperty$2 = function (obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -}; - -var _extends$3 = 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; -}; - -/** - * Given element offsets, generate an output similar to getBoundingClientRect - * @method - * @memberof Popper.Utils - * @argument {Object} offsets - * @returns {Object} ClientRect like output - */ -function getClientRect(offsets) { - return _extends$3({}, offsets, { - right: offsets.left + offsets.width, - bottom: offsets.top + offsets.height - }); -} - -/** - * Get bounding client rect of given element - * @method - * @memberof Popper.Utils - * @param {HTMLElement} element - * @return {Object} client rect - */ -function getBoundingClientRect(element) { - var rect = {}; - - // IE10 10 FIX: Please, don't ask, the element isn't - // considered in DOM in some circumstances... - // This isn't reproducible in IE10 compatibility mode of IE11 - try { - if (isIE(10)) { - rect = element.getBoundingClientRect(); - var scrollTop = getScroll(element, 'top'); - var scrollLeft = getScroll(element, 'left'); - rect.top += scrollTop; - rect.left += scrollLeft; - rect.bottom += scrollTop; - rect.right += scrollLeft; - } else { - rect = element.getBoundingClientRect(); - } - } catch (e) {} - - var result = { - left: rect.left, - top: rect.top, - width: rect.right - rect.left, - height: rect.bottom - rect.top - }; - - // subtract scrollbar size from sizes - var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {}; - var width = sizes.width || element.clientWidth || result.right - result.left; - var height = sizes.height || element.clientHeight || result.bottom - result.top; - - var horizScrollbar = element.offsetWidth - width; - var vertScrollbar = element.offsetHeight - height; - - // if an hypothetical scrollbar is detected, we must be sure it's not a `border` - // we make this check conditional for performance reasons - if (horizScrollbar || vertScrollbar) { - var styles = getStyleComputedProperty(element); - horizScrollbar -= getBordersSize(styles, 'x'); - vertScrollbar -= getBordersSize(styles, 'y'); - - result.width -= horizScrollbar; - result.height -= vertScrollbar; - } - - return getClientRect(result); -} - -function getOffsetRectRelativeToArbitraryNode(children, parent) { - var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - - var isIE10 = isIE(10); - var isHTML = parent.nodeName === 'HTML'; - var childrenRect = getBoundingClientRect(children); - var parentRect = getBoundingClientRect(parent); - var scrollParent = getScrollParent(children); - - var styles = getStyleComputedProperty(parent); - var borderTopWidth = parseFloat(styles.borderTopWidth, 10); - var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); - - // In cases where the parent is fixed, we must ignore negative scroll in offset calc - if (fixedPosition && parent.nodeName === 'HTML') { - parentRect.top = Math.max(parentRect.top, 0); - parentRect.left = Math.max(parentRect.left, 0); - } - var offsets = getClientRect({ - top: childrenRect.top - parentRect.top - borderTopWidth, - left: childrenRect.left - parentRect.left - borderLeftWidth, - width: childrenRect.width, - height: childrenRect.height - }); - offsets.marginTop = 0; - offsets.marginLeft = 0; - - // Subtract margins of documentElement in case it's being used as parent - // we do this only on HTML because it's the only element that behaves - // differently when margins are applied to it. The margins are included in - // the box of the documentElement, in the other cases not. - if (!isIE10 && isHTML) { - var marginTop = parseFloat(styles.marginTop, 10); - var marginLeft = parseFloat(styles.marginLeft, 10); - - offsets.top -= borderTopWidth - marginTop; - offsets.bottom -= borderTopWidth - marginTop; - offsets.left -= borderLeftWidth - marginLeft; - offsets.right -= borderLeftWidth - marginLeft; - - // Attach marginTop and marginLeft because in some circumstances we may need them - offsets.marginTop = marginTop; - offsets.marginLeft = marginLeft; - } - - if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { - offsets = includeScroll(offsets, parent); - } - - return offsets; -} - -function getViewportOffsetRectRelativeToArtbitraryNode(element) { - var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var html = element.ownerDocument.documentElement; - var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); - var width = Math.max(html.clientWidth, window.innerWidth || 0); - var height = Math.max(html.clientHeight, window.innerHeight || 0); - - var scrollTop = !excludeScroll ? getScroll(html) : 0; - var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; - - var offset = { - top: scrollTop - relativeOffset.top + relativeOffset.marginTop, - left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, - width: width, - height: height - }; - - return getClientRect(offset); -} - -/** - * Check if the given element is fixed or is inside a fixed parent - * @method - * @memberof Popper.Utils - * @argument {Element} element - * @argument {Element} customContainer - * @returns {Boolean} answer to "isFixed?" - */ -function isFixed(element) { - var nodeName = element.nodeName; - if (nodeName === 'BODY' || nodeName === 'HTML') { - return false; - } - if (getStyleComputedProperty(element, 'position') === 'fixed') { - return true; - } - return isFixed(getParentNode(element)); -} - -/** - * Finds the first parent of an element that has a transformed property defined - * @method - * @memberof Popper.Utils - * @argument {Element} element - * @returns {Element} first transformed parent or documentElement - */ - -function getFixedPositionOffsetParent(element) { - // This check is needed to avoid errors in case one of the elements isn't defined for any reason - if (!element || !element.parentElement || isIE()) { - return document.documentElement; - } - var el = element.parentElement; - while (el && getStyleComputedProperty(el, 'transform') === 'none') { - el = el.parentElement; - } - return el || document.documentElement; -} - -/** - * Computed the boundaries limits and return them - * @method - * @memberof Popper.Utils - * @param {HTMLElement} popper - * @param {HTMLElement} reference - * @param {number} padding - * @param {HTMLElement} boundariesElement - Element used to define the boundaries - * @param {Boolean} fixedPosition - Is in fixed position mode - * @returns {Object} Coordinates of the boundaries - */ -function getBoundaries(popper, reference, padding, boundariesElement) { - var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; - - // NOTE: 1 DOM access here - - var boundaries = { top: 0, left: 0 }; - var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); - - // Handle viewport case - if (boundariesElement === 'viewport') { - boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); - } else { - // Handle other cases based on DOM element used as boundaries - var boundariesNode = void 0; - if (boundariesElement === 'scrollParent') { - boundariesNode = getScrollParent(getParentNode(reference)); - if (boundariesNode.nodeName === 'BODY') { - boundariesNode = popper.ownerDocument.documentElement; - } - } else if (boundariesElement === 'window') { - boundariesNode = popper.ownerDocument.documentElement; - } else { - boundariesNode = boundariesElement; - } - - var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); - - // In case of HTML, we need a different computation - if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { - var _getWindowSizes = getWindowSizes(), - height = _getWindowSizes.height, - width = _getWindowSizes.width; - - boundaries.top += offsets.top - offsets.marginTop; - boundaries.bottom = height + offsets.top; - boundaries.left += offsets.left - offsets.marginLeft; - boundaries.right = width + offsets.left; - } else { - // for all the other DOM elements, this one is good - boundaries = offsets; - } - } - - // Add paddings - boundaries.left += padding; - boundaries.top += padding; - boundaries.right -= padding; - boundaries.bottom -= padding; - - return boundaries; -} - -function getArea(_ref) { - var width = _ref.width, - height = _ref.height; - - return width * height; -} - -/** - * Utility used to transform the `auto` placement to the placement with more - * available space. - * @method - * @memberof Popper.Utils - * @argument {Object} data - The data object generated by update method - * @argument {Object} options - Modifiers configuration and options - * @returns {Object} The data object, properly modified - */ -function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) { - var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; - - if (placement.indexOf('auto') === -1) { - return placement; - } - - var boundaries = getBoundaries(popper, reference, padding, boundariesElement); - - var rects = { - top: { - width: boundaries.width, - height: refRect.top - boundaries.top - }, - right: { - width: boundaries.right - refRect.right, - height: boundaries.height - }, - bottom: { - width: boundaries.width, - height: boundaries.bottom - refRect.bottom - }, - left: { - width: refRect.left - boundaries.left, - height: boundaries.height - } - }; - - var sortedAreas = Object.keys(rects).map(function (key) { - return _extends$3({ - key: key - }, rects[key], { - area: getArea(rects[key]) - }); - }).sort(function (a, b) { - return b.area - a.area; - }); - - var filteredAreas = sortedAreas.filter(function (_ref2) { - var width = _ref2.width, - height = _ref2.height; - return width >= popper.clientWidth && height >= popper.clientHeight; - }); - - var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key; - - var variation = placement.split('-')[1]; - - return computedPlacement + (variation ? '-' + variation : ''); -} - -/** - * Get offsets to the reference element - * @method - * @memberof Popper.Utils - * @param {Object} state - * @param {Element} popper - the popper element - * @param {Element} reference - the reference element (the popper will be relative to this) - * @param {Element} fixedPosition - is in fixed position mode - * @returns {Object} An object containing the offsets which will be applied to the popper - */ -function getReferenceOffsets(state, popper, reference) { - var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; - - var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); - return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); -} - -/** - * Get the outer sizes of the given element (offset size + margins) - * @method - * @memberof Popper.Utils - * @argument {Element} element - * @returns {Object} object containing width and height properties - */ -function getOuterSizes(element) { - var styles = getComputedStyle(element); - var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom); - var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight); - var result = { - width: element.offsetWidth + y, - height: element.offsetHeight + x - }; - return result; -} - -/** - * Get the opposite placement of the given one - * @method - * @memberof Popper.Utils - * @argument {String} placement - * @returns {String} flipped placement - */ -function getOppositePlacement(placement) { - var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; - return placement.replace(/left|right|bottom|top/g, function (matched) { - return hash[matched]; - }); -} - -/** - * Get offsets to the popper - * @method - * @memberof Popper.Utils - * @param {Object} position - CSS position the Popper will get applied - * @param {HTMLElement} popper - the popper element - * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this) - * @param {String} placement - one of the valid placement options - * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper - */ -function getPopperOffsets(popper, referenceOffsets, placement) { - placement = placement.split('-')[0]; - - // Get popper node sizes - var popperRect = getOuterSizes(popper); - - // Add position, width and height to our offsets object - var popperOffsets = { - width: popperRect.width, - height: popperRect.height - }; - - // depending by the popper placement we have to compute its offsets slightly differently - var isHoriz = ['right', 'left'].indexOf(placement) !== -1; - var mainSide = isHoriz ? 'top' : 'left'; - var secondarySide = isHoriz ? 'left' : 'top'; - var measurement = isHoriz ? 'height' : 'width'; - var secondaryMeasurement = !isHoriz ? 'height' : 'width'; - - popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; - if (placement === secondarySide) { - popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; - } else { - popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)]; - } - - return popperOffsets; -} - -/** - * Mimics the `find` method of Array - * @method - * @memberof Popper.Utils - * @argument {Array} arr - * @argument prop - * @argument value - * @returns index or -1 - */ -function find$1(arr, check) { - // use native find if supported - if (Array.prototype.find) { - return arr.find(check); - } - - // use `filter` to obtain the same behavior of `find` - return arr.filter(check)[0]; -} - -/** - * Return the index of the matching object - * @method - * @memberof Popper.Utils - * @argument {Array} arr - * @argument prop - * @argument value - * @returns index or -1 - */ -function findIndex(arr, prop, value) { - // use native findIndex if supported - if (Array.prototype.findIndex) { - return arr.findIndex(function (cur) { - return cur[prop] === value; - }); - } - - // use `find` + `indexOf` if `findIndex` isn't supported - var match = find$1(arr, function (obj) { - return obj[prop] === value; - }); - return arr.indexOf(match); -} - -/** - * Loop trough the list of modifiers and run them in order, - * each of them will then edit the data object. - * @method - * @memberof Popper.Utils - * @param {dataObject} data - * @param {Array} modifiers - * @param {String} ends - Optional modifier name used as stopper - * @returns {dataObject} - */ -function runModifiers(modifiers, data, ends) { - var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends)); - - modifiersToRun.forEach(function (modifier) { - if (modifier['function']) { - // eslint-disable-line dot-notation - console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); - } - var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation - if (modifier.enabled && isFunction(fn)) { - // Add properties to offsets to make them a complete clientRect object - // we do this before each modifier to make sure the previous one doesn't - // mess with these values - data.offsets.popper = getClientRect(data.offsets.popper); - data.offsets.reference = getClientRect(data.offsets.reference); - - data = fn(data, modifier); - } - }); - - return data; -} - -/** - * Updates the position of the popper, computing the new offsets and applying - * the new style.
- * Prefer `scheduleUpdate` over `update` because of performance reasons. - * @method - * @memberof Popper - */ -function update() { - // if popper is destroyed, don't perform any further update - if (this.state.isDestroyed) { - return; - } - - var data = { - instance: this, - styles: {}, - arrowStyles: {}, - attributes: {}, - flipped: false, - offsets: {} - }; - - // compute reference element offsets - data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); - - // compute auto placement, store placement inside the data object, - // modifiers will be able to edit `placement` if needed - // and refer to originalPlacement to know the original value - data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); - - // store the computed placement inside `originalPlacement` - data.originalPlacement = data.placement; - - data.positionFixed = this.options.positionFixed; - - // compute the popper offsets - data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); - data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; - - // run the modifiers - data = runModifiers(this.modifiers, data); - - // the first `update` will call `onCreate` callback - // the other ones will call `onUpdate` callback - if (!this.state.isCreated) { - this.state.isCreated = true; - this.options.onCreate(data); - } else { - this.options.onUpdate(data); - } -} - -/** - * Helper used to know if the given modifier is enabled. - * @method - * @memberof Popper.Utils - * @returns {Boolean} - */ -function isModifierEnabled(modifiers, modifierName) { - return modifiers.some(function (_ref) { - var name = _ref.name, - enabled = _ref.enabled; - return enabled && name === modifierName; - }); -} - -/** - * Get the prefixed supported property name - * @method - * @memberof Popper.Utils - * @argument {String} property (camelCase) - * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix) - */ -function getSupportedPropertyName(property) { - var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; - var upperProp = property.charAt(0).toUpperCase() + property.slice(1); - - for (var i = 0; i < prefixes.length; i++) { - var prefix = prefixes[i]; - var toCheck = prefix ? '' + prefix + upperProp : property; - if (typeof document.body.style[toCheck] !== 'undefined') { - return toCheck; - } - } - return null; -} - -/** - * Destroy the popper - * @method - * @memberof Popper - */ -function destroy() { - this.state.isDestroyed = true; - - // touch DOM only if `applyStyle` modifier is enabled - if (isModifierEnabled(this.modifiers, 'applyStyle')) { - this.popper.removeAttribute('x-placement'); - this.popper.style.position = ''; - this.popper.style.top = ''; - this.popper.style.left = ''; - this.popper.style.right = ''; - this.popper.style.bottom = ''; - this.popper.style.willChange = ''; - this.popper.style[getSupportedPropertyName('transform')] = ''; - } - - this.disableEventListeners(); - - // remove the popper if user explicity asked for the deletion on destroy - // do not use `remove` because IE11 doesn't support it - if (this.options.removeOnDestroy) { - this.popper.parentNode.removeChild(this.popper); - } - return this; -} - -/** - * Get the window associated with the element - * @argument {Element} element - * @returns {Window} - */ -function getWindow(element) { - var ownerDocument = element.ownerDocument; - return ownerDocument ? ownerDocument.defaultView : window; -} - -function attachToScrollParents(scrollParent, event, callback, scrollParents) { - var isBody = scrollParent.nodeName === 'BODY'; - var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent; - target.addEventListener(event, callback, { passive: true }); - - if (!isBody) { - attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); - } - scrollParents.push(target); -} - -/** - * Setup needed event listeners used to update the popper position - * @method - * @memberof Popper.Utils - * @private - */ -function setupEventListeners(reference, options, state, updateBound) { - // Resize event listener on window - state.updateBound = updateBound; - getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); - - // Scroll event listener on scroll parents - var scrollElement = getScrollParent(reference); - attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); - state.scrollElement = scrollElement; - state.eventsEnabled = true; - - return state; -} - -/** - * It will add resize/scroll events and start recalculating - * position of the popper element when they are triggered. - * @method - * @memberof Popper - */ -function enableEventListeners() { - if (!this.state.eventsEnabled) { - this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); - } -} - -/** - * Remove event listeners used to update the popper position - * @method - * @memberof Popper.Utils - * @private - */ -function removeEventListeners(reference, state) { - // Remove resize event listener on window - getWindow(reference).removeEventListener('resize', state.updateBound); - - // Remove scroll event listener on scroll parents - state.scrollParents.forEach(function (target) { - target.removeEventListener('scroll', state.updateBound); - }); - - // Reset state - state.updateBound = null; - state.scrollParents = []; - state.scrollElement = null; - state.eventsEnabled = false; - return state; -} - -/** - * It will remove resize/scroll events and won't recalculate popper position - * when they are triggered. It also won't trigger onUpdate callback anymore, - * unless you call `update` method manually. - * @method - * @memberof Popper - */ -function disableEventListeners() { - if (this.state.eventsEnabled) { - cancelAnimationFrame(this.scheduleUpdate); - this.state = removeEventListeners(this.reference, this.state); - } -} - -/** - * Tells if a given input is a number - * @method - * @memberof Popper.Utils - * @param {*} input to check - * @return {Boolean} - */ -function isNumeric(n) { - return n !== '' && !isNaN(parseFloat(n)) && isFinite(n); -} - -/** - * Set the style to the given popper - * @method - * @memberof Popper.Utils - * @argument {Element} element - Element to apply the style to - * @argument {Object} styles - * Object with a list of properties and values which will be applied to the element - */ -function setStyles(element, styles) { - Object.keys(styles).forEach(function (prop) { - var unit = ''; - // add unit if the value is numeric and is one of the following - if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) { - unit = 'px'; - } - element.style[prop] = styles[prop] + unit; - }); -} - -/** - * Set the attributes to the given popper - * @method - * @memberof Popper.Utils - * @argument {Element} element - Element to apply the attributes to - * @argument {Object} styles - * Object with a list of properties and values which will be applied to the element - */ -function setAttributes(element, attributes) { - Object.keys(attributes).forEach(function (prop) { - var value = attributes[prop]; - if (value !== false) { - element.setAttribute(prop, attributes[prop]); - } else { - element.removeAttribute(prop); - } - }); -} - -/** - * @function - * @memberof Modifiers - * @argument {Object} data - The data object generated by `update` method - * @argument {Object} data.styles - List of style properties - values to apply to popper element - * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element - * @argument {Object} options - Modifiers configuration and options - * @returns {Object} The same data object - */ -function applyStyle(data) { - // any property present in `data.styles` will be applied to the popper, - // in this way we can make the 3rd party modifiers add custom styles to it - // Be aware, modifiers could override the properties defined in the previous - // lines of this modifier! - setStyles(data.instance.popper, data.styles); - - // any property present in `data.attributes` will be applied to the popper, - // they will be set as HTML attributes of the element - setAttributes(data.instance.popper, data.attributes); - - // if arrowElement is defined and arrowStyles has some properties - if (data.arrowElement && Object.keys(data.arrowStyles).length) { - setStyles(data.arrowElement, data.arrowStyles); - } - - return data; -} - -/** - * Set the x-placement attribute before everything else because it could be used - * to add margins to the popper margins needs to be calculated to get the - * correct popper offsets. - * @method - * @memberof Popper.modifiers - * @param {HTMLElement} reference - The reference element used to position the popper - * @param {HTMLElement} popper - The HTML element used as popper - * @param {Object} options - Popper.js options - */ -function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { - // compute reference element offsets - var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); - - // compute auto placement, store placement inside the data object, - // modifiers will be able to edit `placement` if needed - // and refer to originalPlacement to know the original value - var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); - - popper.setAttribute('x-placement', placement); - - // Apply `position` to popper before anything else because - // without the position applied we can't guarantee correct computations - setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); - - return options; -} - -/** - * @function - * @memberof Modifiers - * @argument {Object} data - The data object generated by `update` method - * @argument {Object} options - Modifiers configuration and options - * @returns {Object} The data object, properly modified - */ -function computeStyle(data, options) { - var x = options.x, - y = options.y; - var popper = data.offsets.popper; - - // Remove this legacy support in Popper.js v2 - - var legacyGpuAccelerationOption = find$1(data.instance.modifiers, function (modifier) { - return modifier.name === 'applyStyle'; - }).gpuAcceleration; - if (legacyGpuAccelerationOption !== undefined) { - console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); - } - var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; - - var offsetParent = getOffsetParent(data.instance.popper); - var offsetParentRect = getBoundingClientRect(offsetParent); - - // Styles - var styles = { - position: popper.position - }; - - // floor sides to avoid blurry text - var offsets = { - left: Math.floor(popper.left), - top: Math.floor(popper.top), - bottom: Math.floor(popper.bottom), - right: Math.floor(popper.right) - }; - - var sideA = x === 'bottom' ? 'top' : 'bottom'; - var sideB = y === 'right' ? 'left' : 'right'; - - // if gpuAcceleration is set to `true` and transform is supported, - // we use `translate3d` to apply the position to the popper we - // automatically use the supported prefixed version if needed - var prefixedProperty = getSupportedPropertyName('transform'); - - // now, let's make a step back and look at this code closely (wtf?) - // If the content of the popper grows once it's been positioned, it - // may happen that the popper gets misplaced because of the new content - // overflowing its reference element - // To avoid this problem, we provide two options (x and y), which allow - // the consumer to define the offset origin. - // If we position a popper on top of a reference element, we can set - // `x` to `top` to make the popper grow towards its top instead of - // its bottom. - var left = void 0, - top = void 0; - if (sideA === 'bottom') { - top = -offsetParentRect.height + offsets.bottom; - } else { - top = offsets.top; - } - if (sideB === 'right') { - left = -offsetParentRect.width + offsets.right; - } else { - left = offsets.left; - } - if (gpuAcceleration && prefixedProperty) { - styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)'; - styles[sideA] = 0; - styles[sideB] = 0; - styles.willChange = 'transform'; - } else { - // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties - var invertTop = sideA === 'bottom' ? -1 : 1; - var invertLeft = sideB === 'right' ? -1 : 1; - styles[sideA] = top * invertTop; - styles[sideB] = left * invertLeft; - styles.willChange = sideA + ', ' + sideB; - } - - // Attributes - var attributes = { - 'x-placement': data.placement - }; - - // Update `data` attributes, styles and arrowStyles - data.attributes = _extends$3({}, attributes, data.attributes); - data.styles = _extends$3({}, styles, data.styles); - data.arrowStyles = _extends$3({}, data.offsets.arrow, data.arrowStyles); - - return data; -} - -/** - * Helper used to know if the given modifier depends from another one.
- * It checks if the needed modifier is listed and enabled. - * @method - * @memberof Popper.Utils - * @param {Array} modifiers - list of modifiers - * @param {String} requestingName - name of requesting modifier - * @param {String} requestedName - name of requested modifier - * @returns {Boolean} - */ -function isModifierRequired(modifiers, requestingName, requestedName) { - var requesting = find$1(modifiers, function (_ref) { - var name = _ref.name; - return name === requestingName; - }); - - var isRequired = !!requesting && modifiers.some(function (modifier) { - return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; - }); - - if (!isRequired) { - var _requesting = '`' + requestingName + '`'; - var requested = '`' + requestedName + '`'; - console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); - } - return isRequired; -} - -/** - * @function - * @memberof Modifiers - * @argument {Object} data - The data object generated by update method - * @argument {Object} options - Modifiers configuration and options - * @returns {Object} The data object, properly modified - */ -function arrow(data, options) { - var _data$offsets$arrow; - - // arrow depends on keepTogether in order to work - if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) { - return data; - } - - var arrowElement = options.element; - - // if arrowElement is a string, suppose it's a CSS selector - if (typeof arrowElement === 'string') { - arrowElement = data.instance.popper.querySelector(arrowElement); - - // if arrowElement is not found, don't run the modifier - if (!arrowElement) { - return data; - } - } else { - // if the arrowElement isn't a query selector we must check that the - // provided DOM node is child of its popper node - if (!data.instance.popper.contains(arrowElement)) { - console.warn('WARNING: `arrow.element` must be child of its popper element!'); - return data; - } - } - - var placement = data.placement.split('-')[0]; - var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; - - var isVertical = ['left', 'right'].indexOf(placement) !== -1; - - var len = isVertical ? 'height' : 'width'; - var sideCapitalized = isVertical ? 'Top' : 'Left'; - var side = sideCapitalized.toLowerCase(); - var altSide = isVertical ? 'left' : 'top'; - var opSide = isVertical ? 'bottom' : 'right'; - var arrowElementSize = getOuterSizes(arrowElement)[len]; - - // - // extends keepTogether behavior making sure the popper and its - // reference have enough pixels in conjuction - // - - // top/left side - if (reference[opSide] - arrowElementSize < popper[side]) { - data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize); - } - // bottom/right side - if (reference[side] + arrowElementSize > popper[opSide]) { - data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; - } - data.offsets.popper = getClientRect(data.offsets.popper); - - // compute center of the popper - var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; - - // Compute the sideValue using the updated popper offsets - // take popper margin in account because we don't have this info available - var css = getStyleComputedProperty(data.instance.popper); - var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10); - var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10); - var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; - - // prevent arrowElement from being placed not contiguously to its popper - sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); - - data.arrowElement = arrowElement; - data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty$2(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty$2(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); - - return data; -} - -/** - * Get the opposite placement variation of the given one - * @method - * @memberof Popper.Utils - * @argument {String} placement variation - * @returns {String} flipped placement variation - */ -function getOppositeVariation(variation) { - if (variation === 'end') { - return 'start'; - } else if (variation === 'start') { - return 'end'; - } - return variation; -} - -/** - * List of accepted placements to use as values of the `placement` option.
- * Valid placements are: - * - `auto` - * - `top` - * - `right` - * - `bottom` - * - `left` - * - * Each placement can have a variation from this list: - * - `-start` - * - `-end` - * - * Variations are interpreted easily if you think of them as the left to right - * written languages. Horizontally (`top` and `bottom`), `start` is left and `end` - * is right.
- * Vertically (`left` and `right`), `start` is top and `end` is bottom. - * - * Some valid examples are: - * - `top-end` (on top of reference, right aligned) - * - `right-start` (on right of reference, top aligned) - * - `bottom` (on bottom, centered) - * - `auto-right` (on the side with more space available, alignment depends by placement) - * - * @static - * @type {Array} - * @enum {String} - * @readonly - * @method placements - * @memberof Popper - */ -var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; - -// Get rid of `auto` `auto-start` and `auto-end` -var validPlacements = placements.slice(3); - -/** - * Given an initial placement, returns all the subsequent placements - * clockwise (or counter-clockwise). - * - * @method - * @memberof Popper.Utils - * @argument {String} placement - A valid placement (it accepts variations) - * @argument {Boolean} counter - Set to true to walk the placements counterclockwise - * @returns {Array} placements including their variations - */ -function clockwise(placement) { - var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var index = validPlacements.indexOf(placement); - var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index)); - return counter ? arr.reverse() : arr; -} - -var BEHAVIORS = { - FLIP: 'flip', - CLOCKWISE: 'clockwise', - COUNTERCLOCKWISE: 'counterclockwise' -}; - -/** - * @function - * @memberof Modifiers - * @argument {Object} data - The data object generated by update method - * @argument {Object} options - Modifiers configuration and options - * @returns {Object} The data object, properly modified - */ -function flip(data, options) { - // if `inner` modifier is enabled, we can't use the `flip` modifier - if (isModifierEnabled(data.instance.modifiers, 'inner')) { - return data; - } - - if (data.flipped && data.placement === data.originalPlacement) { - // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides - return data; - } - - var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); - - var placement = data.placement.split('-')[0]; - var placementOpposite = getOppositePlacement(placement); - var variation = data.placement.split('-')[1] || ''; - - var flipOrder = []; - - switch (options.behavior) { - case BEHAVIORS.FLIP: - flipOrder = [placement, placementOpposite]; - break; - case BEHAVIORS.CLOCKWISE: - flipOrder = clockwise(placement); - break; - case BEHAVIORS.COUNTERCLOCKWISE: - flipOrder = clockwise(placement, true); - break; - default: - flipOrder = options.behavior; - } - - flipOrder.forEach(function (step, index) { - if (placement !== step || flipOrder.length === index + 1) { - return data; - } - - placement = data.placement.split('-')[0]; - placementOpposite = getOppositePlacement(placement); - - var popperOffsets = data.offsets.popper; - var refOffsets = data.offsets.reference; - - // using floor because the reference offsets may contain decimals we are not going to consider here - var floor = Math.floor; - var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom); - - var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left); - var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right); - var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top); - var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom); - - var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; - - // flip the variation if required - var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; - var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); - - if (overlapsRef || overflowsBoundaries || flippedVariation) { - // this boolean to detect any flip loop - data.flipped = true; - - if (overlapsRef || overflowsBoundaries) { - placement = flipOrder[index + 1]; - } - - if (flippedVariation) { - variation = getOppositeVariation(variation); - } - - data.placement = placement + (variation ? '-' + variation : ''); - - // this object contains `position`, we want to preserve it along with - // any additional property we may add in the future - data.offsets.popper = _extends$3({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); - - data = runModifiers(data.instance.modifiers, data, 'flip'); - } - }); - return data; -} - -/** - * @function - * @memberof Modifiers - * @argument {Object} data - The data object generated by update method - * @argument {Object} options - Modifiers configuration and options - * @returns {Object} The data object, properly modified - */ -function keepTogether(data) { - var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; - - var placement = data.placement.split('-')[0]; - var floor = Math.floor; - var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; - var side = isVertical ? 'right' : 'bottom'; - var opSide = isVertical ? 'left' : 'top'; - var measurement = isVertical ? 'width' : 'height'; - - if (popper[side] < floor(reference[opSide])) { - data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement]; - } - if (popper[opSide] > floor(reference[side])) { - data.offsets.popper[opSide] = floor(reference[side]); - } - - return data; -} - -/** - * Converts a string containing value + unit into a px value number - * @function - * @memberof {modifiers~offset} - * @private - * @argument {String} str - Value + unit string - * @argument {String} measurement - `height` or `width` - * @argument {Object} popperOffsets - * @argument {Object} referenceOffsets - * @returns {Number|String} - * Value in pixels, or original string if no values were extracted - */ -function toValue(str, measurement, popperOffsets, referenceOffsets) { - // separate value from unit - var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/); - var value = +split[1]; - var unit = split[2]; - - // If it's not a number it's an operator, I guess - if (!value) { - return str; - } - - if (unit.indexOf('%') === 0) { - var element = void 0; - switch (unit) { - case '%p': - element = popperOffsets; - break; - case '%': - case '%r': - default: - element = referenceOffsets; - } - - var rect = getClientRect(element); - return rect[measurement] / 100 * value; - } else if (unit === 'vh' || unit === 'vw') { - // if is a vh or vw, we calculate the size based on the viewport - var size = void 0; - if (unit === 'vh') { - size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); - } else { - size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); - } - return size / 100 * value; - } else { - // if is an explicit pixel unit, we get rid of the unit and keep the value - // if is an implicit unit, it's px, and we return just the value - return value; - } -} - -/** - * Parse an `offset` string to extrapolate `x` and `y` numeric offsets. - * @function - * @memberof {modifiers~offset} - * @private - * @argument {String} offset - * @argument {Object} popperOffsets - * @argument {Object} referenceOffsets - * @argument {String} basePlacement - * @returns {Array} a two cells array with x and y offsets in numbers - */ -function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { - var offsets = [0, 0]; - - // Use height if placement is left or right and index is 0 otherwise use width - // in this way the first offset will use an axis and the second one - // will use the other one - var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; - - // Split the offset string to obtain a list of values and operands - // The regex addresses values with the plus or minus sign in front (+10, -20, etc) - var fragments = offset.split(/(\+|\-)/).map(function (frag) { - return frag.trim(); - }); - - // Detect if the offset string contains a pair of values or a single one - // they could be separated by comma or space - var divider = fragments.indexOf(find$1(fragments, function (frag) { - return frag.search(/,|\s/) !== -1; - })); - - if (fragments[divider] && fragments[divider].indexOf(',') === -1) { - console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); - } - - // If divider is found, we divide the list of values and operands to divide - // them by ofset X and Y. - var splitRegex = /\s*,\s*|\s+/; - var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; - - // Convert the values with units to absolute pixels to allow our computations - ops = ops.map(function (op, index) { - // Most of the units rely on the orientation of the popper - var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; - var mergeWithPrevious = false; - return op - // This aggregates any `+` or `-` sign that aren't considered operators - // e.g.: 10 + +5 => [10, +, +5] - .reduce(function (a, b) { - if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { - a[a.length - 1] = b; - mergeWithPrevious = true; - return a; - } else if (mergeWithPrevious) { - a[a.length - 1] += b; - mergeWithPrevious = false; - return a; - } else { - return a.concat(b); - } - }, []) - // Here we convert the string values into number values (in px) - .map(function (str) { - return toValue(str, measurement, popperOffsets, referenceOffsets); - }); - }); - - // Loop trough the offsets arrays and execute the operations - ops.forEach(function (op, index) { - op.forEach(function (frag, index2) { - if (isNumeric(frag)) { - offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1); - } - }); - }); - return offsets; -} - -/** - * @function - * @memberof Modifiers - * @argument {Object} data - The data object generated by update method - * @argument {Object} options - Modifiers configuration and options - * @argument {Number|String} options.offset=0 - * The offset value as described in the modifier description - * @returns {Object} The data object, properly modified - */ -function offset(data, _ref) { - var offset = _ref.offset; - var placement = data.placement, - _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; - - var basePlacement = placement.split('-')[0]; - - var offsets = void 0; - if (isNumeric(+offset)) { - offsets = [+offset, 0]; - } else { - offsets = parseOffset(offset, popper, reference, basePlacement); - } - - if (basePlacement === 'left') { - popper.top += offsets[0]; - popper.left -= offsets[1]; - } else if (basePlacement === 'right') { - popper.top += offsets[0]; - popper.left += offsets[1]; - } else if (basePlacement === 'top') { - popper.left += offsets[0]; - popper.top -= offsets[1]; - } else if (basePlacement === 'bottom') { - popper.left += offsets[0]; - popper.top += offsets[1]; - } - - data.popper = popper; - return data; -} - -/** - * @function - * @memberof Modifiers - * @argument {Object} data - The data object generated by `update` method - * @argument {Object} options - Modifiers configuration and options - * @returns {Object} The data object, properly modified - */ -function preventOverflow(data, options) { - var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); - - // If offsetParent is the reference element, we really want to - // go one step up and use the next offsetParent as reference to - // avoid to make this modifier completely useless and look like broken - if (data.instance.reference === boundariesElement) { - boundariesElement = getOffsetParent(boundariesElement); - } - - var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); - options.boundaries = boundaries; - - var order = options.priority; - var popper = data.offsets.popper; - - var check = { - primary: function primary(placement) { - var value = popper[placement]; - if (popper[placement] < boundaries[placement] && !options.escapeWithReference) { - value = Math.max(popper[placement], boundaries[placement]); - } - return defineProperty$2({}, placement, value); - }, - secondary: function secondary(placement) { - var mainSide = placement === 'right' ? 'left' : 'top'; - var value = popper[mainSide]; - if (popper[placement] > boundaries[placement] && !options.escapeWithReference) { - value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height)); - } - return defineProperty$2({}, mainSide, value); - } - }; - - order.forEach(function (placement) { - var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary'; - popper = _extends$3({}, popper, check[side](placement)); - }); - - data.offsets.popper = popper; - - return data; -} - -/** - * @function - * @memberof Modifiers - * @argument {Object} data - The data object generated by `update` method - * @argument {Object} options - Modifiers configuration and options - * @returns {Object} The data object, properly modified - */ -function shift(data) { - var placement = data.placement; - var basePlacement = placement.split('-')[0]; - var shiftvariation = placement.split('-')[1]; - - // if shift shiftvariation is specified, run the modifier - if (shiftvariation) { - var _data$offsets = data.offsets, - reference = _data$offsets.reference, - popper = _data$offsets.popper; - - var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1; - var side = isVertical ? 'left' : 'top'; - var measurement = isVertical ? 'width' : 'height'; - - var shiftOffsets = { - start: defineProperty$2({}, side, reference[side]), - end: defineProperty$2({}, side, reference[side] + reference[measurement] - popper[measurement]) - }; - - data.offsets.popper = _extends$3({}, popper, shiftOffsets[shiftvariation]); - } - - return data; -} - -/** - * @function - * @memberof Modifiers - * @argument {Object} data - The data object generated by update method - * @argument {Object} options - Modifiers configuration and options - * @returns {Object} The data object, properly modified - */ -function hide(data) { - if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) { - return data; - } - - var refRect = data.offsets.reference; - var bound = find$1(data.instance.modifiers, function (modifier) { - return modifier.name === 'preventOverflow'; - }).boundaries; - - if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) { - // Avoid unnecessary DOM access if visibility hasn't changed - if (data.hide === true) { - return data; - } - - data.hide = true; - data.attributes['x-out-of-boundaries'] = ''; - } else { - // Avoid unnecessary DOM access if visibility hasn't changed - if (data.hide === false) { - return data; - } - - data.hide = false; - data.attributes['x-out-of-boundaries'] = false; - } - - return data; -} - -/** - * @function - * @memberof Modifiers - * @argument {Object} data - The data object generated by `update` method - * @argument {Object} options - Modifiers configuration and options - * @returns {Object} The data object, properly modified - */ -function inner(data) { - var placement = data.placement; - var basePlacement = placement.split('-')[0]; - var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; - - var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1; - - var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1; - - popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); - - data.placement = getOppositePlacement(placement); - data.offsets.popper = getClientRect(popper); - - return data; -} - -/** - * Modifier function, each modifier can have a function of this type assigned - * to its `fn` property.
- * These functions will be called on each update, this means that you must - * make sure they are performant enough to avoid performance bottlenecks. - * - * @function ModifierFn - * @argument {dataObject} data - The data object generated by `update` method - * @argument {Object} options - Modifiers configuration and options - * @returns {dataObject} The data object, properly modified - */ - -/** - * Modifiers are plugins used to alter the behavior of your poppers.
- * Popper.js uses a set of 9 modifiers to provide all the basic functionalities - * needed by the library. - * - * Usually you don't want to override the `order`, `fn` and `onLoad` props. - * All the other properties are configurations that could be tweaked. - * @namespace modifiers - */ -var modifiers = { - /** - * Modifier used to shift the popper on the start or end of its reference - * element.
- * It will read the variation of the `placement` property.
- * It can be one either `-end` or `-start`. - * @memberof modifiers - * @inner - */ - shift: { - /** @prop {number} order=100 - Index used to define the order of execution */ - order: 100, - /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ - enabled: true, - /** @prop {ModifierFn} */ - fn: shift - }, - - /** - * The `offset` modifier can shift your popper on both its axis. - * - * It accepts the following units: - * - `px` or unitless, interpreted as pixels - * - `%` or `%r`, percentage relative to the length of the reference element - * - `%p`, percentage relative to the length of the popper element - * - `vw`, CSS viewport width unit - * - `vh`, CSS viewport height unit - * - * For length is intended the main axis relative to the placement of the popper.
- * This means that if the placement is `top` or `bottom`, the length will be the - * `width`. In case of `left` or `right`, it will be the height. - * - * You can provide a single value (as `Number` or `String`), or a pair of values - * as `String` divided by a comma or one (or more) white spaces.
- * The latter is a deprecated method because it leads to confusion and will be - * removed in v2.
- * Additionally, it accepts additions and subtractions between different units. - * Note that multiplications and divisions aren't supported. - * - * Valid examples are: - * ``` - * 10 - * '10%' - * '10, 10' - * '10%, 10' - * '10 + 10%' - * '10 - 5vh + 3%' - * '-10px + 5vh, 5px - 6%' - * ``` - * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap - * > with their reference element, unfortunately, you will have to disable the `flip` modifier. - * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373) - * - * @memberof modifiers - * @inner - */ - offset: { - /** @prop {number} order=200 - Index used to define the order of execution */ - order: 200, - /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ - enabled: true, - /** @prop {ModifierFn} */ - fn: offset, - /** @prop {Number|String} offset=0 - * The offset value as described in the modifier description - */ - offset: 0 - }, - - /** - * Modifier used to prevent the popper from being positioned outside the boundary. - * - * An scenario exists where the reference itself is not within the boundaries.
- * We can say it has "escaped the boundaries" — or just "escaped".
- * In this case we need to decide whether the popper should either: - * - * - detach from the reference and remain "trapped" in the boundaries, or - * - if it should ignore the boundary and "escape with its reference" - * - * When `escapeWithReference` is set to`true` and reference is completely - * outside its boundaries, the popper will overflow (or completely leave) - * the boundaries in order to remain attached to the edge of the reference. - * - * @memberof modifiers - * @inner - */ - preventOverflow: { - /** @prop {number} order=300 - Index used to define the order of execution */ - order: 300, - /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ - enabled: true, - /** @prop {ModifierFn} */ - fn: preventOverflow, - /** - * @prop {Array} [priority=['left','right','top','bottom']] - * Popper will try to prevent overflow following these priorities by default, - * then, it could overflow on the left and on top of the `boundariesElement` - */ - priority: ['left', 'right', 'top', 'bottom'], - /** - * @prop {number} padding=5 - * Amount of pixel used to define a minimum distance between the boundaries - * and the popper this makes sure the popper has always a little padding - * between the edges of its container - */ - padding: 5, - /** - * @prop {String|HTMLElement} boundariesElement='scrollParent' - * Boundaries used by the modifier, can be `scrollParent`, `window`, - * `viewport` or any DOM element. - */ - boundariesElement: 'scrollParent' - }, - - /** - * Modifier used to make sure the reference and its popper stay near eachothers - * without leaving any gap between the two. Expecially useful when the arrow is - * enabled and you want to assure it to point to its reference element. - * It cares only about the first axis, you can still have poppers with margin - * between the popper and its reference element. - * @memberof modifiers - * @inner - */ - keepTogether: { - /** @prop {number} order=400 - Index used to define the order of execution */ - order: 400, - /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ - enabled: true, - /** @prop {ModifierFn} */ - fn: keepTogether - }, - - /** - * This modifier is used to move the `arrowElement` of the popper to make - * sure it is positioned between the reference element and its popper element. - * It will read the outer size of the `arrowElement` node to detect how many - * pixels of conjuction are needed. - * - * It has no effect if no `arrowElement` is provided. - * @memberof modifiers - * @inner - */ - arrow: { - /** @prop {number} order=500 - Index used to define the order of execution */ - order: 500, - /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ - enabled: true, - /** @prop {ModifierFn} */ - fn: arrow, - /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ - element: '[x-arrow]' - }, - - /** - * Modifier used to flip the popper's placement when it starts to overlap its - * reference element. - * - * Requires the `preventOverflow` modifier before it in order to work. - * - * **NOTE:** this modifier will interrupt the current update cycle and will - * restart it if it detects the need to flip the placement. - * @memberof modifiers - * @inner - */ - flip: { - /** @prop {number} order=600 - Index used to define the order of execution */ - order: 600, - /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ - enabled: true, - /** @prop {ModifierFn} */ - fn: flip, - /** - * @prop {String|Array} behavior='flip' - * The behavior used to change the popper's placement. It can be one of - * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid - * placements (with optional variations). - */ - behavior: 'flip', - /** - * @prop {number} padding=5 - * The popper will flip if it hits the edges of the `boundariesElement` - */ - padding: 5, - /** - * @prop {String|HTMLElement} boundariesElement='viewport' - * The element which will define the boundaries of the popper position, - * the popper will never be placed outside of the defined boundaries - * (except if keepTogether is enabled) - */ - boundariesElement: 'viewport' - }, - - /** - * Modifier used to make the popper flow toward the inner of the reference element. - * By default, when this modifier is disabled, the popper will be placed outside - * the reference element. - * @memberof modifiers - * @inner - */ - inner: { - /** @prop {number} order=700 - Index used to define the order of execution */ - order: 700, - /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ - enabled: false, - /** @prop {ModifierFn} */ - fn: inner - }, - - /** - * Modifier used to hide the popper when its reference element is outside of the - * popper boundaries. It will set a `x-out-of-boundaries` attribute which can - * be used to hide with a CSS selector the popper when its reference is - * out of boundaries. - * - * Requires the `preventOverflow` modifier before it in order to work. - * @memberof modifiers - * @inner - */ - hide: { - /** @prop {number} order=800 - Index used to define the order of execution */ - order: 800, - /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ - enabled: true, - /** @prop {ModifierFn} */ - fn: hide - }, - - /** - * Computes the style that will be applied to the popper element to gets - * properly positioned. - * - * Note that this modifier will not touch the DOM, it just prepares the styles - * so that `applyStyle` modifier can apply it. This separation is useful - * in case you need to replace `applyStyle` with a custom implementation. - * - * This modifier has `850` as `order` value to maintain backward compatibility - * with previous versions of Popper.js. Expect the modifiers ordering method - * to change in future major versions of the library. - * - * @memberof modifiers - * @inner - */ - computeStyle: { - /** @prop {number} order=850 - Index used to define the order of execution */ - order: 850, - /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ - enabled: true, - /** @prop {ModifierFn} */ - fn: computeStyle, - /** - * @prop {Boolean} gpuAcceleration=true - * If true, it uses the CSS 3d transformation to position the popper. - * Otherwise, it will use the `top` and `left` properties. - */ - gpuAcceleration: true, - /** - * @prop {string} [x='bottom'] - * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin. - * Change this if your popper should grow in a direction different from `bottom` - */ - x: 'bottom', - /** - * @prop {string} [x='left'] - * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. - * Change this if your popper should grow in a direction different from `right` - */ - y: 'right' - }, - - /** - * Applies the computed styles to the popper element. - * - * All the DOM manipulations are limited to this modifier. This is useful in case - * you want to integrate Popper.js inside a framework or view library and you - * want to delegate all the DOM manipulations to it. - * - * Note that if you disable this modifier, you must make sure the popper element - * has its position set to `absolute` before Popper.js can do its work! - * - * Just disable this modifier and define you own to achieve the desired effect. - * - * @memberof modifiers - * @inner - */ - applyStyle: { - /** @prop {number} order=900 - Index used to define the order of execution */ - order: 900, - /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ - enabled: true, - /** @prop {ModifierFn} */ - fn: applyStyle, - /** @prop {Function} */ - onLoad: applyStyleOnLoad, - /** - * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier - * @prop {Boolean} gpuAcceleration=true - * If true, it uses the CSS 3d transformation to position the popper. - * Otherwise, it will use the `top` and `left` properties. - */ - gpuAcceleration: undefined - } -}; - -/** - * The `dataObject` is an object containing all the informations used by Popper.js - * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks. - * @name dataObject - * @property {Object} data.instance The Popper.js instance - * @property {String} data.placement Placement applied to popper - * @property {String} data.originalPlacement Placement originally defined on init - * @property {Boolean} data.flipped True if popper has been flipped by flip modifier - * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper. - * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier - * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`) - * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`) - * @property {Object} data.boundaries Offsets of the popper boundaries - * @property {Object} data.offsets The measurements of popper, reference and arrow elements. - * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values - * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values - * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0 - */ - -/** - * Default options provided to Popper.js constructor.
- * These can be overriden using the `options` argument of Popper.js.
- * To override an option, simply pass as 3rd argument an object with the same - * structure of this object, example: - * ``` - * new Popper(ref, pop, { - * modifiers: { - * preventOverflow: { enabled: false } - * } - * }) - * ``` - * @type {Object} - * @static - * @memberof Popper - */ -var Defaults = { - /** - * Popper's placement - * @prop {Popper.placements} placement='bottom' - */ - placement: 'bottom', - - /** - * Set this to true if you want popper to position it self in 'fixed' mode - * @prop {Boolean} positionFixed=false - */ - positionFixed: false, - - /** - * Whether events (resize, scroll) are initially enabled - * @prop {Boolean} eventsEnabled=true - */ - eventsEnabled: true, - - /** - * Set to true if you want to automatically remove the popper when - * you call the `destroy` method. - * @prop {Boolean} removeOnDestroy=false - */ - removeOnDestroy: false, - - /** - * Callback called when the popper is created.
- * By default, is set to no-op.
- * Access Popper.js instance with `data.instance`. - * @prop {onCreate} - */ - onCreate: function onCreate() {}, - - /** - * Callback called when the popper is updated, this callback is not called - * on the initialization/creation of the popper, but only on subsequent - * updates.
- * By default, is set to no-op.
- * Access Popper.js instance with `data.instance`. - * @prop {onUpdate} - */ - onUpdate: function onUpdate() {}, - - /** - * List of modifiers used to modify the offsets before they are applied to the popper. - * They provide most of the functionalities of Popper.js - * @prop {modifiers} - */ - modifiers: modifiers -}; - -/** - * @callback onCreate - * @param {dataObject} data - */ - -/** - * @callback onUpdate - * @param {dataObject} data - */ - -// Utils -// Methods -var Popper = function () { - /** - * Create a new Popper.js instance - * @class Popper - * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper - * @param {HTMLElement} popper - The HTML element used as popper. - * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) - * @return {Object} instance - The generated Popper.js instance - */ - function Popper(reference, popper) { - var _this = this; - - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - classCallCheck$2(this, Popper); - - this.scheduleUpdate = function () { - return requestAnimationFrame(_this.update); - }; - - // make update() debounced, so that it only runs at most once-per-tick - this.update = debounce(this.update.bind(this)); - - // with {} we create a new object with the options inside it - this.options = _extends$3({}, Popper.Defaults, options); - - // init state - this.state = { - isDestroyed: false, - isCreated: false, - scrollParents: [] - }; - - // get reference and popper elements (allow jQuery wrappers) - this.reference = reference && reference.jquery ? reference[0] : reference; - this.popper = popper && popper.jquery ? popper[0] : popper; - - // Deep merge modifiers options - this.options.modifiers = {}; - Object.keys(_extends$3({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { - _this.options.modifiers[name] = _extends$3({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); - }); - - // Refactoring modifiers' list (Object => Array) - this.modifiers = Object.keys(this.options.modifiers).map(function (name) { - return _extends$3({ - name: name - }, _this.options.modifiers[name]); - }) - // sort the modifiers by order - .sort(function (a, b) { - return a.order - b.order; - }); - - // modifiers have the ability to execute arbitrary code when Popper.js get inited - // such code is executed in the same order of its modifier - // they could add new properties to their options configuration - // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! - this.modifiers.forEach(function (modifierOptions) { - if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { - modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); - } - }); - - // fire the first update to position the popper in the right place - this.update(); - - var eventsEnabled = this.options.eventsEnabled; - if (eventsEnabled) { - // setup event listeners, they will take care of update the position in specific situations - this.enableEventListeners(); - } - - this.state.eventsEnabled = eventsEnabled; - } - - // We can't use class properties because they don't get listed in the - // class prototype and break stuff like Sinon stubs - - - createClass$1(Popper, [{ - key: 'update', - value: function update$$1() { - return update.call(this); - } - }, { - key: 'destroy', - value: function destroy$$1() { - return destroy.call(this); - } - }, { - key: 'enableEventListeners', - value: function enableEventListeners$$1() { - return enableEventListeners.call(this); - } - }, { - key: 'disableEventListeners', - value: function disableEventListeners$$1() { - return disableEventListeners.call(this); - } - - /** - * Schedule an update, it will run on the next UI update available - * @method scheduleUpdate - * @memberof Popper - */ - - - /** - * Collection of utilities useful when writing custom modifiers. - * Starting from version 1.7, this method is available only if you - * include `popper-utils.js` before `popper.js`. - * - * **DEPRECATION**: This way to access PopperUtils is deprecated - * and will be removed in v2! Use the PopperUtils module directly instead. - * Due to the high instability of the methods contained in Utils, we can't - * guarantee them to follow semver. Use them at your own risk! - * @static - * @private - * @type {Object} - * @deprecated since version 1.8 - * @member Utils - * @memberof Popper - */ - - }]); - return Popper; -}(); - -/** - * The `referenceObject` is an object that provides an interface compatible with Popper.js - * and lets you use it as replacement of a real DOM node.
- * You can use this method to position a popper relatively to a set of coordinates - * in case you don't have a DOM node to use as reference. - * - * ``` - * new Popper(referenceObject, popperNode); - * ``` - * - * NB: This feature isn't supported in Internet Explorer 10 - * @name referenceObject - * @property {Function} data.getBoundingClientRect - * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method. - * @property {number} data.clientWidth - * An ES6 getter that will return the width of the virtual reference element. - * @property {number} data.clientHeight - * An ES6 getter that will return the height of the virtual reference element. - */ - - -Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; -Popper.placements = placements; -Popper.Defaults = Defaults; - -var key = '__global_unique_id__'; - -var gud = function() { - return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1; -}; - -/** - * 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 makeEmptyFunction(arg) { - return function () { - return arg; - }; -} - -/** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. - */ -var emptyFunction = function emptyFunction() {}; - -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function () { - return this; -}; -emptyFunction.thatReturnsArgument = function (arg) { - return arg; -}; - -var emptyFunction_1 = emptyFunction; - -/** - * 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 warning = emptyFunction_1; - -if (process.env.NODE_ENV !== 'production') { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _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 warning(condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } - - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } - - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } - - printWarning.apply(undefined, [format].concat(args)); - } - }; -} - -var warning_1 = warning; - -var implementation = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; - - - -var _react2 = _interopRequireDefault(React__default); - - - -var _propTypes2 = _interopRequireDefault(PropTypes); - - - -var _gud2 = _interopRequireDefault(gud); - - - -var _warning2 = _interopRequireDefault(warning_1); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var MAX_SIGNED_31_BIT_INT = 1073741823; - -// Inlined Object.is polyfill. -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is -function objectIs(x, y) { - if (x === y) { - return x !== 0 || 1 / x === 1 / y; - } else { - return x !== x && y !== y; - } -} - -function createEventEmitter(value) { - var handlers = []; - return { - on: function on(handler) { - handlers.push(handler); - }, - off: function off(handler) { - handlers = handlers.filter(function (h) { - return h !== handler; - }); - }, - get: function get() { - return value; - }, - set: function set(newValue, changedBits) { - value = newValue; - handlers.forEach(function (handler) { - return handler(value, changedBits); - }); - } - }; -} - -function onlyChild(children) { - return Array.isArray(children) ? children[0] : children; -} - -function createReactContext(defaultValue, calculateChangedBits) { - var _Provider$childContex, _Consumer$contextType; - - var contextProp = '__create-react-context-' + (0, _gud2.default)() + '__'; - - var Provider = function (_Component) { - _inherits(Provider, _Component); - - function Provider() { - var _temp, _this, _ret; - - _classCallCheck(this, Provider); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.emitter = createEventEmitter(_this.props.value), _temp), _possibleConstructorReturn(_this, _ret); - } - - Provider.prototype.getChildContext = function getChildContext() { - var _ref; - - return _ref = {}, _ref[contextProp] = this.emitter, _ref; - }; - - Provider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { - if (this.props.value !== nextProps.value) { - var oldValue = this.props.value; - var newValue = nextProps.value; - var changedBits = void 0; - - if (objectIs(oldValue, newValue)) { - changedBits = 0; // No change - } else { - changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT; - if (process.env.NODE_ENV !== 'production') { - (0, _warning2.default)((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits); - } - - changedBits |= 0; - - if (changedBits !== 0) { - this.emitter.set(nextProps.value, changedBits); - } - } - } - }; - - Provider.prototype.render = function render() { - return this.props.children; - }; - - return Provider; - }(React__default.Component); - - Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = _propTypes2.default.object.isRequired, _Provider$childContex); - - var Consumer = function (_Component2) { - _inherits(Consumer, _Component2); - - function Consumer() { - var _temp2, _this2, _ret2; - - _classCallCheck(this, Consumer); - - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - return _ret2 = (_temp2 = (_this2 = _possibleConstructorReturn(this, _Component2.call.apply(_Component2, [this].concat(args))), _this2), _this2.state = { - value: _this2.getValue() - }, _this2.onUpdate = function (newValue, changedBits) { - var observedBits = _this2.observedBits | 0; - if ((observedBits & changedBits) !== 0) { - _this2.setState({ value: _this2.getValue() }); - } - }, _temp2), _possibleConstructorReturn(_this2, _ret2); - } - - Consumer.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { - var observedBits = nextProps.observedBits; - - this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default - : observedBits; - }; - - Consumer.prototype.componentDidMount = function componentDidMount() { - if (this.context[contextProp]) { - this.context[contextProp].on(this.onUpdate); - } - var observedBits = this.props.observedBits; - - this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default - : observedBits; - }; - - Consumer.prototype.componentWillUnmount = function componentWillUnmount() { - if (this.context[contextProp]) { - this.context[contextProp].off(this.onUpdate); - } - }; - - Consumer.prototype.getValue = function getValue() { - if (this.context[contextProp]) { - return this.context[contextProp].get(); - } else { - return defaultValue; - } - }; - - Consumer.prototype.render = function render() { - return onlyChild(this.props.children)(this.state.value); - }; - - return Consumer; - }(React__default.Component); - - Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = _propTypes2.default.object, _Consumer$contextType); - - - return { - Provider: Provider, - Consumer: Consumer - }; -} - -exports.default = createReactContext; -module.exports = exports['default']; -}); - -unwrapExports(implementation); - -var lib = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; - - - -var _react2 = _interopRequireDefault(React__default); - - - -var _implementation2 = _interopRequireDefault(implementation); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _react2.default.createContext || _implementation2.default; -module.exports = exports['default']; -}); - -var createContext = unwrapExports(lib); - -var ManagerContext = createContext({ getReferenceRef: undefined, referenceNode: undefined }); - -var Manager = function (_React$Component) { - _inherits$1(Manager, _React$Component); - - function Manager() { - _classCallCheck$1(this, Manager); - - var _this = _possibleConstructorReturn$1(this, _React$Component.call(this)); - - _this.getReferenceRef = function (referenceNode) { - return _this.setState(function (_ref) { - var context = _ref.context; - return { - context: _extends$2({}, context, { referenceNode: referenceNode }) - }; - }); - }; - - _this.state = { - context: { - getReferenceRef: _this.getReferenceRef, - referenceNode: undefined - } - }; - return _this; - } - - Manager.prototype.render = function render() { - return React.createElement( - ManagerContext.Provider, - { value: this.state.context }, - this.props.children - ); - }; - - return Manager; -}(React.Component); - -/** - * Takes an argument and if it's an array, returns the first item in the array, - * otherwise returns the argument. Used for Preact compatibility. - */ -var unwrapArray = function unwrapArray(arg) { - return Array.isArray(arg) ? arg[0] : arg; -}; - -/** - * Takes a maybe-undefined function and arbitrary args and invokes the function - * only if it is defined. - */ -var safeInvoke = function safeInvoke(fn) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - if (typeof fn === "function") { - return fn.apply(undefined, args); - } -}; - -var initialStyle = { - position: 'absolute', - top: 0, - left: 0, - opacity: 0, - pointerEvents: 'none' -}; - -var initialArrowStyle = {}; - -var InnerPopper = function (_React$Component) { - _inherits$1(InnerPopper, _React$Component); - - function InnerPopper() { - var _temp, _this, _ret; - - _classCallCheck$1(this, InnerPopper); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = _possibleConstructorReturn$1(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { - data: undefined, - placement: undefined - }, _this.popperNode = null, _this.arrowNode = null, _this.setPopperNode = function (popperNode) { - if (_this.popperNode === popperNode) return; - - safeInvoke(_this.props.innerRef, popperNode); - _this.popperNode = popperNode; - - if (!_this.popperInstance) _this.updatePopperInstance(); - }, _this.setArrowNode = function (arrowNode) { - if (_this.arrowNode === arrowNode) return; - _this.arrowNode = arrowNode; - - if (!_this.popperInstance) _this.updatePopperInstance(); - }, _this.updateStateModifier = { - enabled: true, - order: 900, - fn: function fn(data) { - var placement = data.placement; - - _this.setState({ data: data, placement: placement }, placement !== _this.state.placement ? _this.scheduleUpdate : undefined); - return data; - } - }, _this.getOptions = function () { - return { - placement: _this.props.placement, - eventsEnabled: _this.props.eventsEnabled, - positionFixed: _this.props.positionFixed, - modifiers: _extends$2({}, _this.props.modifiers, { - arrow: { - enabled: !!_this.arrowNode, - element: _this.arrowNode - }, - applyStyle: { enabled: false }, - updateStateModifier: _this.updateStateModifier - }) - }; - }, _this.getPopperStyle = function () { - return !_this.popperNode || !_this.state.data ? initialStyle : _extends$2({ - position: _this.state.data.offsets.popper.position - }, _this.state.data.styles); - }, _this.getPopperPlacement = function () { - return !_this.state.data ? undefined : _this.state.placement; - }, _this.getArrowStyle = function () { - return !_this.arrowNode || !_this.state.data ? initialArrowStyle : _this.state.data.arrowStyles; - }, _this.getOutOfBoundariesState = function () { - return _this.state.data ? _this.state.data.hide : undefined; - }, _this.destroyPopperInstance = function () { - if (!_this.popperInstance) return; - - _this.popperInstance.destroy(); - _this.popperInstance = null; - }, _this.updatePopperInstance = function () { - _this.destroyPopperInstance(); - - var _this2 = _this, - popperNode = _this2.popperNode; - var referenceElement = _this.props.referenceElement; - - - if (!referenceElement || !popperNode) return; - - _this.popperInstance = new Popper(referenceElement, popperNode, _this.getOptions()); - }, _this.scheduleUpdate = function () { - if (_this.popperInstance) { - _this.popperInstance.scheduleUpdate(); - } - }, _temp), _possibleConstructorReturn$1(_this, _ret); - } - - InnerPopper.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { - // If the Popper.js options have changed, update the instance (destroy + create) - if (this.props.placement !== prevProps.placement || this.props.eventsEnabled !== prevProps.eventsEnabled || this.props.referenceElement !== prevProps.referenceElement || this.props.positionFixed !== prevProps.positionFixed) { - this.updatePopperInstance(); - return; - } - - // A placement difference in state means popper determined a new placement - // apart from the props value. By the time the popper element is rendered with - // the new position Popper has already measured it, if the place change triggers - // a size change it will result in a misaligned popper. So we schedule an update to be sure. - if (prevState.placement !== this.state.placement) { - this.scheduleUpdate(); - } - }; - - InnerPopper.prototype.componentWillUnmount = function componentWillUnmount() { - this.destroyPopperInstance(); - }; - - InnerPopper.prototype.render = function render() { - return unwrapArray(this.props.children)({ - ref: this.setPopperNode, - style: this.getPopperStyle(), - placement: this.getPopperPlacement(), - outOfBoundaries: this.getOutOfBoundariesState(), - scheduleUpdate: this.scheduleUpdate, - arrowProps: { - ref: this.setArrowNode, - style: this.getArrowStyle() - } - }); - }; - - return InnerPopper; -}(React.Component); - -InnerPopper.defaultProps = { - placement: 'bottom', - eventsEnabled: true, - referenceElement: undefined, - positionFixed: false -}; - -function Popper$1(props) { - return React.createElement( - ManagerContext.Consumer, - null, - function (_ref) { - var referenceNode = _ref.referenceNode; - return React.createElement(InnerPopper, _extends$2({ referenceElement: referenceNode }, props)); - } - ); -} - -/** - * Copyright 2014-2015, 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. - */ - -/** - * 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__ = process.env.NODE_ENV !== 'production'; - -var warning$1 = function() {}; - -if (__DEV__) { - warning$1 = 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 (format.length < 10 || (/^[s\W]*$/).test(format)) { - throw new Error( - 'The warning format should be able to uniquely identify this ' + - 'warning. Please, use a more descriptive format than: ' + format - ); - } - - if (!condition) { - var argIndex = 0; - var message = 'Warning: ' + - format.replace(/%s/g, function() { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // 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) {} - } - }; -} - -var warning_1$1 = warning$1; - -var InnerReference = function (_React$Component) { - _inherits$1(InnerReference, _React$Component); - - function InnerReference() { - var _temp, _this, _ret; - - _classCallCheck$1(this, InnerReference); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = _possibleConstructorReturn$1(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.refHandler = function (node) { - safeInvoke(_this.props.innerRef, node); - safeInvoke(_this.props.getReferenceRef, node); - }, _temp), _possibleConstructorReturn$1(_this, _ret); - } - - InnerReference.prototype.render = function render() { - warning_1$1(this.props.getReferenceRef, '`Reference` should not be used outside of a `Manager` component.'); - return unwrapArray(this.props.children)({ ref: this.refHandler }); - }; - - return InnerReference; -}(React.Component); - -function Reference(props) { - return React.createElement( - ManagerContext.Consumer, - null, - function (_ref) { - var getReferenceRef = _ref.getReferenceRef; - return React.createElement(InnerReference, _extends$2({ getReferenceRef: getReferenceRef }, props)); - } - ); -} - -// Public types - -var popperPlacementPositions = ["bottom", "bottom-end", "bottom-start", "left", "left-end", "left-start", "right", "right-end", "right-start", "top", "top-end", "top-start"]; - -var PopperComponent = function (_React$Component) { - inherits(PopperComponent, _React$Component); - - function PopperComponent() { - classCallCheck(this, PopperComponent); - return possibleConstructorReturn(this, _React$Component.apply(this, arguments)); - } - - PopperComponent.prototype.render = function render() { - var _props = this.props, - className = _props.className, - hidePopper = _props.hidePopper, - popperComponent = _props.popperComponent, - popperModifiers = _props.popperModifiers, - popperPlacement = _props.popperPlacement, - popperProps = _props.popperProps, - targetComponent = _props.targetComponent; - - - var popper = void 0; - - if (!hidePopper) { - var classes = classnames("react-datepicker-popper", className); - popper = React__default.createElement( - Popper$1, - _extends({ - modifiers: popperModifiers, - placement: popperPlacement - }, popperProps), - function (_ref) { - var ref = _ref.ref, - style = _ref.style, - placement = _ref.placement, - arrowProps = _ref.arrowProps; - return React__default.createElement( - "div", - _extends({ ref: ref, style: style }, { - className: classes, - "data-placement": placement - }), - React__default.cloneElement(popperComponent, { arrowProps: arrowProps }) - ); - } - ); - } - - if (this.props.popperContainer) { - popper = React__default.createElement(this.props.popperContainer, {}, popper); - } - - return React__default.createElement( - Manager, - null, - React__default.createElement( - Reference, - null, - function (_ref2) { - var ref = _ref2.ref; - return React__default.createElement( - "div", - { ref: ref, className: "react-datepicker-wrapper" }, - targetComponent - ); - } - ), - popper - ); - }; - - createClass(PopperComponent, null, [{ - key: "defaultProps", - get: function get$$1() { - return { - hidePopper: true, - popperModifiers: { - preventOverflow: { - enabled: true, - escapeWithReference: true, - boundariesElement: "viewport" - } - }, - popperProps: {}, - popperPlacement: "bottom-start" - }; - } - }]); - return PopperComponent; -}(React__default.Component); - -PopperComponent.propTypes = { - className: PropTypes.string, - hidePopper: PropTypes.bool, - popperComponent: PropTypes.element, - popperModifiers: PropTypes.object, // props - popperPlacement: PropTypes.oneOf(popperPlacementPositions), // props - popperContainer: PropTypes.func, - popperProps: PropTypes.object, - targetComponent: PropTypes.element -}; - -var outsideClickIgnoreClass = "react-datepicker-ignore-onclickoutside"; -var WrappedCalendar = onClickOutsideHOC(Calendar); - -// Compares dates year+month combinations -function hasPreSelectionChanged(date1, date2) { - if (date1 && date2) { - return getMonth(date1) !== getMonth(date2) || getYear(date1) !== getYear(date2); - } - - return date1 !== date2; -} - -function hasSelectionChanged(date1, date2) { - if (date1 && date2) { - return !equals(date1, date2); - } - - return false; -} - -/** - * General datepicker component. - */ -var INPUT_ERR_1 = "Date input not valid."; - -var DatePicker = function (_React$Component) { - inherits(DatePicker, _React$Component); - createClass(DatePicker, null, [{ - key: "defaultProps", - get: function get$$1() { - return { - allowSameDay: false, - dateFormat: "L", - dateFormatCalendar: "MMMM YYYY", - onChange: function onChange() {}, - - disabled: false, - disabledKeyboardNavigation: false, - dropdownMode: "scroll", - onFocus: function onFocus() {}, - onBlur: function onBlur() {}, - onKeyDown: function onKeyDown() {}, - onInputClick: function onInputClick() {}, - onSelect: function onSelect() {}, - onClickOutside: function onClickOutside() {}, - onMonthChange: function onMonthChange() {}, - - preventOpenOnFocus: false, - onYearChange: function onYearChange() {}, - onInputError: function onInputError() {}, - - monthsShown: 1, - readOnly: false, - withPortal: false, - shouldCloseOnSelect: true, - showTimeSelect: false, - timeIntervals: 30, - timeCaption: "Time", - previousMonthButtonLabel: "Previous Month", - nextMonthButtonLabel: "Next month", - renderDayContents: function renderDayContents(date) { - return date; - } - }; - } - }]); - - function DatePicker(props) { - classCallCheck(this, DatePicker); - - var _this = possibleConstructorReturn(this, _React$Component.call(this, props)); - - _this.getPreSelection = function () { - return _this.props.openToDate ? newDate(_this.props.openToDate) : _this.props.selectsEnd && _this.props.startDate ? newDate(_this.props.startDate) : _this.props.selectsStart && _this.props.endDate ? newDate(_this.props.endDate) : now(_this.props.utcOffset); - }; - - _this.calcInitialState = function () { - var defaultPreSelection = _this.getPreSelection(); - var minDate = getEffectiveMinDate(_this.props); - var maxDate = getEffectiveMaxDate(_this.props); - var boundedPreSelection = minDate && isBefore(defaultPreSelection, minDate) ? minDate : maxDate && isAfter(defaultPreSelection, maxDate) ? maxDate : defaultPreSelection; - return { - open: _this.props.startOpen || false, - preventFocus: false, - preSelection: _this.props.selected ? newDate(_this.props.selected) : boundedPreSelection, - // transforming highlighted days (perhaps nested array) - // to flat Map for faster access in day.jsx - highlightDates: getHightLightDaysMap(_this.props.highlightDates), - focused: false - }; - }; - - _this.clearPreventFocusTimeout = function () { - if (_this.preventFocusTimeout) { - clearTimeout(_this.preventFocusTimeout); - } - }; - - _this.setFocus = function () { - if (_this.input && _this.input.focus) { - _this.input.focus(); - } - }; - - _this.setBlur = function () { - if (_this.input && _this.input.blur) { - _this.input.blur(); - } - - if (_this.props.onBlur) { - _this.props.onBlur(); - } - - _this.cancelFocusInput(); - }; - - _this.setOpen = function (open) { - var skipSetBlur = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - _this.setState({ - open: open, - preSelection: open && _this.state.open ? _this.state.preSelection : _this.calcInitialState().preSelection, - lastPreSelectChange: PRESELECT_CHANGE_VIA_NAVIGATE - }, function () { - if (!open) { - _this.setState(function (prev) { - return { - focused: skipSetBlur ? prev.focused : false - }; - }, function () { - !skipSetBlur && _this.setBlur(); - - _this.setState({ inputValue: null }); - }); - } - }); - }; - - _this.inputOk = function () { - return isMoment(_this.state.preSelection) || isDate(_this.state.preSelection); - }; - - _this.isCalendarOpen = function () { - return _this.props.open === undefined ? _this.state.open && !_this.props.disabled && !_this.props.readOnly : _this.props.open; - }; - - _this.handleFocus = function (event) { - if (!_this.state.preventFocus) { - _this.props.onFocus(event); - if (!_this.props.preventOpenOnFocus && !_this.props.readOnly && !_this.props.accessibleMode) { - _this.setOpen(true); - } - } - _this.setState({ focused: true }); - }; - - _this.cancelFocusInput = function () { - clearTimeout(_this.inputFocusTimeout); - _this.inputFocusTimeout = null; - }; - - _this.deferFocusInput = function () { - _this.cancelFocusInput(); - _this.inputFocusTimeout = setTimeout(function () { - return _this.setFocus(); - }, 1); - }; - - _this.handleDropdownFocus = function () { - _this.cancelFocusInput(); - }; - - _this.handleBlur = function (event) { - if (_this.props.accessibleMode === true) { - // allow normal de-focusing in a11y mode - return; - } - - if (_this.state.open && !_this.props.withPortal) { - _this.deferFocusInput(); - } else { - _this.props.onBlur(event); - } - _this.setState({ focused: false }); - }; - - _this.handleCalendarClickOutside = function (event) { - if (!_this.props.inline) { - _this.setOpen(false); - } - _this.props.onClickOutside(event); - if (_this.props.withPortal) { - event.preventDefault(); - } - }; - - _this.handleChange = function () { - for (var _len = arguments.length, allArgs = Array(_len), _key = 0; _key < _len; _key++) { - allArgs[_key] = arguments[_key]; - } - - var event = allArgs[0]; - if (_this.props.onChangeRaw) { - _this.props.onChangeRaw.apply(_this, allArgs); - if (typeof event.isDefaultPrevented !== "function" || event.isDefaultPrevented()) { - return; - } - } - _this.setState({ - inputValue: event.target.value, - lastPreSelectChange: PRESELECT_CHANGE_VIA_INPUT - }); - var date = parseDate(event.target.value, _this.props); - if (date || !event.target.value) { - _this.setSelected(date, event, true); - } - }; - - _this.handleSelect = function (date, event) { - // Preventing onFocus event to fix issue - // https://github.com/Hacker0x01/react-datepicker/issues/628 - _this.setState({ preventFocus: true }, function () { - _this.preventFocusTimeout = setTimeout(function () { - return _this.setState({ preventFocus: false }); - }, 50); - return _this.preventFocusTimeout; - }); - _this.setSelected(date, event); - if (!_this.props.shouldCloseOnSelect || _this.props.showTimeSelect) { - _this.setPreSelection(date); - } else if (!_this.props.inline) { - _this.setOpen(false); - } - }; - - _this.updateSelection = function (newSelection) { - if (_this.props.adjustDateOnChange) { - _this.setSelected(newSelection); - } - _this.setPreSelection(newSelection); - }; - - _this.setSelected = function (date, event, keepInput) { - var changedDate = date; - - if (changedDate !== null && isDayDisabled(changedDate, _this.props)) { - if (isOutOfBounds(changedDate, _this.props)) { - _this.props.onChange(date, event); - _this.props.onSelect(changedDate, event); - } - - return; - } - - if (!isSameDay(_this.props.selected, changedDate) || _this.props.allowSameDay) { - if (changedDate !== null) { - if (_this.props.selected) { - var selected = _this.props.selected; - if (keepInput) selected = newDate(changedDate); - changedDate = setTime(newDate(changedDate), { - hour: getHour(selected), - minute: getMinute(selected), - second: getSecond(selected), - millisecond: getMillisecond(selected) - }); - } - if (!_this.props.inline) { - _this.setState({ - preSelection: changedDate - }); - } - } - _this.props.onChange(changedDate, event); - } - - _this.props.onSelect(changedDate, event); - - if (!keepInput) { - _this.setState({ inputValue: null }); - } - }; - - _this.setPreSelection = function (date) { - var isDateRangePresent = typeof _this.props.minDate !== "undefined" && typeof _this.props.maxDate !== "undefined"; - var isValidDateSelection = isDateRangePresent && date ? isDayInRange(date, _this.props.minDate, _this.props.maxDate) : true; - if (isValidDateSelection) { - _this.setState({ - preSelection: date - }); - } - }; - - _this.handleTimeChange = function (time) { - var selected = _this.props.selected ? _this.props.selected : _this.getPreSelection(); - var changedDate = setTime(cloneDate(selected), { - hour: getHour(time), - minute: getMinute(time), - second: 0, - millisecond: 0 - }); - - _this.setState({ - preSelection: changedDate - }); - - _this.props.onChange(changedDate); - if (_this.props.shouldCloseOnSelect) { - _this.setOpen(false); - } - _this.setState({ inputValue: null }); - }; - - _this.onInputClick = function () { - if (!_this.props.disabled && !_this.props.readOnly) { - _this.setOpen(true); - } - - _this.props.onInputClick(); - }; - - _this.onAccessibleModeButtonKeyDown = function (event) { - var eventKey = event.key; - if (eventKey === " " || eventKey === "Enter") { - event.preventDefault(); - _this.onInputClick(); - } - }; - - _this.onInputKeyDown = function (event) { - _this.props.onKeyDown(event); - - var eventKey = event.key; - if (!_this.state.open && !_this.props.inline && !_this.props.preventOpenOnFocus) { - if (eventKey === "ArrowDown" || eventKey === "ArrowUp") { - event.preventDefault(); - _this.onInputClick(); - } - return; - } - var copy = newDate(_this.state.preSelection); - if (eventKey === "Enter") { - event.preventDefault(); - if (_this.inputOk() && _this.state.lastPreSelectChange === PRESELECT_CHANGE_VIA_NAVIGATE) { - _this.handleSelect(copy, event); - !_this.props.shouldCloseOnSelect && _this.setPreSelection(copy); - } else { - _this.setOpen(false); - } - } else if (eventKey === "Escape") { - event.preventDefault(); - - _this.setOpen(false); - if (!_this.inputOk()) { - _this.props.onInputError({ code: 1, msg: INPUT_ERR_1 }); - } - } else if (eventKey === "Tab") { - _this.setOpen(false, true); - } else if (!_this.props.disabledKeyboardNavigation) { - var newSelection = void 0; - switch (eventKey) { - case "ArrowLeft": - newSelection = subtractDays(copy, 1); - break; - case "ArrowRight": - newSelection = addDays(copy, 1); - break; - case "ArrowUp": - newSelection = subtractWeeks(copy, 1); - break; - case "ArrowDown": - newSelection = addWeeks(copy, 1); - break; - case "PageUp": - newSelection = subtractMonths(copy, 1); - break; - case "PageDown": - newSelection = addMonths(copy, 1); - break; - case "Home": - newSelection = subtractYears(copy, 1); - break; - case "End": - newSelection = addYears(copy, 1); - break; - } - if (!newSelection) { - if (_this.props.onInputError) { - _this.props.onInputError({ code: 1, msg: INPUT_ERR_1 }); - } - return; // Let the input component handle this keydown - } - event.preventDefault(); - _this.setState({ lastPreSelectChange: PRESELECT_CHANGE_VIA_NAVIGATE }); - _this.updateSelection(newSelection); - } - }; - - _this.onClearClick = function (event) { - if (event) { - if (event.preventDefault) { - event.preventDefault(); - } - } - _this.props.onChange(null, event); - _this.setState({ inputValue: null }); - }; - - _this.clear = function () { - _this.onClearClick(); - }; - - _this.renderCalendar = function () { - if (!_this.props.inline && !_this.isCalendarOpen()) { - return null; - } - - var calendar = React__default.createElement( - WrappedCalendar, - { - ref: function ref(elem) { - _this.calendar = elem; - }, - locale: _this.props.locale, - adjustDateOnChange: _this.props.adjustDateOnChange, - setOpen: _this.setOpen, - shouldCloseOnSelect: _this.props.shouldCloseOnSelect, - dateFormat: _this.props.dateFormatCalendar, - useWeekdaysShort: _this.props.useWeekdaysShort, - formatWeekDay: _this.props.formatWeekDay, - dropdownMode: _this.props.dropdownMode, - selected: _this.props.selected, - preSelection: _this.state.preSelection, - onSelect: _this.handleSelect, - onWeekSelect: _this.props.onWeekSelect, - openToDate: _this.props.openToDate, - minDate: _this.props.minDate, - maxDate: _this.props.maxDate, - selectsStart: _this.props.selectsStart, - selectsEnd: _this.props.selectsEnd, - startDate: _this.props.startDate, - endDate: _this.props.endDate, - excludeDates: _this.props.excludeDates, - filterDate: _this.props.filterDate, - onClickOutside: _this.handleCalendarClickOutside, - formatWeekNumber: _this.props.formatWeekNumber, - highlightDates: _this.state.highlightDates, - includeDates: _this.props.includeDates, - includeTimes: _this.props.includeTimes, - injectTimes: _this.props.injectTimes, - inline: _this.props.inline, - peekNextMonth: _this.props.peekNextMonth, - showMonthDropdown: _this.props.showMonthDropdown, - useShortMonthInDropdown: _this.props.useShortMonthInDropdown, - showMonthYearDropdown: _this.props.showMonthYearDropdown, - showWeekNumbers: _this.props.showWeekNumbers, - showYearDropdown: _this.props.showYearDropdown, - withPortal: _this.props.withPortal, - forceShowMonthNavigation: _this.props.forceShowMonthNavigation, - showDisabledMonthNavigation: _this.props.showDisabledMonthNavigation, - scrollableYearDropdown: _this.props.scrollableYearDropdown, - scrollableMonthYearDropdown: _this.props.scrollableMonthYearDropdown, - todayButton: _this.props.todayButton, - weekLabel: _this.props.weekLabel, - utcOffset: _this.props.utcOffset, - outsideClickIgnoreClass: outsideClickIgnoreClass, - fixedHeight: _this.props.fixedHeight, - monthsShown: _this.props.monthsShown, - onDropdownFocus: _this.handleDropdownFocus, - onMonthChange: _this.props.onMonthChange, - onYearChange: _this.props.onYearChange, - dayClassName: _this.props.dayClassName, - showTimeSelect: _this.props.showTimeSelect, - showTimeSelectOnly: _this.props.showTimeSelectOnly, - onTimeChange: _this.handleTimeChange, - timeFormat: _this.props.timeFormat, - timeIntervals: _this.props.timeIntervals, - minTime: _this.props.minTime, - maxTime: _this.props.maxTime, - excludeTimes: _this.props.excludeTimes, - timeCaption: _this.props.timeCaption, - className: _this.props.calendarClassName, - container: _this.props.calendarContainer, - yearDropdownItemNumber: _this.props.yearDropdownItemNumber, - previousMonthButtonLabel: _this.props.previousMonthButtonLabel, - nextMonthButtonLabel: _this.props.nextMonthButtonLabel, - disabledKeyboardNavigation: _this.props.disabledKeyboardNavigation, - renderCustomHeader: _this.props.renderCustomHeader, - popperProps: _this.props.popperProps, - renderDayContents: _this.props.renderDayContents, - updateSelection: _this.updateSelection, - accessibleMode: _this.props.accessibleMode - }, - _this.props.children - ); - - return calendar; - }; - - _this.renderDateInput = function () { - var _classnames, _React$cloneElement; - - var className = classnames(_this.props.className, (_classnames = {}, _classnames[outsideClickIgnoreClass] = _this.state.open, _classnames)); - - var customInput = _this.props.customInput || React__default.createElement("input", { type: "text" }); - var customInputRef = _this.props.customInputRef || "ref"; - var inputValue = typeof _this.props.value === "string" ? _this.props.value : typeof _this.state.inputValue === "string" ? _this.state.inputValue : safeDateFormat(_this.props.selected, _this.props); - - return React__default.cloneElement(customInput, (_React$cloneElement = {}, _React$cloneElement[customInputRef] = function (input) { - _this.input = input; - }, _React$cloneElement.value = inputValue, _React$cloneElement.onBlur = _this.handleBlur, _React$cloneElement.onChange = _this.handleChange, _React$cloneElement.onClick = _this.onInputClick, _React$cloneElement.onFocus = _this.handleFocus, _React$cloneElement.onKeyDown = _this.onInputKeyDown, _React$cloneElement.id = _this.props.id, _React$cloneElement.name = _this.props.name, _React$cloneElement.autoFocus = _this.props.autoFocus, _React$cloneElement.placeholder = _this.props.placeholderText, _React$cloneElement.disabled = _this.props.disabled, _React$cloneElement.autoComplete = _this.props.autoComplete, _React$cloneElement.className = className, _React$cloneElement.title = _this.props.title, _React$cloneElement.readOnly = _this.props.readOnly, _React$cloneElement.required = _this.props.required, _React$cloneElement.tabIndex = _this.props.tabIndex, _React$cloneElement["aria-label"] = inputValue, _React$cloneElement)); - }; - - _this.renderClearButton = function () { - if (_this.props.isClearable && _this.props.selected != null) { - return React__default.createElement("button", { - type: "button", - className: "react-datepicker__close-icon", - onClick: _this.onClearClick, - title: _this.props.clearButtonTitle, - tabIndex: -1 - }); - } else { - return null; - } - }; - - _this.renderAccessibleButton = function () { - if (_this.props.accessibleModeButton != null) { - return React__default.cloneElement(_this.props.accessibleModeButton, { - onClick: _this.onInputClick, - onKeyDown: _this.onAccessibleModeButtonKeyDown, - className: classnames(_this.props.accessibleModeButton.props.className, "react-datepicker__accessible-icon"), - tabIndex: 0 - }); - } else { - return null; - } - }; - - _this.state = _this.calcInitialState(); - return _this; - } - - DatePicker.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { - if (prevProps.inline && hasPreSelectionChanged(prevProps.selected, this.props.selected)) { - this.setPreSelection(this.props.selected); - } - if (prevProps.highlightDates !== this.props.highlightDates) { - this.setState({ - highlightDates: getHightLightDaysMap(this.props.highlightDates) - }); - } - if (!prevState.focused && hasSelectionChanged(prevProps.selected, this.props.selected)) { - this.setState({ inputValue: null }); - } - }; - - DatePicker.prototype.componentWillUnmount = function componentWillUnmount() { - this.clearPreventFocusTimeout(); - }; - - DatePicker.prototype.render = function render() { - var calendar = this.renderCalendar(); - - if (this.props.inline && !this.props.withPortal) { - return calendar; - } - - if (this.props.withPortal) { - return React__default.createElement( - "div", - null, - !this.props.inline ? React__default.createElement( - "div", - { className: "react-datepicker__input-container" }, - this.renderDateInput(), - this.renderClearButton(), - this.renderAccessibleButton() - ) : null, - this.state.open || this.props.inline ? React__default.createElement( - "div", - { className: "react-datepicker__portal" }, - calendar - ) : null - ); - } - - return React__default.createElement(PopperComponent, { - className: this.props.popperClassName, - hidePopper: !this.isCalendarOpen(), - popperModifiers: this.props.popperModifiers, - targetComponent: React__default.createElement( - "div", - { className: "react-datepicker__input-container" }, - this.renderDateInput(), - this.renderClearButton(), - this.renderAccessibleButton() - ), - popperContainer: this.props.popperContainer, - popperComponent: calendar, - popperPlacement: this.props.popperPlacement, - popperProps: this.props.popperProps - }); - }; - - return DatePicker; -}(React__default.Component); - -DatePicker.propTypes = { - adjustDateOnChange: PropTypes.bool, - allowSameDay: PropTypes.bool, - autoComplete: PropTypes.string, - autoFocus: PropTypes.bool, - calendarClassName: PropTypes.string, - calendarContainer: PropTypes.func, - children: PropTypes.node, - className: PropTypes.string, - customInput: PropTypes.element, - customInputRef: PropTypes.string, - // eslint-disable-next-line react/no-unused-prop-types - dateFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), - dateFormatCalendar: PropTypes.string, - dayClassName: PropTypes.func, - disabled: PropTypes.bool, - disabledKeyboardNavigation: PropTypes.bool, - dropdownMode: PropTypes.oneOf(["scroll", "select"]).isRequired, - endDate: PropTypes.object, - excludeDates: PropTypes.array, - filterDate: PropTypes.func, - fixedHeight: PropTypes.bool, - formatWeekNumber: PropTypes.func, - highlightDates: PropTypes.array, - id: PropTypes.string, - includeDates: PropTypes.array, - includeTimes: PropTypes.array, - injectTimes: PropTypes.array, - inline: PropTypes.bool, - isClearable: PropTypes.bool, - locale: PropTypes.string, - maxDate: PropTypes.object, - minDate: PropTypes.object, - monthsShown: PropTypes.number, - name: PropTypes.string, - onBlur: PropTypes.func, - onChange: PropTypes.func.isRequired, - onSelect: PropTypes.func, - onWeekSelect: PropTypes.func, - onClickOutside: PropTypes.func, - onChangeRaw: PropTypes.func, - onFocus: PropTypes.func, - onInputClick: PropTypes.func, - onKeyDown: PropTypes.func, - onMonthChange: PropTypes.func, - onYearChange: PropTypes.func, - onInputError: PropTypes.func, - open: PropTypes.bool, - openToDate: PropTypes.object, - peekNextMonth: PropTypes.bool, - placeholderText: PropTypes.string, - popperContainer: PropTypes.func, - popperClassName: PropTypes.string, // props - popperModifiers: PropTypes.object, // props - popperPlacement: PropTypes.oneOf(popperPlacementPositions), // props - popperProps: PropTypes.object, - preventOpenOnFocus: PropTypes.bool, - readOnly: PropTypes.bool, - required: PropTypes.bool, - scrollableYearDropdown: PropTypes.bool, - scrollableMonthYearDropdown: PropTypes.bool, - selected: PropTypes.object, - selectsEnd: PropTypes.bool, - selectsStart: PropTypes.bool, - showMonthDropdown: PropTypes.bool, - showMonthYearDropdown: PropTypes.bool, - showWeekNumbers: PropTypes.bool, - showYearDropdown: PropTypes.bool, - forceShowMonthNavigation: PropTypes.bool, - showDisabledMonthNavigation: PropTypes.bool, - startDate: PropTypes.object, - startOpen: PropTypes.bool, - tabIndex: PropTypes.number, - timeCaption: PropTypes.string, - title: PropTypes.string, - todayButton: PropTypes.node, - useWeekdaysShort: PropTypes.bool, - formatWeekDay: PropTypes.func, - utcOffset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - value: PropTypes.string, - weekLabel: PropTypes.string, - withPortal: PropTypes.bool, - yearDropdownItemNumber: PropTypes.number, - shouldCloseOnSelect: PropTypes.bool, - showTimeSelect: PropTypes.bool, - showTimeSelectOnly: PropTypes.bool, - timeFormat: PropTypes.string, - timeIntervals: PropTypes.number, - minTime: PropTypes.object, - maxTime: PropTypes.object, - excludeTimes: PropTypes.array, - useShortMonthInDropdown: PropTypes.bool, - clearButtonTitle: PropTypes.string, - previousMonthButtonLabel: PropTypes.string, - nextMonthButtonLabel: PropTypes.string, - renderCustomHeader: PropTypes.func, - renderDayContents: PropTypes.func, - accessibleMode: PropTypes.bool, - accessibleModeButton: PropTypes.element -}; - - -var PRESELECT_CHANGE_VIA_INPUT = "input"; -var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate"; - -exports.default = DatePicker; -exports.CalendarContainer = CalendarContainer; diff --git a/packages/react-datepicker/.babelrc b/packages/react-datepicker/.babelrc deleted file mode 100644 index c268c77e7315..000000000000 --- a/packages/react-datepicker/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["./.babelrc.js"] -} diff --git a/packages/react-datepicker/.babelrc.js b/packages/react-datepicker/.babelrc.js deleted file mode 100644 index 8cb6fc9865ad..000000000000 --- a/packages/react-datepicker/.babelrc.js +++ /dev/null @@ -1,41 +0,0 @@ -var NODE_ENV = process.env.NODE_ENV; -var MODULES = process.env.MODULES; - -var modules = MODULES === 'false' || NODE_ENV === 'test' ? 'commonjs' : false; - -var config = { - presets: [ - [ - 'env', - { - loose: true, - modules: modules, - forceAllTransforms: NODE_ENV === 'production', - }, - ], - 'stage-0', - 'react', - ], - plugins: [], -}; - -if (NODE_ENV === 'development') { - config.plugins = config.plugins.concat([ - 'transform-class-properties', - [ - 'react-transform', - { - transforms: [ - { - transform: 'react-transform-hmr', - imports: ['react'], - locals: ['module'], - }, - ], - }, - ], - 'add-react-displayname', - ]); -} - -module.exports = config; diff --git a/packages/react-datepicker/.eslintrc b/packages/react-datepicker/.eslintrc deleted file mode 100644 index 732ecf48c49f..000000000000 --- a/packages/react-datepicker/.eslintrc +++ /dev/null @@ -1,47 +0,0 @@ -{ - "env": { - "browser": true, - "es6": true - }, - - "plugins": [ - "react" - ], - - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - } - }, - - "parser": "babel-eslint", - - "rules": { - "react/display-name": 2, - "react/forbid-prop-types": 0, - "react/jsx-boolean-value": 2, - "react/jsx-key": 2, - "react/jsx-no-duplicate-props": 2, - "react/jsx-no-literals": 0, - "react/jsx-no-undef": 2, - "react/jsx-sort-props": 0, - "react/jsx-uses-react": 2, - "react/jsx-uses-vars": 2, - "react/no-danger": 2, - "react/no-deprecated": 2, - "react/no-did-mount-set-state": 0, - "react/no-did-update-set-state": 0, - "react/no-direct-mutation-state": 2, - "react/no-multi-comp": 2, - "react/no-set-state": 0, - "react/no-unknown-property": 2, - "react/no-unused-prop-types": 2, - "react/prefer-es6-class": 0, - "react/prop-types": 2, - "react/react-in-jsx-scope": 2, - "react/self-closing-comp": 2, - "react/sort-comp": 2, - } -} diff --git a/packages/react-datepicker/.flowconfig b/packages/react-datepicker/.flowconfig deleted file mode 100644 index 1fed445333e8..000000000000 --- a/packages/react-datepicker/.flowconfig +++ /dev/null @@ -1,11 +0,0 @@ -[ignore] - -[include] - -[libs] - -[lints] - -[options] - -[strict] diff --git a/packages/react-datepicker/.sass-lint.yml b/packages/react-datepicker/.sass-lint.yml deleted file mode 100644 index 05642086a642..000000000000 --- a/packages/react-datepicker/.sass-lint.yml +++ /dev/null @@ -1,154 +0,0 @@ -# sass-lint config generated by make-sass-lint-config v0.1.2 -# -# The following scss-lint Linters are not yet supported by sass-lint: -# ChainedClasses, DisableLinterReason, ElsePlacement, PropertyCount -# PseudoElement, SelectorDepth, SpaceAroundOperator, TrailingWhitespace -# UnnecessaryParentReference, Compass::* -# -# The following settings/values are unsupported by sass-lint: -# Linter HexLength, option "enaled" -# Linter Indentation, option "allow_non_nested_indentation" -# Linter Indentation, option "character" -# Linter SpaceBeforeBrace, option "allow_single_line_padding" - -files: - include: '**/*.scss' -options: - formatter: stylish - merge-default-rules: false -rules: - bem-depth: - - 0 - - max-depth: 1 - border-zero: 0 - brace-style: 1 - class-name-format: - - 1 - - convention: hyphenatedbem - clean-import-paths: - - 1 - - filename-extension: false - leading-underscore: false - empty-line-between-blocks: - - 1 - - ignore-single-line-rulesets: true - extends-before-declarations: 1 - extends-before-mixins: 1 - final-newline: - - 1 - - include: true - force-attribute-nesting: 1 - force-element-nesting: 1 - force-pseudo-nesting: 1 - function-name-format: - - 0 - - convention: BEM - hex-length: - - 1 - - style: short - hex-notation: - - 1 - - style: lowercase - id-name-format: - - 1 - - convention: hyphenatedbem - indentation: - - 1 - - size: 2 - leading-zero: - - 1 - - include: false - mixin-name-format: - - 0 - - convention: BEM - mixins-before-declarations: 1 - nesting-depth: - - 1 - - max-depth: 4 - no-color-keywords: 1 - no-color-literals: 0 - no-css-comments: 0 - no-debug: 1 - no-duplicate-properties: 1 - no-empty-rulesets: 1 - no-extends: 0 - no-ids: 1 - no-important: 1 - no-invalid-hex: 1 - no-mergeable-selectors: 1 - no-misspelled-properties: 1 - no-qualifying-elements: - - 1 - - allow-element-with-attribute: false - allow-element-with-class: false - allow-element-with-id: false - no-trailing-zero: 1 - no-transition-all: 0 - no-url-protocols: 1 - no-vendor-prefixes: 0 - placeholder-in-extend: 1 - placeholder-name-format: - - 1 - - convention: hyphenatedbem - property-sort-order: 0 - property-units: - - 1 - - global: - - ch - - em - - ex - - rem - - cm - - in - - mm - - pc - - pt - - px - - q - - vh - - vw - - vmin - - vmax - - deg - - grad - - rad - - turn - - ms - - s - - Hz - - kHz - - dpi - - dpcm - - dppx - - '%' - quotes: - - 1 - - style: double - shorthand-values: 1 - single-line-per-selector: 1 - space-after-bang: - - 1 - - include: false - space-after-colon: - - 1 - - include: true - space-after-comma: - - 1 - - include: true - space-before-bang: - - 1 - - include: true - space-before-brace: - - 1 - - include: true - space-before-colon: 1 - space-between-parens: - - 1 - - include: false - trailing-semicolon: 1 - url-quotes: 1 - variable-for-property: 0 - variable-name-format: - - 0 - - convention: BEM - zero-unit: 1 diff --git a/packages/react-datepicker/.travis.yml b/packages/react-datepicker/.travis.yml deleted file mode 100644 index 40fea890d6df..000000000000 --- a/packages/react-datepicker/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: node_js -node_js: - - "6" -before_install: - - npm i -g npm@latest - - # Needed for Karma test runner - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start -# install: -# - yarn install -script: - - yarn lint - - yarn test -after_success: - - yarn run codecov -notifications: - slack: - secure: kAmrLltV0ZLuhl6rKk26fDLGuoCch6AYaObRQje4UZlxVQjR2467k430vOZLqv39Mr3U5XmYl6VLcCGmBr3tjM/9c1zjoXnRT8MRy4eIYaUr/thXeh2FlfHKOk8rXnNOoRZ1kBsCzCDFCNDYZZA4jya8S5ITcQyGyYcOqBWVy1w= -cache: yarn diff --git a/packages/react-datepicker/CODE_OF_CONDUCT.md b/packages/react-datepicker/CODE_OF_CONDUCT.md deleted file mode 100644 index 2c76ec67fda3..000000000000 --- a/packages/react-datepicker/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@reactdatepicker.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/packages/react-datepicker/CONTRIBUTING.md b/packages/react-datepicker/CONTRIBUTING.md deleted file mode 100644 index 78e6ac5e4439..000000000000 --- a/packages/react-datepicker/CONTRIBUTING.md +++ /dev/null @@ -1,18 +0,0 @@ -# How to contribute -Thanks for taking your time to read this. We're thrilled you're reading this because we the help from the community to keep improving this project. - -## Testing -We have a handful of Cucumber features, but most of our testbed consists of RSpec examples. Please write RSpec examples for new code you create. - -## Submitting changes -Please send a [GitHub Pull Request](https://github.com/Hacker0x01/react-datepicker/pull/new/master) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). When you send a pull request, we will love you forever if you include a test to cover your changed. We can always use more test coverage. -Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: - $ git commit -m "A summary of the commit - > - > A paragraph describing what changed and its impact." - -## Coding conventions -Start reading our code, and you'll get the hang of it. We optimize for readability: - * We use prettier for code styling. Don't worry about tabs vs spaces, or how to indent your code. - * We use ESlint for all other coding standards. We try to be consistent and helpful. - * This is open source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers, the goal is to make the ride as smooth as possible. diff --git a/packages/react-datepicker/ISSUE_TEMPLATE.md b/packages/react-datepicker/ISSUE_TEMPLATE.md deleted file mode 100644 index 5d3c6c909a7f..000000000000 --- a/packages/react-datepicker/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,5 +0,0 @@ -### Expected behavior - -### Actual behavior - -### Steps to reproduce diff --git a/packages/react-datepicker/LICENSE b/packages/react-datepicker/LICENSE deleted file mode 100644 index e618e32c9c8a..000000000000 --- a/packages/react-datepicker/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 HackerOne Inc and individual contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/react-datepicker/README.md b/packages/react-datepicker/README.md deleted file mode 100644 index b28c54982998..000000000000 --- a/packages/react-datepicker/README.md +++ /dev/null @@ -1,157 +0,0 @@ -# React Date Picker - -[![npm version](https://badge.fury.io/js/react-datepicker.svg)](https://badge.fury.io/js/react-datepicker) -[![Build Status](https://travis-ci.org/Hacker0x01/react-datepicker.svg?branch=master)](https://travis-ci.org/Hacker0x01/react-datepicker) -[![Dependency Status](https://david-dm.org/Hacker0x01/react-datepicker.svg)](https://david-dm.org/Hacker0x01/react-datepicker) -[![codecov](https://codecov.io/gh/Hacker0x01/react-datepicker/branch/master/graph/badge.svg)](https://codecov.io/gh/Hacker0x01/react-datepicker) -[![Downloads](http://img.shields.io/npm/dm/react-datepicker.svg)](https://npmjs.org/package/react-datepicker) -[![Code Quality: Javascript](https://img.shields.io/lgtm/grade/javascript/g/Hacker0x01/react-datepicker.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Hacker0x01/react-datepicker/context:javascript) -[![Total Alerts](https://img.shields.io/lgtm/alerts/g/Hacker0x01/react-datepicker.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Hacker0x01/react-datepicker/alerts) - -A simple and reusable Datepicker component for React ([Demo](https://reactdatepicker.com/)) - -![](https://cloud.githubusercontent.com/assets/1412392/5339491/c40de124-7ee1-11e4-9f07-9276e2545f27.png) - -## Installation - -The package can be installed via NPM: - -``` -npm install react-datepicker --save -``` - -You’ll need to install React, PropTypes, and Moment.js separately since those dependencies aren’t included in the package. Below is a simple example of how to use the Datepicker in a React view. You will also need to require the CSS file from this package (or provide your own). The example below shows how to include the CSS from this package if your build system supports requiring CSS files (Webpack is one that does). - -```js -import React from "react"; -import DatePicker from "react-datepicker"; -import moment from "moment"; - -import "react-datepicker/dist/react-datepicker.css"; - -// CSS Modules, react-datepicker-cssmodules.css -// import 'react-datepicker/dist/react-datepicker-cssmodules.css'; - -class Example extends React.Component { - constructor(props) { - super(props); - this.state = { - startDate: moment() - }; - this.handleChange = this.handleChange.bind(this); - } - - handleChange(date) { - this.setState({ - startDate: date - }); - } - - render() { - return ( - - ); - } -} -``` - -## Configuration - -The most basic use of the DatePicker can be described with: - -```js - -``` - -You can use `onSelect` event handler which fires each time some calendar date has been selected - -```js - -``` - -`onClickOutside` handler may be useful to close datepicker in `inline` mode - -See [here](https://github.com/Hacker0x01/react-datepicker/blob/master/docs/datepicker.md) for a full list of props that may be passed to the component. Examples are given on the [main website](https://hacker0x01.github.io/react-datepicker). - -### Time picker - -You can also include a time picker by adding the showTimeSelect prop - -```js - -``` - -Times will be displayed at 30-minute intervals by default (default configurable via timeInterval prop) - -More examples of how to use the time picker are given on the [main website](https://hacker0x01.github.io/react-datepicker) - -### Localization - -The date picker relies on [moment.js internationalization](http://momentjs.com/docs/#/i18n/) to localize its display components. By default, the date picker will use the locale globally set in moment, which is English. Locales can be changed in the following ways: - -* **Globally** by calling `moment.locale(lang)` -* **Picker-specific** by providing the `locale` prop - -Locales can be further configured in moment with various [customization options](http://momentjs.com/docs/#/customization/). - -_As of version 0.23, the `weekdays` and `weekStart` DatePicker props have been removed. Instead, they can be configured with the `weekdaysMin` and `week.dow` moment locale customization options._ - -## Compatibility - -### React - -We're always trying to stay compatible with the latest version of React. We can't support all older versions of React. - -Latest compatible versions: - -* React 15.5 or newer: All above React-datepicker v.0.40.0 -* React 15.4.1: needs React-datepicker v0.40.0, newer won't work (due to react-onclickoutside dependencies) -* React 0.14 or newer: All above React-datepicker v0.13.0 -* React 0.13: React-datepicker v0.13.0 -* pre React 0.13: React-datepicker v0.6.2 - -### Browser Support - -The date picker is compatible with the latest versions of Chrome, Firefox, and IE10+. - -Unfortunately, it is difficult to support legacy browsers while maintaining our ability to develop new features in the future. For IE9 support, it is known that the [classlist polyfill](https://www.npmjs.com/package/classlist-polyfill) is needed, but this may change or break at any point in the future. - -## Local Development - -The `master` branch contains the latest version of the Datepicker component. To start your example app, you can run `yarn start`. This starts a simple webserver on http://localhost:8080. - -You can run `yarn test` to execute the test suite and linters. To help you develop the component we’ve set up some tests that cover the basic functionality (can be found in `/tests`). Even though we’re big fans of testing, this only covers a small piece of the component. We highly recommend you add tests when you’re adding new functionality. - -### The examples - -The examples are hosted within the docs folder and are ran in the simple app that loads the Datepicker. To extend the examples with a new example, you can simply duplicate one of the existing examples and change the unique properties of your example. - -## Accessibility - -### Keyboard support - -* _Left_: Move to the previous day. -* _Right_: Move to the next day. -* _Up_: Move to the previous week. -* _Down_: Move to the next week. -* _PgUp_: Move to the previous month. -* _PgDn_: Move to the next month. -* _Home_: Move to the previous year. -* _End_: Move to the next year. -* _Enter/Esc/Tab_: close the calendar. (Enter & Esc calls preventDefault) - -## License - -Copyright (c) 2018 HackerOne Inc. and individual contributors. Licensed under MIT license, see [LICENSE](LICENSE) for the full license. diff --git a/packages/react-datepicker/docs-site/CNAME b/packages/react-datepicker/docs-site/CNAME deleted file mode 100644 index 2414d0976dbd..000000000000 --- a/packages/react-datepicker/docs-site/CNAME +++ /dev/null @@ -1 +0,0 @@ -reactdatepicker.com diff --git a/packages/react-datepicker/docs-site/bundle.js b/packages/react-datepicker/docs-site/bundle.js deleted file mode 100644 index 5aceee9350ab..000000000000 --- a/packages/react-datepicker/docs-site/bundle.js +++ /dev/null @@ -1,59361 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/"; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ((function(modules) { - // Check all modules for deduplicated modules - for(var i in modules) { - if(Object.prototype.hasOwnProperty.call(modules, i)) { - switch(typeof modules[i]) { - case "function": break; - case "object": - // Module can be created from a template - modules[i] = (function(_m) { - var args = _m.slice(1), fn = modules[_m[0]]; - return function (a,b,c) { - fn.apply(this, [a,b,c].concat(args)); - }; - }(modules[i])); - break; - default: - // Module is a copy of another module - modules[i] = modules[modules[i]]; - break; - } - } - } - return modules; -}([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(1); - module.exports = __webpack_require__(326); - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(global) {"use strict"; - - __webpack_require__(2); - - __webpack_require__(322); - - __webpack_require__(323); - - if (global._babelPolyfill) { - throw new Error("only one instance of babel-polyfill is allowed"); - } - global._babelPolyfill = true; - - var DEFINE_PROPERTY = "defineProperty"; - function define(O, key, value) { - O[key] || Object[DEFINE_PROPERTY](O, key, { - writable: true, - configurable: true, - value: value - }); - } - - define(String.prototype, "padLeft", "".padStart); - define(String.prototype, "padRight", "".padEnd); - - "pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) { - [][key] && define(Array, key, Function.call.bind([][key])); - }); - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(3); - __webpack_require__(51); - __webpack_require__(52); - __webpack_require__(53); - __webpack_require__(54); - __webpack_require__(56); - __webpack_require__(59); - __webpack_require__(60); - __webpack_require__(61); - __webpack_require__(62); - __webpack_require__(63); - __webpack_require__(64); - __webpack_require__(65); - __webpack_require__(66); - __webpack_require__(67); - __webpack_require__(69); - __webpack_require__(71); - __webpack_require__(73); - __webpack_require__(75); - __webpack_require__(78); - __webpack_require__(79); - __webpack_require__(80); - __webpack_require__(84); - __webpack_require__(86); - __webpack_require__(88); - __webpack_require__(91); - __webpack_require__(92); - __webpack_require__(93); - __webpack_require__(94); - __webpack_require__(96); - __webpack_require__(97); - __webpack_require__(98); - __webpack_require__(99); - __webpack_require__(100); - __webpack_require__(101); - __webpack_require__(102); - __webpack_require__(104); - __webpack_require__(105); - __webpack_require__(106); - __webpack_require__(108); - __webpack_require__(109); - __webpack_require__(110); - __webpack_require__(112); - __webpack_require__(114); - __webpack_require__(115); - __webpack_require__(116); - __webpack_require__(117); - __webpack_require__(118); - __webpack_require__(119); - __webpack_require__(120); - __webpack_require__(121); - __webpack_require__(122); - __webpack_require__(123); - __webpack_require__(124); - __webpack_require__(125); - __webpack_require__(126); - __webpack_require__(131); - __webpack_require__(132); - __webpack_require__(136); - __webpack_require__(137); - __webpack_require__(138); - __webpack_require__(139); - __webpack_require__(141); - __webpack_require__(142); - __webpack_require__(143); - __webpack_require__(144); - __webpack_require__(145); - __webpack_require__(146); - __webpack_require__(147); - __webpack_require__(148); - __webpack_require__(149); - __webpack_require__(150); - __webpack_require__(151); - __webpack_require__(152); - __webpack_require__(153); - __webpack_require__(154); - __webpack_require__(155); - __webpack_require__(157); - __webpack_require__(158); - __webpack_require__(160); - __webpack_require__(161); - __webpack_require__(167); - __webpack_require__(168); - __webpack_require__(170); - __webpack_require__(171); - __webpack_require__(172); - __webpack_require__(176); - __webpack_require__(177); - __webpack_require__(178); - __webpack_require__(179); - __webpack_require__(180); - __webpack_require__(182); - __webpack_require__(183); - __webpack_require__(184); - __webpack_require__(185); - __webpack_require__(188); - __webpack_require__(190); - __webpack_require__(191); - __webpack_require__(192); - __webpack_require__(194); - __webpack_require__(196); - __webpack_require__(198); - __webpack_require__(199); - __webpack_require__(200); - __webpack_require__(202); - __webpack_require__(203); - __webpack_require__(204); - __webpack_require__(205); - __webpack_require__(215); - __webpack_require__(219); - __webpack_require__(220); - __webpack_require__(222); - __webpack_require__(223); - __webpack_require__(227); - __webpack_require__(228); - __webpack_require__(230); - __webpack_require__(231); - __webpack_require__(232); - __webpack_require__(233); - __webpack_require__(234); - __webpack_require__(235); - __webpack_require__(236); - __webpack_require__(237); - __webpack_require__(238); - __webpack_require__(239); - __webpack_require__(240); - __webpack_require__(241); - __webpack_require__(242); - __webpack_require__(243); - __webpack_require__(244); - __webpack_require__(245); - __webpack_require__(246); - __webpack_require__(247); - __webpack_require__(248); - __webpack_require__(250); - __webpack_require__(251); - __webpack_require__(252); - __webpack_require__(253); - __webpack_require__(254); - __webpack_require__(256); - __webpack_require__(257); - __webpack_require__(258); - __webpack_require__(260); - __webpack_require__(261); - __webpack_require__(262); - __webpack_require__(263); - __webpack_require__(264); - __webpack_require__(265); - __webpack_require__(266); - __webpack_require__(267); - __webpack_require__(269); - __webpack_require__(270); - __webpack_require__(272); - __webpack_require__(273); - __webpack_require__(274); - __webpack_require__(275); - __webpack_require__(278); - __webpack_require__(279); - __webpack_require__(281); - __webpack_require__(282); - __webpack_require__(283); - __webpack_require__(284); - __webpack_require__(286); - __webpack_require__(287); - __webpack_require__(288); - __webpack_require__(289); - __webpack_require__(290); - __webpack_require__(291); - __webpack_require__(292); - __webpack_require__(293); - __webpack_require__(294); - __webpack_require__(295); - __webpack_require__(297); - __webpack_require__(298); - __webpack_require__(299); - __webpack_require__(300); - __webpack_require__(301); - __webpack_require__(302); - __webpack_require__(303); - __webpack_require__(304); - __webpack_require__(305); - __webpack_require__(306); - __webpack_require__(307); - __webpack_require__(309); - __webpack_require__(310); - __webpack_require__(311); - __webpack_require__(312); - __webpack_require__(313); - __webpack_require__(314); - __webpack_require__(315); - __webpack_require__(316); - __webpack_require__(317); - __webpack_require__(318); - __webpack_require__(319); - __webpack_require__(320); - __webpack_require__(321); - module.exports = __webpack_require__(9); - - -/***/ }), -/* 3 */ -[841, 4, 5, 6, 8, 18, 22, 7, 23, 24, 19, 25, 26, 27, 29, 44, 12, 32, 16, 17, 45, 48, 50, 11, 30, 49, 43, 42, 28, 10], -/* 4 */ -/***/ (function(module, exports) { - - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); - if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - - var hasOwnProperty = {}.hasOwnProperty; - module.exports = function (it, key) { - return hasOwnProperty.call(it, key); - }; - - -/***/ }), -/* 6 */ -[842, 7], -/* 7 */ -/***/ (function(module, exports) { - - module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } - }; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - - var global = __webpack_require__(4); - var core = __webpack_require__(9); - var hide = __webpack_require__(10); - var redefine = __webpack_require__(18); - var ctx = __webpack_require__(20); - var PROTOTYPE = 'prototype'; - - var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); - var key, own, out, exp; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // extend global - if (target) redefine(target, key, out, type & $export.U); - // export - if (exports[key] != out) hide(exports, key, exp); - if (IS_PROTO && expProto[key] != out) expProto[key] = out; - } - }; - global.core = core; - // type bitmap - $export.F = 1; // forced - $export.G = 2; // global - $export.S = 4; // static - $export.P = 8; // proto - $export.B = 16; // bind - $export.W = 32; // wrap - $export.U = 64; // safe - $export.R = 128; // real proto method for `library` - module.exports = $export; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - var core = module.exports = { version: '2.5.1' }; - if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - - -/***/ }), -/* 10 */ -[843, 11, 17, 6], -/* 11 */ -[844, 12, 14, 16, 6], -/* 12 */ -[845, 13], -/* 13 */ -/***/ (function(module, exports) { - - module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; - - -/***/ }), -/* 14 */ -[846, 6, 7, 15], -/* 15 */ -[847, 13, 4], -/* 16 */ -[848, 13], -/* 17 */ -/***/ (function(module, exports) { - - module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; - }; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - - var global = __webpack_require__(4); - var hide = __webpack_require__(10); - var has = __webpack_require__(5); - var SRC = __webpack_require__(19)('src'); - var TO_STRING = 'toString'; - var $toString = Function[TO_STRING]; - var TPL = ('' + $toString).split(TO_STRING); - - __webpack_require__(9).inspectSource = function (it) { - return $toString.call(it); - }; - - (module.exports = function (O, key, val, safe) { - var isFunction = typeof val == 'function'; - if (isFunction) has(val, 'name') || hide(val, 'name', key); - if (O[key] === val) return; - if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); - if (O === global) { - O[key] = val; - } else if (!safe) { - delete O[key]; - hide(O, key, val); - } else if (O[key]) { - O[key] = val; - } else { - hide(O, key, val); - } - // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative - })(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || $toString.call(this); - }); - - -/***/ }), -/* 19 */ -/***/ (function(module, exports) { - - var id = 0; - var px = Math.random(); - module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); - }; - - -/***/ }), -/* 20 */ -[849, 21], -/* 21 */ -/***/ (function(module, exports) { - - module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; - }; - - -/***/ }), -/* 22 */ -[850, 19, 13, 5, 11, 7], -/* 23 */ -[851, 4], -/* 24 */ -[852, 11, 5, 25], -/* 25 */ -[853, 23, 19, 4], -/* 26 */ -[854, 25], -/* 27 */ -[855, 4, 9, 28, 26, 11], -/* 28 */ -/***/ (function(module, exports) { - - module.exports = false; - - -/***/ }), -/* 29 */ -[856, 30, 42, 43], -/* 30 */ -[857, 31, 41], -/* 31 */ -[858, 5, 32, 36, 40], -/* 32 */ -[859, 33, 35], -/* 33 */ -[860, 34], -/* 34 */ -/***/ (function(module, exports) { - - var toString = {}.toString; - - module.exports = function (it) { - return toString.call(it).slice(8, -1); - }; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports) { - - // 7.2.1 RequireObjectCoercible(argument) - module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; - }; - - -/***/ }), -/* 36 */ -[861, 32, 37, 39], -/* 37 */ -[862, 38], -/* 38 */ -/***/ (function(module, exports) { - - // 7.1.4 ToInteger - var ceil = Math.ceil; - var floor = Math.floor; - module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); - }; - - -/***/ }), -/* 39 */ -[863, 38], -/* 40 */ -[864, 23, 19], -/* 41 */ -/***/ (function(module, exports) { - - // IE 8- don't enum bug keys - module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' - ).split(','); - - -/***/ }), -/* 42 */ -/***/ (function(module, exports) { - - exports.f = Object.getOwnPropertySymbols; - - -/***/ }), -/* 43 */ -/***/ (function(module, exports) { - - exports.f = {}.propertyIsEnumerable; - - -/***/ }), -/* 44 */ -[865, 34], -/* 45 */ -[866, 12, 46, 41, 40, 15, 47], -/* 46 */ -[867, 11, 12, 30, 6], -/* 47 */ -[868, 4], -/* 48 */ -[869, 32, 49], -/* 49 */ -[870, 31, 41], -/* 50 */ -[871, 43, 17, 32, 16, 5, 14, 6], -/* 51 */ -[872, 8, 45], -/* 52 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) - $export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperty: __webpack_require__(11).f }); - - -/***/ }), -/* 53 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) - $export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperties: __webpack_require__(46) }); - - -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) - var toIObject = __webpack_require__(32); - var $getOwnPropertyDescriptor = __webpack_require__(50).f; - - __webpack_require__(55)('getOwnPropertyDescriptor', function () { - return function getOwnPropertyDescriptor(it, key) { - return $getOwnPropertyDescriptor(toIObject(it), key); - }; - }); - - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - - // most Object methods by ES6 should accept primitives - var $export = __webpack_require__(8); - var core = __webpack_require__(9); - var fails = __webpack_require__(7); - module.exports = function (KEY, exec) { - var fn = (core.Object || {})[KEY] || Object[KEY]; - var exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); - }; - - -/***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.9 Object.getPrototypeOf(O) - var toObject = __webpack_require__(57); - var $getPrototypeOf = __webpack_require__(58); - - __webpack_require__(55)('getPrototypeOf', function () { - return function getPrototypeOf(it) { - return $getPrototypeOf(toObject(it)); - }; - }); - - -/***/ }), -/* 57 */ -[873, 35], -/* 58 */ -[874, 5, 57, 40], -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.14 Object.keys(O) - var toObject = __webpack_require__(57); - var $keys = __webpack_require__(30); - - __webpack_require__(55)('keys', function () { - return function keys(it) { - return $keys(toObject(it)); - }; - }); - - -/***/ }), -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.7 Object.getOwnPropertyNames(O) - __webpack_require__(55)('getOwnPropertyNames', function () { - return __webpack_require__(48).f; - }); - - -/***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.5 Object.freeze(O) - var isObject = __webpack_require__(13); - var meta = __webpack_require__(22).onFreeze; - - __webpack_require__(55)('freeze', function ($freeze) { - return function freeze(it) { - return $freeze && isObject(it) ? $freeze(meta(it)) : it; - }; - }); - - -/***/ }), -/* 62 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.17 Object.seal(O) - var isObject = __webpack_require__(13); - var meta = __webpack_require__(22).onFreeze; - - __webpack_require__(55)('seal', function ($seal) { - return function seal(it) { - return $seal && isObject(it) ? $seal(meta(it)) : it; - }; - }); - - -/***/ }), -/* 63 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.15 Object.preventExtensions(O) - var isObject = __webpack_require__(13); - var meta = __webpack_require__(22).onFreeze; - - __webpack_require__(55)('preventExtensions', function ($preventExtensions) { - return function preventExtensions(it) { - return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; - }; - }); - - -/***/ }), -/* 64 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.12 Object.isFrozen(O) - var isObject = __webpack_require__(13); - - __webpack_require__(55)('isFrozen', function ($isFrozen) { - return function isFrozen(it) { - return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; - }; - }); - - -/***/ }), -/* 65 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.13 Object.isSealed(O) - var isObject = __webpack_require__(13); - - __webpack_require__(55)('isSealed', function ($isSealed) { - return function isSealed(it) { - return isObject(it) ? $isSealed ? $isSealed(it) : false : true; - }; - }); - - -/***/ }), -/* 66 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.11 Object.isExtensible(O) - var isObject = __webpack_require__(13); - - __webpack_require__(55)('isExtensible', function ($isExtensible) { - return function isExtensible(it) { - return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; - }; - }); - - -/***/ }), -/* 67 */ -[875, 8, 68], -/* 68 */ -[876, 30, 42, 43, 57, 33, 7], -/* 69 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.3.10 Object.is(value1, value2) - var $export = __webpack_require__(8); - $export($export.S, 'Object', { is: __webpack_require__(70) }); - - -/***/ }), -/* 70 */ -/***/ (function(module, exports) { - - // 7.2.9 SameValue(x, y) - module.exports = Object.is || function is(x, y) { - // eslint-disable-next-line no-self-compare - return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; - }; - - -/***/ }), -/* 71 */ -[877, 8, 72], -/* 72 */ -[878, 13, 12, 20, 50], -/* 73 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // 19.1.3.6 Object.prototype.toString() - var classof = __webpack_require__(74); - var test = {}; - test[__webpack_require__(25)('toStringTag')] = 'z'; - if (test + '' != '[object z]') { - __webpack_require__(18)(Object.prototype, 'toString', function toString() { - return '[object ' + classof(this) + ']'; - }, true); - } - - -/***/ }), -/* 74 */ -/***/ (function(module, exports, __webpack_require__) { - - // getting tag from 19.1.3.6 Object.prototype.toString() - var cof = __webpack_require__(34); - var TAG = __webpack_require__(25)('toStringTag'); - // ES3 wrong here - var ARG = cof(function () { return arguments; }()) == 'Arguments'; - - // fallback for IE11 Script Access Denied error - var tryGet = function (it, key) { - try { - return it[key]; - } catch (e) { /* empty */ } - }; - - module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; - }; - - -/***/ }), -/* 75 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) - var $export = __webpack_require__(8); - - $export($export.P, 'Function', { bind: __webpack_require__(76) }); - - -/***/ }), -/* 76 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var aFunction = __webpack_require__(21); - var isObject = __webpack_require__(13); - var invoke = __webpack_require__(77); - var arraySlice = [].slice; - var factories = {}; - - var construct = function (F, len, args) { - if (!(len in factories)) { - for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; - // eslint-disable-next-line no-new-func - factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); - } return factories[len](F, args); - }; - - module.exports = Function.bind || function bind(that /* , ...args */) { - var fn = aFunction(this); - var partArgs = arraySlice.call(arguments, 1); - var bound = function (/* args... */) { - var args = partArgs.concat(arraySlice.call(arguments)); - return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); - }; - if (isObject(fn.prototype)) bound.prototype = fn.prototype; - return bound; - }; - - -/***/ }), -/* 77 */ -/***/ (function(module, exports) { - - // fast apply, http://jsperf.lnkit.com/fast-apply/5 - module.exports = function (fn, args, that) { - var un = that === undefined; - switch (args.length) { - case 0: return un ? fn() - : fn.call(that); - case 1: return un ? fn(args[0]) - : fn.call(that, args[0]); - case 2: return un ? fn(args[0], args[1]) - : fn.call(that, args[0], args[1]); - case 3: return un ? fn(args[0], args[1], args[2]) - : fn.call(that, args[0], args[1], args[2]); - case 4: return un ? fn(args[0], args[1], args[2], args[3]) - : fn.call(that, args[0], args[1], args[2], args[3]); - } return fn.apply(that, args); - }; - - -/***/ }), -/* 78 */ -/***/ (function(module, exports, __webpack_require__) { - - var dP = __webpack_require__(11).f; - var FProto = Function.prototype; - var nameRE = /^\s*function ([^ (]*)/; - var NAME = 'name'; - - // 19.2.4.2 name - NAME in FProto || __webpack_require__(6) && dP(FProto, NAME, { - configurable: true, - get: function () { - try { - return ('' + this).match(nameRE)[1]; - } catch (e) { - return ''; - } - } - }); - - -/***/ }), -/* 79 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var isObject = __webpack_require__(13); - var getPrototypeOf = __webpack_require__(58); - var HAS_INSTANCE = __webpack_require__(25)('hasInstance'); - var FunctionProto = Function.prototype; - // 19.2.3.6 Function.prototype[@@hasInstance](V) - if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(11).f(FunctionProto, HAS_INSTANCE, { value: function (O) { - if (typeof this != 'function' || !isObject(O)) return false; - if (!isObject(this.prototype)) return O instanceof this; - // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: - while (O = getPrototypeOf(O)) if (this.prototype === O) return true; - return false; - } }); - - -/***/ }), -/* 80 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - var $parseInt = __webpack_require__(81); - // 18.2.5 parseInt(string, radix) - $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); - - -/***/ }), -/* 81 */ -/***/ (function(module, exports, __webpack_require__) { - - var $parseInt = __webpack_require__(4).parseInt; - var $trim = __webpack_require__(82).trim; - var ws = __webpack_require__(83); - var hex = /^[-+]?0[xX]/; - - module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { - var string = $trim(String(str), 3); - return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); - } : $parseInt; - - -/***/ }), -/* 82 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - var defined = __webpack_require__(35); - var fails = __webpack_require__(7); - var spaces = __webpack_require__(83); - var space = '[' + spaces + ']'; - var non = '\u200b\u0085'; - var ltrim = RegExp('^' + space + space + '*'); - var rtrim = RegExp(space + space + '*$'); - - var exporter = function (KEY, exec, ALIAS) { - var exp = {}; - var FORCE = fails(function () { - return !!spaces[KEY]() || non[KEY]() != non; - }); - var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; - if (ALIAS) exp[ALIAS] = fn; - $export($export.P + $export.F * FORCE, 'String', exp); - }; - - // 1 -> String#trimLeft - // 2 -> String#trimRight - // 3 -> String#trim - var trim = exporter.trim = function (string, TYPE) { - string = String(defined(string)); - if (TYPE & 1) string = string.replace(ltrim, ''); - if (TYPE & 2) string = string.replace(rtrim, ''); - return string; - }; - - module.exports = exporter; - - -/***/ }), -/* 83 */ -/***/ (function(module, exports) { - - module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + - '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; - - -/***/ }), -/* 84 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - var $parseFloat = __webpack_require__(85); - // 18.2.4 parseFloat(string) - $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); - - -/***/ }), -/* 85 */ -/***/ (function(module, exports, __webpack_require__) { - - var $parseFloat = __webpack_require__(4).parseFloat; - var $trim = __webpack_require__(82).trim; - - module.exports = 1 / $parseFloat(__webpack_require__(83) + '-0') !== -Infinity ? function parseFloat(str) { - var string = $trim(String(str), 3); - var result = $parseFloat(string); - return result === 0 && string.charAt(0) == '-' ? -0 : result; - } : $parseFloat; - - -/***/ }), -/* 86 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var global = __webpack_require__(4); - var has = __webpack_require__(5); - var cof = __webpack_require__(34); - var inheritIfRequired = __webpack_require__(87); - var toPrimitive = __webpack_require__(16); - var fails = __webpack_require__(7); - var gOPN = __webpack_require__(49).f; - var gOPD = __webpack_require__(50).f; - var dP = __webpack_require__(11).f; - var $trim = __webpack_require__(82).trim; - var NUMBER = 'Number'; - var $Number = global[NUMBER]; - var Base = $Number; - var proto = $Number.prototype; - // Opera ~12 has broken Object#toString - var BROKEN_COF = cof(__webpack_require__(45)(proto)) == NUMBER; - var TRIM = 'trim' in String.prototype; - - // 7.1.3 ToNumber(argument) - var toNumber = function (argument) { - var it = toPrimitive(argument, false); - if (typeof it == 'string' && it.length > 2) { - it = TRIM ? it.trim() : $trim(it, 3); - var first = it.charCodeAt(0); - var third, radix, maxCode; - if (first === 43 || first === 45) { - third = it.charCodeAt(2); - if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix - } else if (first === 48) { - switch (it.charCodeAt(1)) { - case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i - case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i - default: return +it; - } - for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { - code = digits.charCodeAt(i); - // parseInt parses a string to a first unavailable symbol - // but ToNumber should return NaN if a string contains unavailable symbols - if (code < 48 || code > maxCode) return NaN; - } return parseInt(digits, radix); - } - } return +it; - }; - - if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { - $Number = function Number(value) { - var it = arguments.length < 1 ? 0 : value; - var that = this; - return that instanceof $Number - // check on 1..constructor(foo) case - && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) - ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); - }; - for (var keys = __webpack_require__(6) ? gOPN(Base) : ( - // ES3: - 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + - // ES6 (in case, if modules with ES6 Number statics required before): - 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + - 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' - ).split(','), j = 0, key; keys.length > j; j++) { - if (has(Base, key = keys[j]) && !has($Number, key)) { - dP($Number, key, gOPD(Base, key)); - } - } - $Number.prototype = proto; - proto.constructor = $Number; - __webpack_require__(18)(global, NUMBER, $Number); - } - - -/***/ }), -/* 87 */ -/***/ (function(module, exports, __webpack_require__) { - - var isObject = __webpack_require__(13); - var setPrototypeOf = __webpack_require__(72).set; - module.exports = function (that, target, C) { - var S = target.constructor; - var P; - if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { - setPrototypeOf(that, P); - } return that; - }; - - -/***/ }), -/* 88 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var toInteger = __webpack_require__(38); - var aNumberValue = __webpack_require__(89); - var repeat = __webpack_require__(90); - var $toFixed = 1.0.toFixed; - var floor = Math.floor; - var data = [0, 0, 0, 0, 0, 0]; - var ERROR = 'Number.toFixed: incorrect invocation!'; - var ZERO = '0'; - - var multiply = function (n, c) { - var i = -1; - var c2 = c; - while (++i < 6) { - c2 += n * data[i]; - data[i] = c2 % 1e7; - c2 = floor(c2 / 1e7); - } - }; - var divide = function (n) { - var i = 6; - var c = 0; - while (--i >= 0) { - c += data[i]; - data[i] = floor(c / n); - c = (c % n) * 1e7; - } - }; - var numToString = function () { - var i = 6; - var s = ''; - while (--i >= 0) { - if (s !== '' || i === 0 || data[i] !== 0) { - var t = String(data[i]); - s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; - } - } return s; - }; - var pow = function (x, n, acc) { - return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); - }; - var log = function (x) { - var n = 0; - var x2 = x; - while (x2 >= 4096) { - n += 12; - x2 /= 4096; - } - while (x2 >= 2) { - n += 1; - x2 /= 2; - } return n; - }; - - $export($export.P + $export.F * (!!$toFixed && ( - 0.00008.toFixed(3) !== '0.000' || - 0.9.toFixed(0) !== '1' || - 1.255.toFixed(2) !== '1.25' || - 1000000000000000128.0.toFixed(0) !== '1000000000000000128' - ) || !__webpack_require__(7)(function () { - // V8 ~ Android 4.3- - $toFixed.call({}); - })), 'Number', { - toFixed: function toFixed(fractionDigits) { - var x = aNumberValue(this, ERROR); - var f = toInteger(fractionDigits); - var s = ''; - var m = ZERO; - var e, z, j, k; - if (f < 0 || f > 20) throw RangeError(ERROR); - // eslint-disable-next-line no-self-compare - if (x != x) return 'NaN'; - if (x <= -1e21 || x >= 1e21) return String(x); - if (x < 0) { - s = '-'; - x = -x; - } - if (x > 1e-21) { - e = log(x * pow(2, 69, 1)) - 69; - z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); - z *= 0x10000000000000; - e = 52 - e; - if (e > 0) { - multiply(0, z); - j = f; - while (j >= 7) { - multiply(1e7, 0); - j -= 7; - } - multiply(pow(10, j, 1), 0); - j = e - 1; - while (j >= 23) { - divide(1 << 23); - j -= 23; - } - divide(1 << j); - multiply(1, 1); - divide(2); - m = numToString(); - } else { - multiply(0, z); - multiply(1 << -e, 0); - m = numToString() + repeat.call(ZERO, f); - } - } - if (f > 0) { - k = m.length; - m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); - } else { - m = s + m; - } return m; - } - }); - - -/***/ }), -/* 89 */ -/***/ (function(module, exports, __webpack_require__) { - - var cof = __webpack_require__(34); - module.exports = function (it, msg) { - if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); - return +it; - }; - - -/***/ }), -/* 90 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var toInteger = __webpack_require__(38); - var defined = __webpack_require__(35); - - module.exports = function repeat(count) { - var str = String(defined(this)); - var res = ''; - var n = toInteger(count); - if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); - for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; - return res; - }; - - -/***/ }), -/* 91 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $fails = __webpack_require__(7); - var aNumberValue = __webpack_require__(89); - var $toPrecision = 1.0.toPrecision; - - $export($export.P + $export.F * ($fails(function () { - // IE7- - return $toPrecision.call(1, undefined) !== '1'; - }) || !$fails(function () { - // V8 ~ Android 4.3- - $toPrecision.call({}); - })), 'Number', { - toPrecision: function toPrecision(precision) { - var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); - return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); - } - }); - - -/***/ }), -/* 92 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.1.2.1 Number.EPSILON - var $export = __webpack_require__(8); - - $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); - - -/***/ }), -/* 93 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.1.2.2 Number.isFinite(number) - var $export = __webpack_require__(8); - var _isFinite = __webpack_require__(4).isFinite; - - $export($export.S, 'Number', { - isFinite: function isFinite(it) { - return typeof it == 'number' && _isFinite(it); - } - }); - - -/***/ }), -/* 94 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.1.2.3 Number.isInteger(number) - var $export = __webpack_require__(8); - - $export($export.S, 'Number', { isInteger: __webpack_require__(95) }); - - -/***/ }), -/* 95 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.1.2.3 Number.isInteger(number) - var isObject = __webpack_require__(13); - var floor = Math.floor; - module.exports = function isInteger(it) { - return !isObject(it) && isFinite(it) && floor(it) === it; - }; - - -/***/ }), -/* 96 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.1.2.4 Number.isNaN(number) - var $export = __webpack_require__(8); - - $export($export.S, 'Number', { - isNaN: function isNaN(number) { - // eslint-disable-next-line no-self-compare - return number != number; - } - }); - - -/***/ }), -/* 97 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.1.2.5 Number.isSafeInteger(number) - var $export = __webpack_require__(8); - var isInteger = __webpack_require__(95); - var abs = Math.abs; - - $export($export.S, 'Number', { - isSafeInteger: function isSafeInteger(number) { - return isInteger(number) && abs(number) <= 0x1fffffffffffff; - } - }); - - -/***/ }), -/* 98 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.1.2.6 Number.MAX_SAFE_INTEGER - var $export = __webpack_require__(8); - - $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); - - -/***/ }), -/* 99 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.1.2.10 Number.MIN_SAFE_INTEGER - var $export = __webpack_require__(8); - - $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); - - -/***/ }), -/* 100 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - var $parseFloat = __webpack_require__(85); - // 20.1.2.12 Number.parseFloat(string) - $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); - - -/***/ }), -/* 101 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - var $parseInt = __webpack_require__(81); - // 20.1.2.13 Number.parseInt(string, radix) - $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); - - -/***/ }), -/* 102 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.3 Math.acosh(x) - var $export = __webpack_require__(8); - var log1p = __webpack_require__(103); - var sqrt = Math.sqrt; - var $acosh = Math.acosh; - - $export($export.S + $export.F * !($acosh - // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 - && Math.floor($acosh(Number.MAX_VALUE)) == 710 - // Tor Browser bug: Math.acosh(Infinity) -> NaN - && $acosh(Infinity) == Infinity - ), 'Math', { - acosh: function acosh(x) { - return (x = +x) < 1 ? NaN : x > 94906265.62425156 - ? Math.log(x) + Math.LN2 - : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); - } - }); - - -/***/ }), -/* 103 */ -/***/ (function(module, exports) { - - // 20.2.2.20 Math.log1p(x) - module.exports = Math.log1p || function log1p(x) { - return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); - }; - - -/***/ }), -/* 104 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.5 Math.asinh(x) - var $export = __webpack_require__(8); - var $asinh = Math.asinh; - - function asinh(x) { - return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); - } - - // Tor Browser bug: Math.asinh(0) -> -0 - $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); - - -/***/ }), -/* 105 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.7 Math.atanh(x) - var $export = __webpack_require__(8); - var $atanh = Math.atanh; - - // Tor Browser bug: Math.atanh(-0) -> 0 - $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { - atanh: function atanh(x) { - return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; - } - }); - - -/***/ }), -/* 106 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.9 Math.cbrt(x) - var $export = __webpack_require__(8); - var sign = __webpack_require__(107); - - $export($export.S, 'Math', { - cbrt: function cbrt(x) { - return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); - } - }); - - -/***/ }), -/* 107 */ -/***/ (function(module, exports) { - - // 20.2.2.28 Math.sign(x) - module.exports = Math.sign || function sign(x) { - // eslint-disable-next-line no-self-compare - return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; - }; - - -/***/ }), -/* 108 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.11 Math.clz32(x) - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { - clz32: function clz32(x) { - return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; - } - }); - - -/***/ }), -/* 109 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.12 Math.cosh(x) - var $export = __webpack_require__(8); - var exp = Math.exp; - - $export($export.S, 'Math', { - cosh: function cosh(x) { - return (exp(x = +x) + exp(-x)) / 2; - } - }); - - -/***/ }), -/* 110 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.14 Math.expm1(x) - var $export = __webpack_require__(8); - var $expm1 = __webpack_require__(111); - - $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); - - -/***/ }), -/* 111 */ -/***/ (function(module, exports) { - - // 20.2.2.14 Math.expm1(x) - var $expm1 = Math.expm1; - module.exports = (!$expm1 - // Old FF bug - || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 - // Tor Browser bug - || $expm1(-2e-17) != -2e-17 - ) ? function expm1(x) { - return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; - } : $expm1; - - -/***/ }), -/* 112 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.16 Math.fround(x) - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { fround: __webpack_require__(113) }); - - -/***/ }), -/* 113 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.16 Math.fround(x) - var sign = __webpack_require__(107); - var pow = Math.pow; - var EPSILON = pow(2, -52); - var EPSILON32 = pow(2, -23); - var MAX32 = pow(2, 127) * (2 - EPSILON32); - var MIN32 = pow(2, -126); - - var roundTiesToEven = function (n) { - return n + 1 / EPSILON - 1 / EPSILON; - }; - - module.exports = Math.fround || function fround(x) { - var $abs = Math.abs(x); - var $sign = sign(x); - var a, result; - if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; - a = (1 + EPSILON32 / EPSILON) * $abs; - result = a - (a - $abs); - // eslint-disable-next-line no-self-compare - if (result > MAX32 || result != result) return $sign * Infinity; - return $sign * result; - }; - - -/***/ }), -/* 114 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) - var $export = __webpack_require__(8); - var abs = Math.abs; - - $export($export.S, 'Math', { - hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars - var sum = 0; - var i = 0; - var aLen = arguments.length; - var larg = 0; - var arg, div; - while (i < aLen) { - arg = abs(arguments[i++]); - if (larg < arg) { - div = larg / arg; - sum = sum * div * div + 1; - larg = arg; - } else if (arg > 0) { - div = arg / larg; - sum += div * div; - } else sum += arg; - } - return larg === Infinity ? Infinity : larg * Math.sqrt(sum); - } - }); - - -/***/ }), -/* 115 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.18 Math.imul(x, y) - var $export = __webpack_require__(8); - var $imul = Math.imul; - - // some WebKit versions fails with big numbers, some has wrong arity - $export($export.S + $export.F * __webpack_require__(7)(function () { - return $imul(0xffffffff, 5) != -5 || $imul.length != 2; - }), 'Math', { - imul: function imul(x, y) { - var UINT16 = 0xffff; - var xn = +x; - var yn = +y; - var xl = UINT16 & xn; - var yl = UINT16 & yn; - return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); - } - }); - - -/***/ }), -/* 116 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.21 Math.log10(x) - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { - log10: function log10(x) { - return Math.log(x) * Math.LOG10E; - } - }); - - -/***/ }), -/* 117 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.20 Math.log1p(x) - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { log1p: __webpack_require__(103) }); - - -/***/ }), -/* 118 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.22 Math.log2(x) - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { - log2: function log2(x) { - return Math.log(x) / Math.LN2; - } - }); - - -/***/ }), -/* 119 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.28 Math.sign(x) - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { sign: __webpack_require__(107) }); - - -/***/ }), -/* 120 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.30 Math.sinh(x) - var $export = __webpack_require__(8); - var expm1 = __webpack_require__(111); - var exp = Math.exp; - - // V8 near Chromium 38 has a problem with very small numbers - $export($export.S + $export.F * __webpack_require__(7)(function () { - return !Math.sinh(-2e-17) != -2e-17; - }), 'Math', { - sinh: function sinh(x) { - return Math.abs(x = +x) < 1 - ? (expm1(x) - expm1(-x)) / 2 - : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); - } - }); - - -/***/ }), -/* 121 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.33 Math.tanh(x) - var $export = __webpack_require__(8); - var expm1 = __webpack_require__(111); - var exp = Math.exp; - - $export($export.S, 'Math', { - tanh: function tanh(x) { - var a = expm1(x = +x); - var b = expm1(-x); - return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); - } - }); - - -/***/ }), -/* 122 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.2.2.34 Math.trunc(x) - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { - trunc: function trunc(it) { - return (it > 0 ? Math.floor : Math.ceil)(it); - } - }); - - -/***/ }), -/* 123 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - var toAbsoluteIndex = __webpack_require__(39); - var fromCharCode = String.fromCharCode; - var $fromCodePoint = String.fromCodePoint; - - // length should be 1, old FF problem - $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { - // 21.1.2.2 String.fromCodePoint(...codePoints) - fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars - var res = []; - var aLen = arguments.length; - var i = 0; - var code; - while (aLen > i) { - code = +arguments[i++]; - if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); - res.push(code < 0x10000 - ? fromCharCode(code) - : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) - ); - } return res.join(''); - } - }); - - -/***/ }), -/* 124 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - var toIObject = __webpack_require__(32); - var toLength = __webpack_require__(37); - - $export($export.S, 'String', { - // 21.1.2.4 String.raw(callSite, ...substitutions) - raw: function raw(callSite) { - var tpl = toIObject(callSite.raw); - var len = toLength(tpl.length); - var aLen = arguments.length; - var res = []; - var i = 0; - while (len > i) { - res.push(String(tpl[i++])); - if (i < aLen) res.push(String(arguments[i])); - } return res.join(''); - } - }); - - -/***/ }), -/* 125 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // 21.1.3.25 String.prototype.trim() - __webpack_require__(82)('trim', function ($trim) { - return function trim() { - return $trim(this, 3); - }; - }); - - -/***/ }), -/* 126 */ -[879, 127, 128], -/* 127 */ -[880, 38, 35], -/* 128 */ -[881, 28, 8, 18, 10, 5, 129, 130, 24, 58, 25], -/* 129 */ -/***/ (function(module, exports) { - - module.exports = {}; - - -/***/ }), -/* 130 */ -[882, 45, 17, 24, 10, 25], -/* 131 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $at = __webpack_require__(127)(false); - $export($export.P, 'String', { - // 21.1.3.3 String.prototype.codePointAt(pos) - codePointAt: function codePointAt(pos) { - return $at(this, pos); - } - }); - - -/***/ }), -/* 132 */ -/***/ (function(module, exports, __webpack_require__) { - - // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) - 'use strict'; - var $export = __webpack_require__(8); - var toLength = __webpack_require__(37); - var context = __webpack_require__(133); - var ENDS_WITH = 'endsWith'; - var $endsWith = ''[ENDS_WITH]; - - $export($export.P + $export.F * __webpack_require__(135)(ENDS_WITH), 'String', { - endsWith: function endsWith(searchString /* , endPosition = @length */) { - var that = context(this, searchString, ENDS_WITH); - var endPosition = arguments.length > 1 ? arguments[1] : undefined; - var len = toLength(that.length); - var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); - var search = String(searchString); - return $endsWith - ? $endsWith.call(that, search, end) - : that.slice(end - search.length, end) === search; - } - }); - - -/***/ }), -/* 133 */ -/***/ (function(module, exports, __webpack_require__) { - - // helper for String#{startsWith, endsWith, includes} - var isRegExp = __webpack_require__(134); - var defined = __webpack_require__(35); - - module.exports = function (that, searchString, NAME) { - if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); - return String(defined(that)); - }; - - -/***/ }), -/* 134 */ -/***/ (function(module, exports, __webpack_require__) { - - // 7.2.8 IsRegExp(argument) - var isObject = __webpack_require__(13); - var cof = __webpack_require__(34); - var MATCH = __webpack_require__(25)('match'); - module.exports = function (it) { - var isRegExp; - return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); - }; - - -/***/ }), -/* 135 */ -/***/ (function(module, exports, __webpack_require__) { - - var MATCH = __webpack_require__(25)('match'); - module.exports = function (KEY) { - var re = /./; - try { - '/./'[KEY](re); - } catch (e) { - try { - re[MATCH] = false; - return !'/./'[KEY](re); - } catch (f) { /* empty */ } - } return true; - }; - - -/***/ }), -/* 136 */ -/***/ (function(module, exports, __webpack_require__) { - - // 21.1.3.7 String.prototype.includes(searchString, position = 0) - 'use strict'; - var $export = __webpack_require__(8); - var context = __webpack_require__(133); - var INCLUDES = 'includes'; - - $export($export.P + $export.F * __webpack_require__(135)(INCLUDES), 'String', { - includes: function includes(searchString /* , position = 0 */) { - return !!~context(this, searchString, INCLUDES) - .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - -/***/ }), -/* 137 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - - $export($export.P, 'String', { - // 21.1.3.13 String.prototype.repeat(count) - repeat: __webpack_require__(90) - }); - - -/***/ }), -/* 138 */ -/***/ (function(module, exports, __webpack_require__) { - - // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) - 'use strict'; - var $export = __webpack_require__(8); - var toLength = __webpack_require__(37); - var context = __webpack_require__(133); - var STARTS_WITH = 'startsWith'; - var $startsWith = ''[STARTS_WITH]; - - $export($export.P + $export.F * __webpack_require__(135)(STARTS_WITH), 'String', { - startsWith: function startsWith(searchString /* , position = 0 */) { - var that = context(this, searchString, STARTS_WITH); - var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); - var search = String(searchString); - return $startsWith - ? $startsWith.call(that, search, index) - : that.slice(index, index + search.length) === search; - } - }); - - -/***/ }), -/* 139 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.2 String.prototype.anchor(name) - __webpack_require__(140)('anchor', function (createHTML) { - return function anchor(name) { - return createHTML(this, 'a', 'name', name); - }; - }); - - -/***/ }), -/* 140 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - var fails = __webpack_require__(7); - var defined = __webpack_require__(35); - var quot = /"/g; - // B.2.3.2.1 CreateHTML(string, tag, attribute, value) - var createHTML = function (string, tag, attribute, value) { - var S = String(defined(string)); - var p1 = '<' + tag; - if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; - return p1 + '>' + S + ''; - }; - module.exports = function (NAME, exec) { - var O = {}; - O[NAME] = exec(createHTML); - $export($export.P + $export.F * fails(function () { - var test = ''[NAME]('"'); - return test !== test.toLowerCase() || test.split('"').length > 3; - }), 'String', O); - }; - - -/***/ }), -/* 141 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.3 String.prototype.big() - __webpack_require__(140)('big', function (createHTML) { - return function big() { - return createHTML(this, 'big', '', ''); - }; - }); - - -/***/ }), -/* 142 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.4 String.prototype.blink() - __webpack_require__(140)('blink', function (createHTML) { - return function blink() { - return createHTML(this, 'blink', '', ''); - }; - }); - - -/***/ }), -/* 143 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.5 String.prototype.bold() - __webpack_require__(140)('bold', function (createHTML) { - return function bold() { - return createHTML(this, 'b', '', ''); - }; - }); - - -/***/ }), -/* 144 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.6 String.prototype.fixed() - __webpack_require__(140)('fixed', function (createHTML) { - return function fixed() { - return createHTML(this, 'tt', '', ''); - }; - }); - - -/***/ }), -/* 145 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.7 String.prototype.fontcolor(color) - __webpack_require__(140)('fontcolor', function (createHTML) { - return function fontcolor(color) { - return createHTML(this, 'font', 'color', color); - }; - }); - - -/***/ }), -/* 146 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.8 String.prototype.fontsize(size) - __webpack_require__(140)('fontsize', function (createHTML) { - return function fontsize(size) { - return createHTML(this, 'font', 'size', size); - }; - }); - - -/***/ }), -/* 147 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.9 String.prototype.italics() - __webpack_require__(140)('italics', function (createHTML) { - return function italics() { - return createHTML(this, 'i', '', ''); - }; - }); - - -/***/ }), -/* 148 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.10 String.prototype.link(url) - __webpack_require__(140)('link', function (createHTML) { - return function link(url) { - return createHTML(this, 'a', 'href', url); - }; - }); - - -/***/ }), -/* 149 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.11 String.prototype.small() - __webpack_require__(140)('small', function (createHTML) { - return function small() { - return createHTML(this, 'small', '', ''); - }; - }); - - -/***/ }), -/* 150 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.12 String.prototype.strike() - __webpack_require__(140)('strike', function (createHTML) { - return function strike() { - return createHTML(this, 'strike', '', ''); - }; - }); - - -/***/ }), -/* 151 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.13 String.prototype.sub() - __webpack_require__(140)('sub', function (createHTML) { - return function sub() { - return createHTML(this, 'sub', '', ''); - }; - }); - - -/***/ }), -/* 152 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // B.2.3.14 String.prototype.sup() - __webpack_require__(140)('sup', function (createHTML) { - return function sup() { - return createHTML(this, 'sup', '', ''); - }; - }); - - -/***/ }), -/* 153 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.3.3.1 / 15.9.4.4 Date.now() - var $export = __webpack_require__(8); - - $export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); - - -/***/ }), -/* 154 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var toObject = __webpack_require__(57); - var toPrimitive = __webpack_require__(16); - - $export($export.P + $export.F * __webpack_require__(7)(function () { - return new Date(NaN).toJSON() !== null - || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; - }), 'Date', { - // eslint-disable-next-line no-unused-vars - toJSON: function toJSON(key) { - var O = toObject(this); - var pv = toPrimitive(O); - return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); - } - }); - - -/***/ }), -/* 155 */ -/***/ (function(module, exports, __webpack_require__) { - - // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() - var $export = __webpack_require__(8); - var toISOString = __webpack_require__(156); - - // PhantomJS / old WebKit has a broken implementations - $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { - toISOString: toISOString - }); - - -/***/ }), -/* 156 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() - var fails = __webpack_require__(7); - var getTime = Date.prototype.getTime; - var $toISOString = Date.prototype.toISOString; - - var lz = function (num) { - return num > 9 ? num : '0' + num; - }; - - // PhantomJS / old WebKit has a broken implementations - module.exports = (fails(function () { - return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; - }) || !fails(function () { - $toISOString.call(new Date(NaN)); - })) ? function toISOString() { - if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); - var d = this; - var y = d.getUTCFullYear(); - var m = d.getUTCMilliseconds(); - var s = y < 0 ? '-' : y > 9999 ? '+' : ''; - return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + - '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + - 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + - ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; - } : $toISOString; - - -/***/ }), -/* 157 */ -/***/ (function(module, exports, __webpack_require__) { - - var DateProto = Date.prototype; - var INVALID_DATE = 'Invalid Date'; - var TO_STRING = 'toString'; - var $toString = DateProto[TO_STRING]; - var getTime = DateProto.getTime; - if (new Date(NaN) + '' != INVALID_DATE) { - __webpack_require__(18)(DateProto, TO_STRING, function toString() { - var value = getTime.call(this); - // eslint-disable-next-line no-self-compare - return value === value ? $toString.call(this) : INVALID_DATE; - }); - } - - -/***/ }), -/* 158 */ -/***/ (function(module, exports, __webpack_require__) { - - var TO_PRIMITIVE = __webpack_require__(25)('toPrimitive'); - var proto = Date.prototype; - - if (!(TO_PRIMITIVE in proto)) __webpack_require__(10)(proto, TO_PRIMITIVE, __webpack_require__(159)); - - -/***/ }), -/* 159 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var anObject = __webpack_require__(12); - var toPrimitive = __webpack_require__(16); - var NUMBER = 'number'; - - module.exports = function (hint) { - if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); - return toPrimitive(anObject(this), hint != NUMBER); - }; - - -/***/ }), -/* 160 */ -/***/ (function(module, exports, __webpack_require__) { - - // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) - var $export = __webpack_require__(8); - - $export($export.S, 'Array', { isArray: __webpack_require__(44) }); - - -/***/ }), -/* 161 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var ctx = __webpack_require__(20); - var $export = __webpack_require__(8); - var toObject = __webpack_require__(57); - var call = __webpack_require__(162); - var isArrayIter = __webpack_require__(163); - var toLength = __webpack_require__(37); - var createProperty = __webpack_require__(164); - var getIterFn = __webpack_require__(165); - - $export($export.S + $export.F * !__webpack_require__(166)(function (iter) { Array.from(iter); }), 'Array', { - // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) - from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var C = typeof this == 'function' ? this : Array; - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var index = 0; - var iterFn = getIterFn(O); - var length, result, step, iterator; - if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); - // if object isn't iterable or it's array with default iterator - use simple case - if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { - for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { - createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); - } - } else { - length = toLength(O.length); - for (result = new C(length); length > index; index++) { - createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); - } - } - result.length = index; - return result; - } - }); - - -/***/ }), -/* 162 */ -/***/ (function(module, exports, __webpack_require__) { - - // call something on iterator step with safe closing on error - var anObject = __webpack_require__(12); - module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } - }; - - -/***/ }), -/* 163 */ -/***/ (function(module, exports, __webpack_require__) { - - // check on default Array iterator - var Iterators = __webpack_require__(129); - var ITERATOR = __webpack_require__(25)('iterator'); - var ArrayProto = Array.prototype; - - module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); - }; - - -/***/ }), -/* 164 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $defineProperty = __webpack_require__(11); - var createDesc = __webpack_require__(17); - - module.exports = function (object, index, value) { - if (index in object) $defineProperty.f(object, index, createDesc(0, value)); - else object[index] = value; - }; - - -/***/ }), -/* 165 */ -/***/ (function(module, exports, __webpack_require__) { - - var classof = __webpack_require__(74); - var ITERATOR = __webpack_require__(25)('iterator'); - var Iterators = __webpack_require__(129); - module.exports = __webpack_require__(9).getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; - }; - - -/***/ }), -/* 166 */ -/***/ (function(module, exports, __webpack_require__) { - - var ITERATOR = __webpack_require__(25)('iterator'); - var SAFE_CLOSING = false; - - try { - var riter = [7][ITERATOR](); - riter['return'] = function () { SAFE_CLOSING = true; }; - // eslint-disable-next-line no-throw-literal - Array.from(riter, function () { throw 2; }); - } catch (e) { /* empty */ } - - module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { return { done: safe = true }; }; - arr[ITERATOR] = function () { return iter; }; - exec(arr); - } catch (e) { /* empty */ } - return safe; - }; - - -/***/ }), -/* 167 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var createProperty = __webpack_require__(164); - - // WebKit Array.of isn't generic - $export($export.S + $export.F * __webpack_require__(7)(function () { - function F() { /* empty */ } - return !(Array.of.call(F) instanceof F); - }), 'Array', { - // 22.1.2.3 Array.of( ...items) - of: function of(/* ...args */) { - var index = 0; - var aLen = arguments.length; - var result = new (typeof this == 'function' ? this : Array)(aLen); - while (aLen > index) createProperty(result, index, arguments[index++]); - result.length = aLen; - return result; - } - }); - - -/***/ }), -/* 168 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // 22.1.3.13 Array.prototype.join(separator) - var $export = __webpack_require__(8); - var toIObject = __webpack_require__(32); - var arrayJoin = [].join; - - // fallback for not array-like strings - $export($export.P + $export.F * (__webpack_require__(33) != Object || !__webpack_require__(169)(arrayJoin)), 'Array', { - join: function join(separator) { - return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); - } - }); - - -/***/ }), -/* 169 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var fails = __webpack_require__(7); - - module.exports = function (method, arg) { - return !!method && fails(function () { - // eslint-disable-next-line no-useless-call - arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); - }); - }; - - -/***/ }), -/* 170 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var html = __webpack_require__(47); - var cof = __webpack_require__(34); - var toAbsoluteIndex = __webpack_require__(39); - var toLength = __webpack_require__(37); - var arraySlice = [].slice; - - // fallback for not array-like ES3 strings and DOM objects - $export($export.P + $export.F * __webpack_require__(7)(function () { - if (html) arraySlice.call(html); - }), 'Array', { - slice: function slice(begin, end) { - var len = toLength(this.length); - var klass = cof(this); - end = end === undefined ? len : end; - if (klass == 'Array') return arraySlice.call(this, begin, end); - var start = toAbsoluteIndex(begin, len); - var upTo = toAbsoluteIndex(end, len); - var size = toLength(upTo - start); - var cloned = Array(size); - var i = 0; - for (; i < size; i++) cloned[i] = klass == 'String' - ? this.charAt(start + i) - : this[start + i]; - return cloned; - } - }); - - -/***/ }), -/* 171 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var aFunction = __webpack_require__(21); - var toObject = __webpack_require__(57); - var fails = __webpack_require__(7); - var $sort = [].sort; - var test = [1, 2, 3]; - - $export($export.P + $export.F * (fails(function () { - // IE8- - test.sort(undefined); - }) || !fails(function () { - // V8 bug - test.sort(null); - // Old WebKit - }) || !__webpack_require__(169)($sort)), 'Array', { - // 22.1.3.25 Array.prototype.sort(comparefn) - sort: function sort(comparefn) { - return comparefn === undefined - ? $sort.call(toObject(this)) - : $sort.call(toObject(this), aFunction(comparefn)); - } - }); - - -/***/ }), -/* 172 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $forEach = __webpack_require__(173)(0); - var STRICT = __webpack_require__(169)([].forEach, true); - - $export($export.P + $export.F * !STRICT, 'Array', { - // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) - forEach: function forEach(callbackfn /* , thisArg */) { - return $forEach(this, callbackfn, arguments[1]); - } - }); - - -/***/ }), -/* 173 */ -/***/ (function(module, exports, __webpack_require__) { - - // 0 -> Array#forEach - // 1 -> Array#map - // 2 -> Array#filter - // 3 -> Array#some - // 4 -> Array#every - // 5 -> Array#find - // 6 -> Array#findIndex - var ctx = __webpack_require__(20); - var IObject = __webpack_require__(33); - var toObject = __webpack_require__(57); - var toLength = __webpack_require__(37); - var asc = __webpack_require__(174); - module.exports = function (TYPE, $create) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - var create = $create || asc; - return function ($this, callbackfn, that) { - var O = toObject($this); - var self = IObject(O); - var f = ctx(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; - var val, res; - for (;length > index; index++) if (NO_HOLES || index in self) { - val = self[index]; - res = f(val, index, O); - if (TYPE) { - if (IS_MAP) result[index] = res; // map - else if (res) switch (TYPE) { - case 3: return true; // some - case 5: return val; // find - case 6: return index; // findIndex - case 2: result.push(val); // filter - } else if (IS_EVERY) return false; // every - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; - }; - - -/***/ }), -/* 174 */ -/***/ (function(module, exports, __webpack_require__) { - - // 9.4.2.3 ArraySpeciesCreate(originalArray, length) - var speciesConstructor = __webpack_require__(175); - - module.exports = function (original, length) { - return new (speciesConstructor(original))(length); - }; - - -/***/ }), -/* 175 */ -/***/ (function(module, exports, __webpack_require__) { - - var isObject = __webpack_require__(13); - var isArray = __webpack_require__(44); - var SPECIES = __webpack_require__(25)('species'); - - module.exports = function (original) { - var C; - if (isArray(original)) { - C = original.constructor; - // cross-realm fallback - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - } return C === undefined ? Array : C; - }; - - -/***/ }), -/* 176 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $map = __webpack_require__(173)(1); - - $export($export.P + $export.F * !__webpack_require__(169)([].map, true), 'Array', { - // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) - map: function map(callbackfn /* , thisArg */) { - return $map(this, callbackfn, arguments[1]); - } - }); - - -/***/ }), -/* 177 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $filter = __webpack_require__(173)(2); - - $export($export.P + $export.F * !__webpack_require__(169)([].filter, true), 'Array', { - // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) - filter: function filter(callbackfn /* , thisArg */) { - return $filter(this, callbackfn, arguments[1]); - } - }); - - -/***/ }), -/* 178 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $some = __webpack_require__(173)(3); - - $export($export.P + $export.F * !__webpack_require__(169)([].some, true), 'Array', { - // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) - some: function some(callbackfn /* , thisArg */) { - return $some(this, callbackfn, arguments[1]); - } - }); - - -/***/ }), -/* 179 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $every = __webpack_require__(173)(4); - - $export($export.P + $export.F * !__webpack_require__(169)([].every, true), 'Array', { - // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) - every: function every(callbackfn /* , thisArg */) { - return $every(this, callbackfn, arguments[1]); - } - }); - - -/***/ }), -/* 180 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $reduce = __webpack_require__(181); - - $export($export.P + $export.F * !__webpack_require__(169)([].reduce, true), 'Array', { - // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) - reduce: function reduce(callbackfn /* , initialValue */) { - return $reduce(this, callbackfn, arguments.length, arguments[1], false); - } - }); - - -/***/ }), -/* 181 */ -/***/ (function(module, exports, __webpack_require__) { - - var aFunction = __webpack_require__(21); - var toObject = __webpack_require__(57); - var IObject = __webpack_require__(33); - var toLength = __webpack_require__(37); - - module.exports = function (that, callbackfn, aLen, memo, isRight) { - aFunction(callbackfn); - var O = toObject(that); - var self = IObject(O); - var length = toLength(O.length); - var index = isRight ? length - 1 : 0; - var i = isRight ? -1 : 1; - if (aLen < 2) for (;;) { - if (index in self) { - memo = self[index]; - index += i; - break; - } - index += i; - if (isRight ? index < 0 : length <= index) { - throw TypeError('Reduce of empty array with no initial value'); - } - } - for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { - memo = callbackfn(memo, self[index], index, O); - } - return memo; - }; - - -/***/ }), -/* 182 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $reduce = __webpack_require__(181); - - $export($export.P + $export.F * !__webpack_require__(169)([].reduceRight, true), 'Array', { - // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) - reduceRight: function reduceRight(callbackfn /* , initialValue */) { - return $reduce(this, callbackfn, arguments.length, arguments[1], true); - } - }); - - -/***/ }), -/* 183 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $indexOf = __webpack_require__(36)(false); - var $native = [].indexOf; - var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; - - $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(169)($native)), 'Array', { - // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) - indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { - return NEGATIVE_ZERO - // convert -0 to +0 - ? $native.apply(this, arguments) || 0 - : $indexOf(this, searchElement, arguments[1]); - } - }); - - -/***/ }), -/* 184 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var toIObject = __webpack_require__(32); - var toInteger = __webpack_require__(38); - var toLength = __webpack_require__(37); - var $native = [].lastIndexOf; - var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; - - $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(169)($native)), 'Array', { - // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) - lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { - // convert -0 to +0 - if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; - var O = toIObject(this); - var length = toLength(O.length); - var index = length - 1; - if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); - if (index < 0) index = length + index; - for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; - return -1; - } - }); - - -/***/ }), -/* 185 */ -/***/ (function(module, exports, __webpack_require__) { - - // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) - var $export = __webpack_require__(8); - - $export($export.P, 'Array', { copyWithin: __webpack_require__(186) }); - - __webpack_require__(187)('copyWithin'); - - -/***/ }), -/* 186 */ -/***/ (function(module, exports, __webpack_require__) { - - // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) - 'use strict'; - var toObject = __webpack_require__(57); - var toAbsoluteIndex = __webpack_require__(39); - var toLength = __webpack_require__(37); - - module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { - var O = toObject(this); - var len = toLength(O.length); - var to = toAbsoluteIndex(target, len); - var from = toAbsoluteIndex(start, len); - var end = arguments.length > 2 ? arguments[2] : undefined; - var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); - var inc = 1; - if (from < to && to < from + count) { - inc = -1; - from += count - 1; - to += count - 1; - } - while (count-- > 0) { - if (from in O) O[to] = O[from]; - else delete O[to]; - to += inc; - from += inc; - } return O; - }; - - -/***/ }), -/* 187 */ -/***/ (function(module, exports, __webpack_require__) { - - // 22.1.3.31 Array.prototype[@@unscopables] - var UNSCOPABLES = __webpack_require__(25)('unscopables'); - var ArrayProto = Array.prototype; - if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(10)(ArrayProto, UNSCOPABLES, {}); - module.exports = function (key) { - ArrayProto[UNSCOPABLES][key] = true; - }; - - -/***/ }), -/* 188 */ -/***/ (function(module, exports, __webpack_require__) { - - // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) - var $export = __webpack_require__(8); - - $export($export.P, 'Array', { fill: __webpack_require__(189) }); - - __webpack_require__(187)('fill'); - - -/***/ }), -/* 189 */ -/***/ (function(module, exports, __webpack_require__) { - - // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) - 'use strict'; - var toObject = __webpack_require__(57); - var toAbsoluteIndex = __webpack_require__(39); - var toLength = __webpack_require__(37); - module.exports = function fill(value /* , start = 0, end = @length */) { - var O = toObject(this); - var length = toLength(O.length); - var aLen = arguments.length; - var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); - var end = aLen > 2 ? arguments[2] : undefined; - var endPos = end === undefined ? length : toAbsoluteIndex(end, length); - while (endPos > index) O[index++] = value; - return O; - }; - - -/***/ }), -/* 190 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) - var $export = __webpack_require__(8); - var $find = __webpack_require__(173)(5); - var KEY = 'find'; - var forced = true; - // Shouldn't skip holes - if (KEY in []) Array(1)[KEY](function () { forced = false; }); - $export($export.P + $export.F * forced, 'Array', { - find: function find(callbackfn /* , that = undefined */) { - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - __webpack_require__(187)(KEY); - - -/***/ }), -/* 191 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) - var $export = __webpack_require__(8); - var $find = __webpack_require__(173)(6); - var KEY = 'findIndex'; - var forced = true; - // Shouldn't skip holes - if (KEY in []) Array(1)[KEY](function () { forced = false; }); - $export($export.P + $export.F * forced, 'Array', { - findIndex: function findIndex(callbackfn /* , that = undefined */) { - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - __webpack_require__(187)(KEY); - - -/***/ }), -/* 192 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(193)('Array'); - - -/***/ }), -/* 193 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var global = __webpack_require__(4); - var dP = __webpack_require__(11); - var DESCRIPTORS = __webpack_require__(6); - var SPECIES = __webpack_require__(25)('species'); - - module.exports = function (KEY) { - var C = global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function () { return this; } - }); - }; - - -/***/ }), -/* 194 */ -[883, 187, 195, 129, 32, 128], -/* 195 */ -/***/ (function(module, exports) { - - module.exports = function (done, value) { - return { value: value, done: !!done }; - }; - - -/***/ }), -/* 196 */ -/***/ (function(module, exports, __webpack_require__) { - - var global = __webpack_require__(4); - var inheritIfRequired = __webpack_require__(87); - var dP = __webpack_require__(11).f; - var gOPN = __webpack_require__(49).f; - var isRegExp = __webpack_require__(134); - var $flags = __webpack_require__(197); - var $RegExp = global.RegExp; - var Base = $RegExp; - var proto = $RegExp.prototype; - var re1 = /a/g; - var re2 = /a/g; - // "new" creates a new object, old webkit buggy here - var CORRECT_NEW = new $RegExp(re1) !== re1; - - if (__webpack_require__(6) && (!CORRECT_NEW || __webpack_require__(7)(function () { - re2[__webpack_require__(25)('match')] = false; - // RegExp constructor can alter flags and IsRegExp works correct with @@match - return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; - }))) { - $RegExp = function RegExp(p, f) { - var tiRE = this instanceof $RegExp; - var piRE = isRegExp(p); - var fiU = f === undefined; - return !tiRE && piRE && p.constructor === $RegExp && fiU ? p - : inheritIfRequired(CORRECT_NEW - ? new Base(piRE && !fiU ? p.source : p, f) - : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) - , tiRE ? this : proto, $RegExp); - }; - var proxy = function (key) { - key in $RegExp || dP($RegExp, key, { - configurable: true, - get: function () { return Base[key]; }, - set: function (it) { Base[key] = it; } - }); - }; - for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); - proto.constructor = $RegExp; - $RegExp.prototype = proto; - __webpack_require__(18)(global, 'RegExp', $RegExp); - } - - __webpack_require__(193)('RegExp'); - - -/***/ }), -/* 197 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // 21.2.5.3 get RegExp.prototype.flags - var anObject = __webpack_require__(12); - module.exports = function () { - var that = anObject(this); - var result = ''; - if (that.global) result += 'g'; - if (that.ignoreCase) result += 'i'; - if (that.multiline) result += 'm'; - if (that.unicode) result += 'u'; - if (that.sticky) result += 'y'; - return result; - }; - - -/***/ }), -/* 198 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - __webpack_require__(199); - var anObject = __webpack_require__(12); - var $flags = __webpack_require__(197); - var DESCRIPTORS = __webpack_require__(6); - var TO_STRING = 'toString'; - var $toString = /./[TO_STRING]; - - var define = function (fn) { - __webpack_require__(18)(RegExp.prototype, TO_STRING, fn, true); - }; - - // 21.2.5.14 RegExp.prototype.toString() - if (__webpack_require__(7)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { - define(function toString() { - var R = anObject(this); - return '/'.concat(R.source, '/', - 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); - }); - // FF44- RegExp#toString has a wrong name - } else if ($toString.name != TO_STRING) { - define(function toString() { - return $toString.call(this); - }); - } - - -/***/ }), -/* 199 */ -/***/ (function(module, exports, __webpack_require__) { - - // 21.2.5.3 get RegExp.prototype.flags() - if (__webpack_require__(6) && /./g.flags != 'g') __webpack_require__(11).f(RegExp.prototype, 'flags', { - configurable: true, - get: __webpack_require__(197) - }); - - -/***/ }), -/* 200 */ -/***/ (function(module, exports, __webpack_require__) { - - // @@match logic - __webpack_require__(201)('match', 1, function (defined, MATCH, $match) { - // 21.1.3.11 String.prototype.match(regexp) - return [function match(regexp) { - 'use strict'; - var O = defined(this); - var fn = regexp == undefined ? undefined : regexp[MATCH]; - return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); - }, $match]; - }); - - -/***/ }), -/* 201 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var hide = __webpack_require__(10); - var redefine = __webpack_require__(18); - var fails = __webpack_require__(7); - var defined = __webpack_require__(35); - var wks = __webpack_require__(25); - - module.exports = function (KEY, length, exec) { - var SYMBOL = wks(KEY); - var fns = exec(defined, SYMBOL, ''[KEY]); - var strfn = fns[0]; - var rxfn = fns[1]; - if (fails(function () { - var O = {}; - O[SYMBOL] = function () { return 7; }; - return ''[KEY](O) != 7; - })) { - redefine(String.prototype, KEY, strfn); - hide(RegExp.prototype, SYMBOL, length == 2 - // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) - // 21.2.5.11 RegExp.prototype[@@split](string, limit) - ? function (string, arg) { return rxfn.call(string, this, arg); } - // 21.2.5.6 RegExp.prototype[@@match](string) - // 21.2.5.9 RegExp.prototype[@@search](string) - : function (string) { return rxfn.call(string, this); } - ); - } - }; - - -/***/ }), -/* 202 */ -/***/ (function(module, exports, __webpack_require__) { - - // @@replace logic - __webpack_require__(201)('replace', 2, function (defined, REPLACE, $replace) { - // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) - return [function replace(searchValue, replaceValue) { - 'use strict'; - var O = defined(this); - var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; - return fn !== undefined - ? fn.call(searchValue, O, replaceValue) - : $replace.call(String(O), searchValue, replaceValue); - }, $replace]; - }); - - -/***/ }), -/* 203 */ -/***/ (function(module, exports, __webpack_require__) { - - // @@search logic - __webpack_require__(201)('search', 1, function (defined, SEARCH, $search) { - // 21.1.3.15 String.prototype.search(regexp) - return [function search(regexp) { - 'use strict'; - var O = defined(this); - var fn = regexp == undefined ? undefined : regexp[SEARCH]; - return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); - }, $search]; - }); - - -/***/ }), -/* 204 */ -/***/ (function(module, exports, __webpack_require__) { - - // @@split logic - __webpack_require__(201)('split', 2, function (defined, SPLIT, $split) { - 'use strict'; - var isRegExp = __webpack_require__(134); - var _split = $split; - var $push = [].push; - var $SPLIT = 'split'; - var LENGTH = 'length'; - var LAST_INDEX = 'lastIndex'; - if ( - 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || - 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || - 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || - '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || - '.'[$SPLIT](/()()/)[LENGTH] > 1 || - ''[$SPLIT](/.?/)[LENGTH] - ) { - var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group - // based on es5-shim implementation, need to rework it - $split = function (separator, limit) { - var string = String(this); - if (separator === undefined && limit === 0) return []; - // If `separator` is not a regex, use native split - if (!isRegExp(separator)) return _split.call(string, separator, limit); - var output = []; - var flags = (separator.ignoreCase ? 'i' : '') + - (separator.multiline ? 'm' : '') + - (separator.unicode ? 'u' : '') + - (separator.sticky ? 'y' : ''); - var lastLastIndex = 0; - var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; - // Make `global` and avoid `lastIndex` issues by working with a copy - var separatorCopy = new RegExp(separator.source, flags + 'g'); - var separator2, match, lastIndex, lastLength, i; - // Doesn't need flags gy, but they don't hurt - if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); - while (match = separatorCopy.exec(string)) { - // `separatorCopy.lastIndex` is not reliable cross-browser - lastIndex = match.index + match[0][LENGTH]; - if (lastIndex > lastLastIndex) { - output.push(string.slice(lastLastIndex, match.index)); - // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG - // eslint-disable-next-line no-loop-func - if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () { - for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined; - }); - if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); - lastLength = match[0][LENGTH]; - lastLastIndex = lastIndex; - if (output[LENGTH] >= splitLimit) break; - } - if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop - } - if (lastLastIndex === string[LENGTH]) { - if (lastLength || !separatorCopy.test('')) output.push(''); - } else output.push(string.slice(lastLastIndex)); - return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; - }; - // Chakra, V8 - } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { - $split = function (separator, limit) { - return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); - }; - } - // 21.1.3.17 String.prototype.split(separator, limit) - return [function split(separator, limit) { - var O = defined(this); - var fn = separator == undefined ? undefined : separator[SPLIT]; - return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); - }, $split]; - }); - - -/***/ }), -/* 205 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var LIBRARY = __webpack_require__(28); - var global = __webpack_require__(4); - var ctx = __webpack_require__(20); - var classof = __webpack_require__(74); - var $export = __webpack_require__(8); - var isObject = __webpack_require__(13); - var aFunction = __webpack_require__(21); - var anInstance = __webpack_require__(206); - var forOf = __webpack_require__(207); - var speciesConstructor = __webpack_require__(208); - var task = __webpack_require__(209).set; - var microtask = __webpack_require__(210)(); - var newPromiseCapabilityModule = __webpack_require__(211); - var perform = __webpack_require__(212); - var promiseResolve = __webpack_require__(213); - var PROMISE = 'Promise'; - var TypeError = global.TypeError; - var process = global.process; - var $Promise = global[PROMISE]; - var isNode = classof(process) == 'process'; - var empty = function () { /* empty */ }; - var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; - var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; - - var USE_NATIVE = !!function () { - try { - // correct subclassing with @@species support - var promise = $Promise.resolve(1); - var FakePromise = (promise.constructor = {})[__webpack_require__(25)('species')] = function (exec) { - exec(empty, empty); - }; - // unhandled rejections tracking support, NodeJS Promise without it fails @@species test - return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; - } catch (e) { /* empty */ } - }(); - - // helpers - var isThenable = function (it) { - var then; - return isObject(it) && typeof (then = it.then) == 'function' ? then : false; - }; - var notify = function (promise, isReject) { - if (promise._n) return; - promise._n = true; - var chain = promise._c; - microtask(function () { - var value = promise._v; - var ok = promise._s == 1; - var i = 0; - var run = function (reaction) { - var handler = ok ? reaction.ok : reaction.fail; - var resolve = reaction.resolve; - var reject = reaction.reject; - var domain = reaction.domain; - var result, then; - try { - if (handler) { - if (!ok) { - if (promise._h == 2) onHandleUnhandled(promise); - promise._h = 1; - } - if (handler === true) result = value; - else { - if (domain) domain.enter(); - result = handler(value); - if (domain) domain.exit(); - } - if (result === reaction.promise) { - reject(TypeError('Promise-chain cycle')); - } else if (then = isThenable(result)) { - then.call(result, resolve, reject); - } else resolve(result); - } else reject(value); - } catch (e) { - reject(e); - } - }; - while (chain.length > i) run(chain[i++]); // variable length - can't use forEach - promise._c = []; - promise._n = false; - if (isReject && !promise._h) onUnhandled(promise); - }); - }; - var onUnhandled = function (promise) { - task.call(global, function () { - var value = promise._v; - var unhandled = isUnhandled(promise); - var result, handler, console; - if (unhandled) { - result = perform(function () { - if (isNode) { - process.emit('unhandledRejection', value, promise); - } else if (handler = global.onunhandledrejection) { - handler({ promise: promise, reason: value }); - } else if ((console = global.console) && console.error) { - console.error('Unhandled promise rejection', value); - } - }); - // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should - promise._h = isNode || isUnhandled(promise) ? 2 : 1; - } promise._a = undefined; - if (unhandled && result.e) throw result.v; - }); - }; - var isUnhandled = function (promise) { - if (promise._h == 1) return false; - var chain = promise._a || promise._c; - var i = 0; - var reaction; - while (chain.length > i) { - reaction = chain[i++]; - if (reaction.fail || !isUnhandled(reaction.promise)) return false; - } return true; - }; - var onHandleUnhandled = function (promise) { - task.call(global, function () { - var handler; - if (isNode) { - process.emit('rejectionHandled', promise); - } else if (handler = global.onrejectionhandled) { - handler({ promise: promise, reason: promise._v }); - } - }); - }; - var $reject = function (value) { - var promise = this; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - promise._v = value; - promise._s = 2; - if (!promise._a) promise._a = promise._c.slice(); - notify(promise, true); - }; - var $resolve = function (value) { - var promise = this; - var then; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - try { - if (promise === value) throw TypeError("Promise can't be resolved itself"); - if (then = isThenable(value)) { - microtask(function () { - var wrapper = { _w: promise, _d: false }; // wrap - try { - then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); - } catch (e) { - $reject.call(wrapper, e); - } - }); - } else { - promise._v = value; - promise._s = 1; - notify(promise, false); - } - } catch (e) { - $reject.call({ _w: promise, _d: false }, e); // wrap - } - }; - - // constructor polyfill - if (!USE_NATIVE) { - // 25.4.3.1 Promise(executor) - $Promise = function Promise(executor) { - anInstance(this, $Promise, PROMISE, '_h'); - aFunction(executor); - Internal.call(this); - try { - executor(ctx($resolve, this, 1), ctx($reject, this, 1)); - } catch (err) { - $reject.call(this, err); - } - }; - // eslint-disable-next-line no-unused-vars - Internal = function Promise(executor) { - this._c = []; // <- awaiting reactions - this._a = undefined; // <- checked in isUnhandled reactions - this._s = 0; // <- state - this._d = false; // <- done - this._v = undefined; // <- value - this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled - this._n = false; // <- notify - }; - Internal.prototype = __webpack_require__(214)($Promise.prototype, { - // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) - then: function then(onFulfilled, onRejected) { - var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); - reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; - reaction.fail = typeof onRejected == 'function' && onRejected; - reaction.domain = isNode ? process.domain : undefined; - this._c.push(reaction); - if (this._a) this._a.push(reaction); - if (this._s) notify(this, false); - return reaction.promise; - }, - // 25.4.5.1 Promise.prototype.catch(onRejected) - 'catch': function (onRejected) { - return this.then(undefined, onRejected); - } - }); - OwnPromiseCapability = function () { - var promise = new Internal(); - this.promise = promise; - this.resolve = ctx($resolve, promise, 1); - this.reject = ctx($reject, promise, 1); - }; - newPromiseCapabilityModule.f = newPromiseCapability = function (C) { - return C === $Promise || C === Wrapper - ? new OwnPromiseCapability(C) - : newGenericPromiseCapability(C); - }; - } - - $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); - __webpack_require__(24)($Promise, PROMISE); - __webpack_require__(193)(PROMISE); - Wrapper = __webpack_require__(9)[PROMISE]; - - // statics - $export($export.S + $export.F * !USE_NATIVE, PROMISE, { - // 25.4.4.5 Promise.reject(r) - reject: function reject(r) { - var capability = newPromiseCapability(this); - var $$reject = capability.reject; - $$reject(r); - return capability.promise; - } - }); - $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { - // 25.4.4.6 Promise.resolve(x) - resolve: function resolve(x) { - return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); - } - }); - $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(166)(function (iter) { - $Promise.all(iter)['catch'](empty); - })), PROMISE, { - // 25.4.4.1 Promise.all(iterable) - all: function all(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var resolve = capability.resolve; - var reject = capability.reject; - var result = perform(function () { - var values = []; - var index = 0; - var remaining = 1; - forOf(iterable, false, function (promise) { - var $index = index++; - var alreadyCalled = false; - values.push(undefined); - remaining++; - C.resolve(promise).then(function (value) { - if (alreadyCalled) return; - alreadyCalled = true; - values[$index] = value; - --remaining || resolve(values); - }, reject); - }); - --remaining || resolve(values); - }); - if (result.e) reject(result.v); - return capability.promise; - }, - // 25.4.4.4 Promise.race(iterable) - race: function race(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var reject = capability.reject; - var result = perform(function () { - forOf(iterable, false, function (promise) { - C.resolve(promise).then(capability.resolve, reject); - }); - }); - if (result.e) reject(result.v); - return capability.promise; - } - }); - - -/***/ }), -/* 206 */ -/***/ (function(module, exports) { - - module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { - throw TypeError(name + ': incorrect invocation!'); - } return it; - }; - - -/***/ }), -/* 207 */ -/***/ (function(module, exports, __webpack_require__) { - - var ctx = __webpack_require__(20); - var call = __webpack_require__(162); - var isArrayIter = __webpack_require__(163); - var anObject = __webpack_require__(12); - var toLength = __webpack_require__(37); - var getIterFn = __webpack_require__(165); - var BREAK = {}; - var RETURN = {}; - var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } - }; - exports.BREAK = BREAK; - exports.RETURN = RETURN; - - -/***/ }), -/* 208 */ -/***/ (function(module, exports, __webpack_require__) { - - // 7.3.20 SpeciesConstructor(O, defaultConstructor) - var anObject = __webpack_require__(12); - var aFunction = __webpack_require__(21); - var SPECIES = __webpack_require__(25)('species'); - module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); - }; - - -/***/ }), -/* 209 */ -/***/ (function(module, exports, __webpack_require__) { - - var ctx = __webpack_require__(20); - var invoke = __webpack_require__(77); - var html = __webpack_require__(47); - var cel = __webpack_require__(15); - var global = __webpack_require__(4); - var process = global.process; - var setTask = global.setImmediate; - var clearTask = global.clearImmediate; - var MessageChannel = global.MessageChannel; - var Dispatch = global.Dispatch; - var counter = 0; - var queue = {}; - var ONREADYSTATECHANGE = 'onreadystatechange'; - var defer, channel, port; - var run = function () { - var id = +this; - // eslint-disable-next-line no-prototype-builtins - if (queue.hasOwnProperty(id)) { - var fn = queue[id]; - delete queue[id]; - fn(); - } - }; - var listener = function (event) { - run.call(event.data); - }; - // Node.js 0.9+ & IE10+ has setImmediate, otherwise: - if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - while (arguments.length > i) args.push(arguments[i++]); - queue[++counter] = function () { - // eslint-disable-next-line no-new-func - invoke(typeof fn == 'function' ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function clearImmediate(id) { - delete queue[id]; - }; - // Node.js 0.8- - if (__webpack_require__(34)(process) == 'process') { - defer = function (id) { - process.nextTick(ctx(run, id, 1)); - }; - // Sphere (JS game engine) Dispatch API - } else if (Dispatch && Dispatch.now) { - defer = function (id) { - Dispatch.now(ctx(run, id, 1)); - }; - // Browsers with MessageChannel, includes WebWorkers - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; - channel.port1.onmessage = listener; - defer = ctx(port.postMessage, port, 1); - // Browsers with postMessage, skip WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function (id) { - global.postMessage(id + '', '*'); - }; - global.addEventListener('message', listener, false); - // IE8- - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function (id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { - html.removeChild(this); - run.call(id); - }; - }; - // Rest old browsers - } else { - defer = function (id) { - setTimeout(ctx(run, id, 1), 0); - }; - } - } - module.exports = { - set: setTask, - clear: clearTask - }; - - -/***/ }), -/* 210 */ -/***/ (function(module, exports, __webpack_require__) { - - var global = __webpack_require__(4); - var macrotask = __webpack_require__(209).set; - var Observer = global.MutationObserver || global.WebKitMutationObserver; - var process = global.process; - var Promise = global.Promise; - var isNode = __webpack_require__(34)(process) == 'process'; - - module.exports = function () { - var head, last, notify; - - var flush = function () { - var parent, fn; - if (isNode && (parent = process.domain)) parent.exit(); - while (head) { - fn = head.fn; - head = head.next; - try { - fn(); - } catch (e) { - if (head) notify(); - else last = undefined; - throw e; - } - } last = undefined; - if (parent) parent.enter(); - }; - - // Node.js - if (isNode) { - notify = function () { - process.nextTick(flush); - }; - // browsers with MutationObserver - } else if (Observer) { - var toggle = true; - var node = document.createTextNode(''); - new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new - notify = function () { - node.data = toggle = !toggle; - }; - // environments with maybe non-completely correct, but existent Promise - } else if (Promise && Promise.resolve) { - var promise = Promise.resolve(); - notify = function () { - promise.then(flush); - }; - // for other environments - macrotask based on: - // - setImmediate - // - MessageChannel - // - window.postMessag - // - onreadystatechange - // - setTimeout - } else { - notify = function () { - // strange IE + webpack dev server bug - use .call(global) - macrotask.call(global, flush); - }; - } - - return function (fn) { - var task = { fn: fn, next: undefined }; - if (last) last.next = task; - if (!head) { - head = task; - notify(); - } last = task; - }; - }; - - -/***/ }), -/* 211 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // 25.4.1.5 NewPromiseCapability(C) - var aFunction = __webpack_require__(21); - - function PromiseCapability(C) { - var resolve, reject; - this.promise = new C(function ($$resolve, $$reject) { - if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); - resolve = $$resolve; - reject = $$reject; - }); - this.resolve = aFunction(resolve); - this.reject = aFunction(reject); - } - - module.exports.f = function (C) { - return new PromiseCapability(C); - }; - - -/***/ }), -/* 212 */ -/***/ (function(module, exports) { - - module.exports = function (exec) { - try { - return { e: false, v: exec() }; - } catch (e) { - return { e: true, v: e }; - } - }; - - -/***/ }), -/* 213 */ -/***/ (function(module, exports, __webpack_require__) { - - var anObject = __webpack_require__(12); - var isObject = __webpack_require__(13); - var newPromiseCapability = __webpack_require__(211); - - module.exports = function (C, x) { - anObject(C); - if (isObject(x) && x.constructor === C) return x; - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; - }; - - -/***/ }), -/* 214 */ -/***/ (function(module, exports, __webpack_require__) { - - var redefine = __webpack_require__(18); - module.exports = function (target, src, safe) { - for (var key in src) redefine(target, key, src[key], safe); - return target; - }; - - -/***/ }), -/* 215 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var strong = __webpack_require__(216); - var validate = __webpack_require__(217); - var MAP = 'Map'; - - // 23.1 Map Objects - module.exports = __webpack_require__(218)(MAP, function (get) { - return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; - }, { - // 23.1.3.6 Map.prototype.get(key) - get: function get(key) { - var entry = strong.getEntry(validate(this, MAP), key); - return entry && entry.v; - }, - // 23.1.3.9 Map.prototype.set(key, value) - set: function set(key, value) { - return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); - } - }, strong, true); - - -/***/ }), -/* 216 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var dP = __webpack_require__(11).f; - var create = __webpack_require__(45); - var redefineAll = __webpack_require__(214); - var ctx = __webpack_require__(20); - var anInstance = __webpack_require__(206); - var forOf = __webpack_require__(207); - var $iterDefine = __webpack_require__(128); - var step = __webpack_require__(195); - var setSpecies = __webpack_require__(193); - var DESCRIPTORS = __webpack_require__(6); - var fastKey = __webpack_require__(22).fastKey; - var validate = __webpack_require__(217); - var SIZE = DESCRIPTORS ? '_s' : 'size'; - - var getEntry = function (that, key) { - // fast case - var index = fastKey(key); - var entry; - if (index !== 'F') return that._i[index]; - // frozen object case - for (entry = that._f; entry; entry = entry.n) { - if (entry.k == key) return entry; - } - }; - - module.exports = { - getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { - var C = wrapper(function (that, iterable) { - anInstance(that, C, NAME, '_i'); - that._t = NAME; // collection type - that._i = create(null); // index - that._f = undefined; // first entry - that._l = undefined; // last entry - that[SIZE] = 0; // size - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - }); - redefineAll(C.prototype, { - // 23.1.3.1 Map.prototype.clear() - // 23.2.3.2 Set.prototype.clear() - clear: function clear() { - for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { - entry.r = true; - if (entry.p) entry.p = entry.p.n = undefined; - delete data[entry.i]; - } - that._f = that._l = undefined; - that[SIZE] = 0; - }, - // 23.1.3.3 Map.prototype.delete(key) - // 23.2.3.4 Set.prototype.delete(value) - 'delete': function (key) { - var that = validate(this, NAME); - var entry = getEntry(that, key); - if (entry) { - var next = entry.n; - var prev = entry.p; - delete that._i[entry.i]; - entry.r = true; - if (prev) prev.n = next; - if (next) next.p = prev; - if (that._f == entry) that._f = next; - if (that._l == entry) that._l = prev; - that[SIZE]--; - } return !!entry; - }, - // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) - // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) - forEach: function forEach(callbackfn /* , that = undefined */) { - validate(this, NAME); - var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - var entry; - while (entry = entry ? entry.n : this._f) { - f(entry.v, entry.k, this); - // revert to the last existing entry - while (entry && entry.r) entry = entry.p; - } - }, - // 23.1.3.7 Map.prototype.has(key) - // 23.2.3.7 Set.prototype.has(value) - has: function has(key) { - return !!getEntry(validate(this, NAME), key); - } - }); - if (DESCRIPTORS) dP(C.prototype, 'size', { - get: function () { - return validate(this, NAME)[SIZE]; - } - }); - return C; - }, - def: function (that, key, value) { - var entry = getEntry(that, key); - var prev, index; - // change existing entry - if (entry) { - entry.v = value; - // create new entry - } else { - that._l = entry = { - i: index = fastKey(key, true), // <- index - k: key, // <- key - v: value, // <- value - p: prev = that._l, // <- previous entry - n: undefined, // <- next entry - r: false // <- removed - }; - if (!that._f) that._f = entry; - if (prev) prev.n = entry; - that[SIZE]++; - // add to index - if (index !== 'F') that._i[index] = entry; - } return that; - }, - getEntry: getEntry, - setStrong: function (C, NAME, IS_MAP) { - // add .keys, .values, .entries, [@@iterator] - // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 - $iterDefine(C, NAME, function (iterated, kind) { - this._t = validate(iterated, NAME); // target - this._k = kind; // kind - this._l = undefined; // previous - }, function () { - var that = this; - var kind = that._k; - var entry = that._l; - // revert to the last existing entry - while (entry && entry.r) entry = entry.p; - // get next entry - if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { - // or finish the iteration - that._t = undefined; - return step(1); - } - // return step by kind - if (kind == 'keys') return step(0, entry.k); - if (kind == 'values') return step(0, entry.v); - return step(0, [entry.k, entry.v]); - }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); - - // add [@@species], 23.1.2.2, 23.2.2.2 - setSpecies(NAME); - } - }; - - -/***/ }), -/* 217 */ -/***/ (function(module, exports, __webpack_require__) { - - var isObject = __webpack_require__(13); - module.exports = function (it, TYPE) { - if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); - return it; - }; - - -/***/ }), -/* 218 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var global = __webpack_require__(4); - var $export = __webpack_require__(8); - var redefine = __webpack_require__(18); - var redefineAll = __webpack_require__(214); - var meta = __webpack_require__(22); - var forOf = __webpack_require__(207); - var anInstance = __webpack_require__(206); - var isObject = __webpack_require__(13); - var fails = __webpack_require__(7); - var $iterDetect = __webpack_require__(166); - var setToStringTag = __webpack_require__(24); - var inheritIfRequired = __webpack_require__(87); - - module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { - var Base = global[NAME]; - var C = Base; - var ADDER = IS_MAP ? 'set' : 'add'; - var proto = C && C.prototype; - var O = {}; - var fixMethod = function (KEY) { - var fn = proto[KEY]; - redefine(proto, KEY, - KEY == 'delete' ? function (a) { - return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'has' ? function has(a) { - return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'get' ? function get(a) { - return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } - : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } - ); - }; - if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { - new C().entries().next(); - }))) { - // create collection constructor - C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); - redefineAll(C.prototype, methods); - meta.NEED = true; - } else { - var instance = new C(); - // early implementations not supports chaining - var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; - // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false - var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); - // most early implementations doesn't supports iterables, most modern - not close it correctly - var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new - // for early implementations -0 and +0 not the same - var BUGGY_ZERO = !IS_WEAK && fails(function () { - // V8 ~ Chromium 42- fails only with 5+ elements - var $instance = new C(); - var index = 5; - while (index--) $instance[ADDER](index, index); - return !$instance.has(-0); - }); - if (!ACCEPT_ITERABLES) { - C = wrapper(function (target, iterable) { - anInstance(target, C, NAME); - var that = inheritIfRequired(new Base(), target, C); - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - return that; - }); - C.prototype = proto; - proto.constructor = C; - } - if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { - fixMethod('delete'); - fixMethod('has'); - IS_MAP && fixMethod('get'); - } - if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); - // weak collections should not contains .clear method - if (IS_WEAK && proto.clear) delete proto.clear; - } - - setToStringTag(C, NAME); - - O[NAME] = C; - $export($export.G + $export.W + $export.F * (C != Base), O); - - if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); - - return C; - }; - - -/***/ }), -/* 219 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var strong = __webpack_require__(216); - var validate = __webpack_require__(217); - var SET = 'Set'; - - // 23.2 Set Objects - module.exports = __webpack_require__(218)(SET, function (get) { - return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; - }, { - // 23.2.3.1 Set.prototype.add(value) - add: function add(value) { - return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); - } - }, strong); - - -/***/ }), -/* 220 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var each = __webpack_require__(173)(0); - var redefine = __webpack_require__(18); - var meta = __webpack_require__(22); - var assign = __webpack_require__(68); - var weak = __webpack_require__(221); - var isObject = __webpack_require__(13); - var fails = __webpack_require__(7); - var validate = __webpack_require__(217); - var WEAK_MAP = 'WeakMap'; - var getWeak = meta.getWeak; - var isExtensible = Object.isExtensible; - var uncaughtFrozenStore = weak.ufstore; - var tmp = {}; - var InternalMap; - - var wrapper = function (get) { - return function WeakMap() { - return get(this, arguments.length > 0 ? arguments[0] : undefined); - }; - }; - - var methods = { - // 23.3.3.3 WeakMap.prototype.get(key) - get: function get(key) { - if (isObject(key)) { - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); - return data ? data[this._i] : undefined; - } - }, - // 23.3.3.5 WeakMap.prototype.set(key, value) - set: function set(key, value) { - return weak.def(validate(this, WEAK_MAP), key, value); - } - }; - - // 23.3 WeakMap Objects - var $WeakMap = module.exports = __webpack_require__(218)(WEAK_MAP, wrapper, methods, weak, true, true); - - // IE11 WeakMap frozen keys fix - if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { - InternalMap = weak.getConstructor(wrapper, WEAK_MAP); - assign(InternalMap.prototype, methods); - meta.NEED = true; - each(['delete', 'has', 'get', 'set'], function (key) { - var proto = $WeakMap.prototype; - var method = proto[key]; - redefine(proto, key, function (a, b) { - // store frozen objects on internal weakmap shim - if (isObject(a) && !isExtensible(a)) { - if (!this._f) this._f = new InternalMap(); - var result = this._f[key](a, b); - return key == 'set' ? this : result; - // store all the rest on native weakmap - } return method.call(this, a, b); - }); - }); - } - - -/***/ }), -/* 221 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var redefineAll = __webpack_require__(214); - var getWeak = __webpack_require__(22).getWeak; - var anObject = __webpack_require__(12); - var isObject = __webpack_require__(13); - var anInstance = __webpack_require__(206); - var forOf = __webpack_require__(207); - var createArrayMethod = __webpack_require__(173); - var $has = __webpack_require__(5); - var validate = __webpack_require__(217); - var arrayFind = createArrayMethod(5); - var arrayFindIndex = createArrayMethod(6); - var id = 0; - - // fallback for uncaught frozen keys - var uncaughtFrozenStore = function (that) { - return that._l || (that._l = new UncaughtFrozenStore()); - }; - var UncaughtFrozenStore = function () { - this.a = []; - }; - var findUncaughtFrozen = function (store, key) { - return arrayFind(store.a, function (it) { - return it[0] === key; - }); - }; - UncaughtFrozenStore.prototype = { - get: function (key) { - var entry = findUncaughtFrozen(this, key); - if (entry) return entry[1]; - }, - has: function (key) { - return !!findUncaughtFrozen(this, key); - }, - set: function (key, value) { - var entry = findUncaughtFrozen(this, key); - if (entry) entry[1] = value; - else this.a.push([key, value]); - }, - 'delete': function (key) { - var index = arrayFindIndex(this.a, function (it) { - return it[0] === key; - }); - if (~index) this.a.splice(index, 1); - return !!~index; - } - }; - - module.exports = { - getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { - var C = wrapper(function (that, iterable) { - anInstance(that, C, NAME, '_i'); - that._t = NAME; // collection type - that._i = id++; // collection id - that._l = undefined; // leak store for uncaught frozen objects - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - }); - redefineAll(C.prototype, { - // 23.3.3.2 WeakMap.prototype.delete(key) - // 23.4.3.3 WeakSet.prototype.delete(value) - 'delete': function (key) { - if (!isObject(key)) return false; - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); - return data && $has(data, this._i) && delete data[this._i]; - }, - // 23.3.3.4 WeakMap.prototype.has(key) - // 23.4.3.4 WeakSet.prototype.has(value) - has: function has(key) { - if (!isObject(key)) return false; - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); - return data && $has(data, this._i); - } - }); - return C; - }, - def: function (that, key, value) { - var data = getWeak(anObject(key), true); - if (data === true) uncaughtFrozenStore(that).set(key, value); - else data[that._i] = value; - return that; - }, - ufstore: uncaughtFrozenStore - }; - - -/***/ }), -/* 222 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var weak = __webpack_require__(221); - var validate = __webpack_require__(217); - var WEAK_SET = 'WeakSet'; - - // 23.4 WeakSet Objects - __webpack_require__(218)(WEAK_SET, function (get) { - return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; - }, { - // 23.4.3.1 WeakSet.prototype.add(value) - add: function add(value) { - return weak.def(validate(this, WEAK_SET), value, true); - } - }, weak, false, true); - - -/***/ }), -/* 223 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var $typed = __webpack_require__(224); - var buffer = __webpack_require__(225); - var anObject = __webpack_require__(12); - var toAbsoluteIndex = __webpack_require__(39); - var toLength = __webpack_require__(37); - var isObject = __webpack_require__(13); - var ArrayBuffer = __webpack_require__(4).ArrayBuffer; - var speciesConstructor = __webpack_require__(208); - var $ArrayBuffer = buffer.ArrayBuffer; - var $DataView = buffer.DataView; - var $isView = $typed.ABV && ArrayBuffer.isView; - var $slice = $ArrayBuffer.prototype.slice; - var VIEW = $typed.VIEW; - var ARRAY_BUFFER = 'ArrayBuffer'; - - $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); - - $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { - // 24.1.3.1 ArrayBuffer.isView(arg) - isView: function isView(it) { - return $isView && $isView(it) || isObject(it) && VIEW in it; - } - }); - - $export($export.P + $export.U + $export.F * __webpack_require__(7)(function () { - return !new $ArrayBuffer(2).slice(1, undefined).byteLength; - }), ARRAY_BUFFER, { - // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) - slice: function slice(start, end) { - if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix - var len = anObject(this).byteLength; - var first = toAbsoluteIndex(start, len); - var final = toAbsoluteIndex(end === undefined ? len : end, len); - var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)); - var viewS = new $DataView(this); - var viewT = new $DataView(result); - var index = 0; - while (first < final) { - viewT.setUint8(index++, viewS.getUint8(first++)); - } return result; - } - }); - - __webpack_require__(193)(ARRAY_BUFFER); - - -/***/ }), -/* 224 */ -/***/ (function(module, exports, __webpack_require__) { - - var global = __webpack_require__(4); - var hide = __webpack_require__(10); - var uid = __webpack_require__(19); - var TYPED = uid('typed_array'); - var VIEW = uid('view'); - var ABV = !!(global.ArrayBuffer && global.DataView); - var CONSTR = ABV; - var i = 0; - var l = 9; - var Typed; - - var TypedArrayConstructors = ( - 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' - ).split(','); - - while (i < l) { - if (Typed = global[TypedArrayConstructors[i++]]) { - hide(Typed.prototype, TYPED, true); - hide(Typed.prototype, VIEW, true); - } else CONSTR = false; - } - - module.exports = { - ABV: ABV, - CONSTR: CONSTR, - TYPED: TYPED, - VIEW: VIEW - }; - - -/***/ }), -/* 225 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var global = __webpack_require__(4); - var DESCRIPTORS = __webpack_require__(6); - var LIBRARY = __webpack_require__(28); - var $typed = __webpack_require__(224); - var hide = __webpack_require__(10); - var redefineAll = __webpack_require__(214); - var fails = __webpack_require__(7); - var anInstance = __webpack_require__(206); - var toInteger = __webpack_require__(38); - var toLength = __webpack_require__(37); - var toIndex = __webpack_require__(226); - var gOPN = __webpack_require__(49).f; - var dP = __webpack_require__(11).f; - var arrayFill = __webpack_require__(189); - var setToStringTag = __webpack_require__(24); - var ARRAY_BUFFER = 'ArrayBuffer'; - var DATA_VIEW = 'DataView'; - var PROTOTYPE = 'prototype'; - var WRONG_LENGTH = 'Wrong length!'; - var WRONG_INDEX = 'Wrong index!'; - var $ArrayBuffer = global[ARRAY_BUFFER]; - var $DataView = global[DATA_VIEW]; - var Math = global.Math; - var RangeError = global.RangeError; - // eslint-disable-next-line no-shadow-restricted-names - var Infinity = global.Infinity; - var BaseBuffer = $ArrayBuffer; - var abs = Math.abs; - var pow = Math.pow; - var floor = Math.floor; - var log = Math.log; - var LN2 = Math.LN2; - var BUFFER = 'buffer'; - var BYTE_LENGTH = 'byteLength'; - var BYTE_OFFSET = 'byteOffset'; - var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; - var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; - var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; - - // IEEE754 conversions based on https://github.com/feross/ieee754 - function packIEEE754(value, mLen, nBytes) { - var buffer = Array(nBytes); - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; - var i = 0; - var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; - var e, m, c; - value = abs(value); - // eslint-disable-next-line no-self-compare - if (value != value || value === Infinity) { - // eslint-disable-next-line no-self-compare - m = value != value ? 1 : 0; - e = eMax; - } else { - e = floor(log(value) / LN2); - if (value * (c = pow(2, -e)) < 1) { - e--; - c *= 2; - } - if (e + eBias >= 1) { - value += rt / c; - } else { - value += rt * pow(2, 1 - eBias); - } - if (value * c >= 2) { - e++; - c /= 2; - } - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * pow(2, mLen); - e = e + eBias; - } else { - m = value * pow(2, eBias - 1) * pow(2, mLen); - e = 0; - } - } - for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); - e = e << mLen | m; - eLen += mLen; - for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); - buffer[--i] |= s * 128; - return buffer; - } - function unpackIEEE754(buffer, mLen, nBytes) { - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var nBits = eLen - 7; - var i = nBytes - 1; - var s = buffer[i--]; - var e = s & 127; - var m; - s >>= 7; - for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); - m = e & (1 << -nBits) - 1; - e >>= -nBits; - nBits += mLen; - for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : s ? -Infinity : Infinity; - } else { - m = m + pow(2, mLen); - e = e - eBias; - } return (s ? -1 : 1) * m * pow(2, e - mLen); - } - - function unpackI32(bytes) { - return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; - } - function packI8(it) { - return [it & 0xff]; - } - function packI16(it) { - return [it & 0xff, it >> 8 & 0xff]; - } - function packI32(it) { - return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; - } - function packF64(it) { - return packIEEE754(it, 52, 8); - } - function packF32(it) { - return packIEEE754(it, 23, 4); - } - - function addGetter(C, key, internal) { - dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); - } - - function get(view, bytes, index, isLittleEndian) { - var numIndex = +index; - var intIndex = toIndex(numIndex); - if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); - var store = view[$BUFFER]._b; - var start = intIndex + view[$OFFSET]; - var pack = store.slice(start, start + bytes); - return isLittleEndian ? pack : pack.reverse(); - } - function set(view, bytes, index, conversion, value, isLittleEndian) { - var numIndex = +index; - var intIndex = toIndex(numIndex); - if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); - var store = view[$BUFFER]._b; - var start = intIndex + view[$OFFSET]; - var pack = conversion(+value); - for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; - } - - if (!$typed.ABV) { - $ArrayBuffer = function ArrayBuffer(length) { - anInstance(this, $ArrayBuffer, ARRAY_BUFFER); - var byteLength = toIndex(length); - this._b = arrayFill.call(Array(byteLength), 0); - this[$LENGTH] = byteLength; - }; - - $DataView = function DataView(buffer, byteOffset, byteLength) { - anInstance(this, $DataView, DATA_VIEW); - anInstance(buffer, $ArrayBuffer, DATA_VIEW); - var bufferLength = buffer[$LENGTH]; - var offset = toInteger(byteOffset); - if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); - byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); - if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); - this[$BUFFER] = buffer; - this[$OFFSET] = offset; - this[$LENGTH] = byteLength; - }; - - if (DESCRIPTORS) { - addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); - addGetter($DataView, BUFFER, '_b'); - addGetter($DataView, BYTE_LENGTH, '_l'); - addGetter($DataView, BYTE_OFFSET, '_o'); - } - - redefineAll($DataView[PROTOTYPE], { - getInt8: function getInt8(byteOffset) { - return get(this, 1, byteOffset)[0] << 24 >> 24; - }, - getUint8: function getUint8(byteOffset) { - return get(this, 1, byteOffset)[0]; - }, - getInt16: function getInt16(byteOffset /* , littleEndian */) { - var bytes = get(this, 2, byteOffset, arguments[1]); - return (bytes[1] << 8 | bytes[0]) << 16 >> 16; - }, - getUint16: function getUint16(byteOffset /* , littleEndian */) { - var bytes = get(this, 2, byteOffset, arguments[1]); - return bytes[1] << 8 | bytes[0]; - }, - getInt32: function getInt32(byteOffset /* , littleEndian */) { - return unpackI32(get(this, 4, byteOffset, arguments[1])); - }, - getUint32: function getUint32(byteOffset /* , littleEndian */) { - return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; - }, - getFloat32: function getFloat32(byteOffset /* , littleEndian */) { - return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); - }, - getFloat64: function getFloat64(byteOffset /* , littleEndian */) { - return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); - }, - setInt8: function setInt8(byteOffset, value) { - set(this, 1, byteOffset, packI8, value); - }, - setUint8: function setUint8(byteOffset, value) { - set(this, 1, byteOffset, packI8, value); - }, - setInt16: function setInt16(byteOffset, value /* , littleEndian */) { - set(this, 2, byteOffset, packI16, value, arguments[2]); - }, - setUint16: function setUint16(byteOffset, value /* , littleEndian */) { - set(this, 2, byteOffset, packI16, value, arguments[2]); - }, - setInt32: function setInt32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packI32, value, arguments[2]); - }, - setUint32: function setUint32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packI32, value, arguments[2]); - }, - setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packF32, value, arguments[2]); - }, - setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { - set(this, 8, byteOffset, packF64, value, arguments[2]); - } - }); - } else { - if (!fails(function () { - $ArrayBuffer(1); - }) || !fails(function () { - new $ArrayBuffer(-1); // eslint-disable-line no-new - }) || fails(function () { - new $ArrayBuffer(); // eslint-disable-line no-new - new $ArrayBuffer(1.5); // eslint-disable-line no-new - new $ArrayBuffer(NaN); // eslint-disable-line no-new - return $ArrayBuffer.name != ARRAY_BUFFER; - })) { - $ArrayBuffer = function ArrayBuffer(length) { - anInstance(this, $ArrayBuffer); - return new BaseBuffer(toIndex(length)); - }; - var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; - for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { - if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); - } - if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; - } - // iOS Safari 7.x bug - var view = new $DataView(new $ArrayBuffer(2)); - var $setInt8 = $DataView[PROTOTYPE].setInt8; - view.setInt8(0, 2147483648); - view.setInt8(1, 2147483649); - if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { - setInt8: function setInt8(byteOffset, value) { - $setInt8.call(this, byteOffset, value << 24 >> 24); - }, - setUint8: function setUint8(byteOffset, value) { - $setInt8.call(this, byteOffset, value << 24 >> 24); - } - }, true); - } - setToStringTag($ArrayBuffer, ARRAY_BUFFER); - setToStringTag($DataView, DATA_VIEW); - hide($DataView[PROTOTYPE], $typed.VIEW, true); - exports[ARRAY_BUFFER] = $ArrayBuffer; - exports[DATA_VIEW] = $DataView; - - -/***/ }), -/* 226 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://tc39.github.io/ecma262/#sec-toindex - var toInteger = __webpack_require__(38); - var toLength = __webpack_require__(37); - module.exports = function (it) { - if (it === undefined) return 0; - var number = toInteger(it); - var length = toLength(number); - if (number !== length) throw RangeError('Wrong length!'); - return length; - }; - - -/***/ }), -/* 227 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - $export($export.G + $export.W + $export.F * !__webpack_require__(224).ABV, { - DataView: __webpack_require__(225).DataView - }); - - -/***/ }), -/* 228 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(229)('Int8', 1, function (init) { - return function Int8Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; - }); - - -/***/ }), -/* 229 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - if (__webpack_require__(6)) { - var LIBRARY = __webpack_require__(28); - var global = __webpack_require__(4); - var fails = __webpack_require__(7); - var $export = __webpack_require__(8); - var $typed = __webpack_require__(224); - var $buffer = __webpack_require__(225); - var ctx = __webpack_require__(20); - var anInstance = __webpack_require__(206); - var propertyDesc = __webpack_require__(17); - var hide = __webpack_require__(10); - var redefineAll = __webpack_require__(214); - var toInteger = __webpack_require__(38); - var toLength = __webpack_require__(37); - var toIndex = __webpack_require__(226); - var toAbsoluteIndex = __webpack_require__(39); - var toPrimitive = __webpack_require__(16); - var has = __webpack_require__(5); - var classof = __webpack_require__(74); - var isObject = __webpack_require__(13); - var toObject = __webpack_require__(57); - var isArrayIter = __webpack_require__(163); - var create = __webpack_require__(45); - var getPrototypeOf = __webpack_require__(58); - var gOPN = __webpack_require__(49).f; - var getIterFn = __webpack_require__(165); - var uid = __webpack_require__(19); - var wks = __webpack_require__(25); - var createArrayMethod = __webpack_require__(173); - var createArrayIncludes = __webpack_require__(36); - var speciesConstructor = __webpack_require__(208); - var ArrayIterators = __webpack_require__(194); - var Iterators = __webpack_require__(129); - var $iterDetect = __webpack_require__(166); - var setSpecies = __webpack_require__(193); - var arrayFill = __webpack_require__(189); - var arrayCopyWithin = __webpack_require__(186); - var $DP = __webpack_require__(11); - var $GOPD = __webpack_require__(50); - var dP = $DP.f; - var gOPD = $GOPD.f; - var RangeError = global.RangeError; - var TypeError = global.TypeError; - var Uint8Array = global.Uint8Array; - var ARRAY_BUFFER = 'ArrayBuffer'; - var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; - var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; - var PROTOTYPE = 'prototype'; - var ArrayProto = Array[PROTOTYPE]; - var $ArrayBuffer = $buffer.ArrayBuffer; - var $DataView = $buffer.DataView; - var arrayForEach = createArrayMethod(0); - var arrayFilter = createArrayMethod(2); - var arraySome = createArrayMethod(3); - var arrayEvery = createArrayMethod(4); - var arrayFind = createArrayMethod(5); - var arrayFindIndex = createArrayMethod(6); - var arrayIncludes = createArrayIncludes(true); - var arrayIndexOf = createArrayIncludes(false); - var arrayValues = ArrayIterators.values; - var arrayKeys = ArrayIterators.keys; - var arrayEntries = ArrayIterators.entries; - var arrayLastIndexOf = ArrayProto.lastIndexOf; - var arrayReduce = ArrayProto.reduce; - var arrayReduceRight = ArrayProto.reduceRight; - var arrayJoin = ArrayProto.join; - var arraySort = ArrayProto.sort; - var arraySlice = ArrayProto.slice; - var arrayToString = ArrayProto.toString; - var arrayToLocaleString = ArrayProto.toLocaleString; - var ITERATOR = wks('iterator'); - var TAG = wks('toStringTag'); - var TYPED_CONSTRUCTOR = uid('typed_constructor'); - var DEF_CONSTRUCTOR = uid('def_constructor'); - var ALL_CONSTRUCTORS = $typed.CONSTR; - var TYPED_ARRAY = $typed.TYPED; - var VIEW = $typed.VIEW; - var WRONG_LENGTH = 'Wrong length!'; - - var $map = createArrayMethod(1, function (O, length) { - return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); - }); - - var LITTLE_ENDIAN = fails(function () { - // eslint-disable-next-line no-undef - return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; - }); - - var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { - new Uint8Array(1).set({}); - }); - - var toOffset = function (it, BYTES) { - var offset = toInteger(it); - if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); - return offset; - }; - - var validate = function (it) { - if (isObject(it) && TYPED_ARRAY in it) return it; - throw TypeError(it + ' is not a typed array!'); - }; - - var allocate = function (C, length) { - if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { - throw TypeError('It is not a typed array constructor!'); - } return new C(length); - }; - - var speciesFromList = function (O, list) { - return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); - }; - - var fromList = function (C, list) { - var index = 0; - var length = list.length; - var result = allocate(C, length); - while (length > index) result[index] = list[index++]; - return result; - }; - - var addGetter = function (it, key, internal) { - dP(it, key, { get: function () { return this._d[internal]; } }); - }; - - var $from = function from(source /* , mapfn, thisArg */) { - var O = toObject(source); - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var iterFn = getIterFn(O); - var i, length, values, result, step, iterator; - if (iterFn != undefined && !isArrayIter(iterFn)) { - for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { - values.push(step.value); - } O = values; - } - if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); - for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { - result[i] = mapping ? mapfn(O[i], i) : O[i]; - } - return result; - }; - - var $of = function of(/* ...items */) { - var index = 0; - var length = arguments.length; - var result = allocate(this, length); - while (length > index) result[index] = arguments[index++]; - return result; - }; - - // iOS Safari 6.x fails here - var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); - - var $toLocaleString = function toLocaleString() { - return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); - }; - - var proto = { - copyWithin: function copyWithin(target, start /* , end */) { - return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); - }, - every: function every(callbackfn /* , thisArg */) { - return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars - return arrayFill.apply(validate(this), arguments); - }, - filter: function filter(callbackfn /* , thisArg */) { - return speciesFromList(this, arrayFilter(validate(this), callbackfn, - arguments.length > 1 ? arguments[1] : undefined)); - }, - find: function find(predicate /* , thisArg */) { - return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); - }, - findIndex: function findIndex(predicate /* , thisArg */) { - return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); - }, - forEach: function forEach(callbackfn /* , thisArg */) { - arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - indexOf: function indexOf(searchElement /* , fromIndex */) { - return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); - }, - includes: function includes(searchElement /* , fromIndex */) { - return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); - }, - join: function join(separator) { // eslint-disable-line no-unused-vars - return arrayJoin.apply(validate(this), arguments); - }, - lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars - return arrayLastIndexOf.apply(validate(this), arguments); - }, - map: function map(mapfn /* , thisArg */) { - return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); - }, - reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars - return arrayReduce.apply(validate(this), arguments); - }, - reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars - return arrayReduceRight.apply(validate(this), arguments); - }, - reverse: function reverse() { - var that = this; - var length = validate(that).length; - var middle = Math.floor(length / 2); - var index = 0; - var value; - while (index < middle) { - value = that[index]; - that[index++] = that[--length]; - that[length] = value; - } return that; - }, - some: function some(callbackfn /* , thisArg */) { - return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - sort: function sort(comparefn) { - return arraySort.call(validate(this), comparefn); - }, - subarray: function subarray(begin, end) { - var O = validate(this); - var length = O.length; - var $begin = toAbsoluteIndex(begin, length); - return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( - O.buffer, - O.byteOffset + $begin * O.BYTES_PER_ELEMENT, - toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) - ); - } - }; - - var $slice = function slice(start, end) { - return speciesFromList(this, arraySlice.call(validate(this), start, end)); - }; - - var $set = function set(arrayLike /* , offset */) { - validate(this); - var offset = toOffset(arguments[1], 1); - var length = this.length; - var src = toObject(arrayLike); - var len = toLength(src.length); - var index = 0; - if (len + offset > length) throw RangeError(WRONG_LENGTH); - while (index < len) this[offset + index] = src[index++]; - }; - - var $iterators = { - entries: function entries() { - return arrayEntries.call(validate(this)); - }, - keys: function keys() { - return arrayKeys.call(validate(this)); - }, - values: function values() { - return arrayValues.call(validate(this)); - } - }; - - var isTAIndex = function (target, key) { - return isObject(target) - && target[TYPED_ARRAY] - && typeof key != 'symbol' - && key in target - && String(+key) == String(key); - }; - var $getDesc = function getOwnPropertyDescriptor(target, key) { - return isTAIndex(target, key = toPrimitive(key, true)) - ? propertyDesc(2, target[key]) - : gOPD(target, key); - }; - var $setDesc = function defineProperty(target, key, desc) { - if (isTAIndex(target, key = toPrimitive(key, true)) - && isObject(desc) - && has(desc, 'value') - && !has(desc, 'get') - && !has(desc, 'set') - // TODO: add validation descriptor w/o calling accessors - && !desc.configurable - && (!has(desc, 'writable') || desc.writable) - && (!has(desc, 'enumerable') || desc.enumerable) - ) { - target[key] = desc.value; - return target; - } return dP(target, key, desc); - }; - - if (!ALL_CONSTRUCTORS) { - $GOPD.f = $getDesc; - $DP.f = $setDesc; - } - - $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { - getOwnPropertyDescriptor: $getDesc, - defineProperty: $setDesc - }); - - if (fails(function () { arrayToString.call({}); })) { - arrayToString = arrayToLocaleString = function toString() { - return arrayJoin.call(this); - }; - } - - var $TypedArrayPrototype$ = redefineAll({}, proto); - redefineAll($TypedArrayPrototype$, $iterators); - hide($TypedArrayPrototype$, ITERATOR, $iterators.values); - redefineAll($TypedArrayPrototype$, { - slice: $slice, - set: $set, - constructor: function () { /* noop */ }, - toString: arrayToString, - toLocaleString: $toLocaleString - }); - addGetter($TypedArrayPrototype$, 'buffer', 'b'); - addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); - addGetter($TypedArrayPrototype$, 'byteLength', 'l'); - addGetter($TypedArrayPrototype$, 'length', 'e'); - dP($TypedArrayPrototype$, TAG, { - get: function () { return this[TYPED_ARRAY]; } - }); - - // eslint-disable-next-line max-statements - module.exports = function (KEY, BYTES, wrapper, CLAMPED) { - CLAMPED = !!CLAMPED; - var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; - var GETTER = 'get' + KEY; - var SETTER = 'set' + KEY; - var TypedArray = global[NAME]; - var Base = TypedArray || {}; - var TAC = TypedArray && getPrototypeOf(TypedArray); - var FORCED = !TypedArray || !$typed.ABV; - var O = {}; - var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; - var getter = function (that, index) { - var data = that._d; - return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); - }; - var setter = function (that, index, value) { - var data = that._d; - if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; - data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); - }; - var addElement = function (that, index) { - dP(that, index, { - get: function () { - return getter(this, index); - }, - set: function (value) { - return setter(this, index, value); - }, - enumerable: true - }); - }; - if (FORCED) { - TypedArray = wrapper(function (that, data, $offset, $length) { - anInstance(that, TypedArray, NAME, '_d'); - var index = 0; - var offset = 0; - var buffer, byteLength, length, klass; - if (!isObject(data)) { - length = toIndex(data); - byteLength = length * BYTES; - buffer = new $ArrayBuffer(byteLength); - } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { - buffer = data; - offset = toOffset($offset, BYTES); - var $len = data.byteLength; - if ($length === undefined) { - if ($len % BYTES) throw RangeError(WRONG_LENGTH); - byteLength = $len - offset; - if (byteLength < 0) throw RangeError(WRONG_LENGTH); - } else { - byteLength = toLength($length) * BYTES; - if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); - } - length = byteLength / BYTES; - } else if (TYPED_ARRAY in data) { - return fromList(TypedArray, data); - } else { - return $from.call(TypedArray, data); - } - hide(that, '_d', { - b: buffer, - o: offset, - l: byteLength, - e: length, - v: new $DataView(buffer) - }); - while (index < length) addElement(that, index++); - }); - TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); - hide(TypedArrayPrototype, 'constructor', TypedArray); - } else if (!fails(function () { - TypedArray(1); - }) || !fails(function () { - new TypedArray(-1); // eslint-disable-line no-new - }) || !$iterDetect(function (iter) { - new TypedArray(); // eslint-disable-line no-new - new TypedArray(null); // eslint-disable-line no-new - new TypedArray(1.5); // eslint-disable-line no-new - new TypedArray(iter); // eslint-disable-line no-new - }, true)) { - TypedArray = wrapper(function (that, data, $offset, $length) { - anInstance(that, TypedArray, NAME); - var klass; - // `ws` module bug, temporarily remove validation length for Uint8Array - // https://github.com/websockets/ws/pull/645 - if (!isObject(data)) return new Base(toIndex(data)); - if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { - return $length !== undefined - ? new Base(data, toOffset($offset, BYTES), $length) - : $offset !== undefined - ? new Base(data, toOffset($offset, BYTES)) - : new Base(data); - } - if (TYPED_ARRAY in data) return fromList(TypedArray, data); - return $from.call(TypedArray, data); - }); - arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { - if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); - }); - TypedArray[PROTOTYPE] = TypedArrayPrototype; - if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; - } - var $nativeIterator = TypedArrayPrototype[ITERATOR]; - var CORRECT_ITER_NAME = !!$nativeIterator - && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); - var $iterator = $iterators.values; - hide(TypedArray, TYPED_CONSTRUCTOR, true); - hide(TypedArrayPrototype, TYPED_ARRAY, NAME); - hide(TypedArrayPrototype, VIEW, true); - hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); - - if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { - dP(TypedArrayPrototype, TAG, { - get: function () { return NAME; } - }); - } - - O[NAME] = TypedArray; - - $export($export.G + $export.W + $export.F * (TypedArray != Base), O); - - $export($export.S, NAME, { - BYTES_PER_ELEMENT: BYTES - }); - - $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { - from: $from, - of: $of - }); - - if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); - - $export($export.P, NAME, proto); - - setSpecies(NAME); - - $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); - - $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); - - if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; - - $export($export.P + $export.F * fails(function () { - new TypedArray(1).slice(); - }), NAME, { slice: $slice }); - - $export($export.P + $export.F * (fails(function () { - return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); - }) || !fails(function () { - TypedArrayPrototype.toLocaleString.call([1, 2]); - })), NAME, { toLocaleString: $toLocaleString }); - - Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; - if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); - }; - } else module.exports = function () { /* empty */ }; - - -/***/ }), -/* 230 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(229)('Uint8', 1, function (init) { - return function Uint8Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; - }); - - -/***/ }), -/* 231 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(229)('Uint8', 1, function (init) { - return function Uint8ClampedArray(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; - }, true); - - -/***/ }), -/* 232 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(229)('Int16', 2, function (init) { - return function Int16Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; - }); - - -/***/ }), -/* 233 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(229)('Uint16', 2, function (init) { - return function Uint16Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; - }); - - -/***/ }), -/* 234 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(229)('Int32', 4, function (init) { - return function Int32Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; - }); - - -/***/ }), -/* 235 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(229)('Uint32', 4, function (init) { - return function Uint32Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; - }); - - -/***/ }), -/* 236 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(229)('Float32', 4, function (init) { - return function Float32Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; - }); - - -/***/ }), -/* 237 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(229)('Float64', 8, function (init) { - return function Float64Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; - }); - - -/***/ }), -/* 238 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) - var $export = __webpack_require__(8); - var aFunction = __webpack_require__(21); - var anObject = __webpack_require__(12); - var rApply = (__webpack_require__(4).Reflect || {}).apply; - var fApply = Function.apply; - // MS Edge argumentsList argument is optional - $export($export.S + $export.F * !__webpack_require__(7)(function () { - rApply(function () { /* empty */ }); - }), 'Reflect', { - apply: function apply(target, thisArgument, argumentsList) { - var T = aFunction(target); - var L = anObject(argumentsList); - return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); - } - }); - - -/***/ }), -/* 239 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) - var $export = __webpack_require__(8); - var create = __webpack_require__(45); - var aFunction = __webpack_require__(21); - var anObject = __webpack_require__(12); - var isObject = __webpack_require__(13); - var fails = __webpack_require__(7); - var bind = __webpack_require__(76); - var rConstruct = (__webpack_require__(4).Reflect || {}).construct; - - // MS Edge supports only 2 arguments and argumentsList argument is optional - // FF Nightly sets third argument as `new.target`, but does not create `this` from it - var NEW_TARGET_BUG = fails(function () { - function F() { /* empty */ } - return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); - }); - var ARGS_BUG = !fails(function () { - rConstruct(function () { /* empty */ }); - }); - - $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { - construct: function construct(Target, args /* , newTarget */) { - aFunction(Target); - anObject(args); - var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); - if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); - if (Target == newTarget) { - // w/o altered newTarget, optimization for 0-4 arguments - switch (args.length) { - case 0: return new Target(); - case 1: return new Target(args[0]); - case 2: return new Target(args[0], args[1]); - case 3: return new Target(args[0], args[1], args[2]); - case 4: return new Target(args[0], args[1], args[2], args[3]); - } - // w/o altered newTarget, lot of arguments case - var $args = [null]; - $args.push.apply($args, args); - return new (bind.apply(Target, $args))(); - } - // with altered newTarget, not support built-in constructors - var proto = newTarget.prototype; - var instance = create(isObject(proto) ? proto : Object.prototype); - var result = Function.apply.call(Target, instance, args); - return isObject(result) ? result : instance; - } - }); - - -/***/ }), -/* 240 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) - var dP = __webpack_require__(11); - var $export = __webpack_require__(8); - var anObject = __webpack_require__(12); - var toPrimitive = __webpack_require__(16); - - // MS Edge has broken Reflect.defineProperty - throwing instead of returning false - $export($export.S + $export.F * __webpack_require__(7)(function () { - // eslint-disable-next-line no-undef - Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); - }), 'Reflect', { - defineProperty: function defineProperty(target, propertyKey, attributes) { - anObject(target); - propertyKey = toPrimitive(propertyKey, true); - anObject(attributes); - try { - dP.f(target, propertyKey, attributes); - return true; - } catch (e) { - return false; - } - } - }); - - -/***/ }), -/* 241 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.4 Reflect.deleteProperty(target, propertyKey) - var $export = __webpack_require__(8); - var gOPD = __webpack_require__(50).f; - var anObject = __webpack_require__(12); - - $export($export.S, 'Reflect', { - deleteProperty: function deleteProperty(target, propertyKey) { - var desc = gOPD(anObject(target), propertyKey); - return desc && !desc.configurable ? false : delete target[propertyKey]; - } - }); - - -/***/ }), -/* 242 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // 26.1.5 Reflect.enumerate(target) - var $export = __webpack_require__(8); - var anObject = __webpack_require__(12); - var Enumerate = function (iterated) { - this._t = anObject(iterated); // target - this._i = 0; // next index - var keys = this._k = []; // keys - var key; - for (key in iterated) keys.push(key); - }; - __webpack_require__(130)(Enumerate, 'Object', function () { - var that = this; - var keys = that._k; - var key; - do { - if (that._i >= keys.length) return { value: undefined, done: true }; - } while (!((key = keys[that._i++]) in that._t)); - return { value: key, done: false }; - }); - - $export($export.S, 'Reflect', { - enumerate: function enumerate(target) { - return new Enumerate(target); - } - }); - - -/***/ }), -/* 243 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.6 Reflect.get(target, propertyKey [, receiver]) - var gOPD = __webpack_require__(50); - var getPrototypeOf = __webpack_require__(58); - var has = __webpack_require__(5); - var $export = __webpack_require__(8); - var isObject = __webpack_require__(13); - var anObject = __webpack_require__(12); - - function get(target, propertyKey /* , receiver */) { - var receiver = arguments.length < 3 ? target : arguments[2]; - var desc, proto; - if (anObject(target) === receiver) return target[propertyKey]; - if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') - ? desc.value - : desc.get !== undefined - ? desc.get.call(receiver) - : undefined; - if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); - } - - $export($export.S, 'Reflect', { get: get }); - - -/***/ }), -/* 244 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) - var gOPD = __webpack_require__(50); - var $export = __webpack_require__(8); - var anObject = __webpack_require__(12); - - $export($export.S, 'Reflect', { - getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { - return gOPD.f(anObject(target), propertyKey); - } - }); - - -/***/ }), -/* 245 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.8 Reflect.getPrototypeOf(target) - var $export = __webpack_require__(8); - var getProto = __webpack_require__(58); - var anObject = __webpack_require__(12); - - $export($export.S, 'Reflect', { - getPrototypeOf: function getPrototypeOf(target) { - return getProto(anObject(target)); - } - }); - - -/***/ }), -/* 246 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.9 Reflect.has(target, propertyKey) - var $export = __webpack_require__(8); - - $export($export.S, 'Reflect', { - has: function has(target, propertyKey) { - return propertyKey in target; - } - }); - - -/***/ }), -/* 247 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.10 Reflect.isExtensible(target) - var $export = __webpack_require__(8); - var anObject = __webpack_require__(12); - var $isExtensible = Object.isExtensible; - - $export($export.S, 'Reflect', { - isExtensible: function isExtensible(target) { - anObject(target); - return $isExtensible ? $isExtensible(target) : true; - } - }); - - -/***/ }), -/* 248 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.11 Reflect.ownKeys(target) - var $export = __webpack_require__(8); - - $export($export.S, 'Reflect', { ownKeys: __webpack_require__(249) }); - - -/***/ }), -/* 249 */ -/***/ (function(module, exports, __webpack_require__) { - - // all object keys, includes non-enumerable and symbols - var gOPN = __webpack_require__(49); - var gOPS = __webpack_require__(42); - var anObject = __webpack_require__(12); - var Reflect = __webpack_require__(4).Reflect; - module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { - var keys = gOPN.f(anObject(it)); - var getSymbols = gOPS.f; - return getSymbols ? keys.concat(getSymbols(it)) : keys; - }; - - -/***/ }), -/* 250 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.12 Reflect.preventExtensions(target) - var $export = __webpack_require__(8); - var anObject = __webpack_require__(12); - var $preventExtensions = Object.preventExtensions; - - $export($export.S, 'Reflect', { - preventExtensions: function preventExtensions(target) { - anObject(target); - try { - if ($preventExtensions) $preventExtensions(target); - return true; - } catch (e) { - return false; - } - } - }); - - -/***/ }), -/* 251 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) - var dP = __webpack_require__(11); - var gOPD = __webpack_require__(50); - var getPrototypeOf = __webpack_require__(58); - var has = __webpack_require__(5); - var $export = __webpack_require__(8); - var createDesc = __webpack_require__(17); - var anObject = __webpack_require__(12); - var isObject = __webpack_require__(13); - - function set(target, propertyKey, V /* , receiver */) { - var receiver = arguments.length < 4 ? target : arguments[3]; - var ownDesc = gOPD.f(anObject(target), propertyKey); - var existingDescriptor, proto; - if (!ownDesc) { - if (isObject(proto = getPrototypeOf(target))) { - return set(proto, propertyKey, V, receiver); - } - ownDesc = createDesc(0); - } - if (has(ownDesc, 'value')) { - if (ownDesc.writable === false || !isObject(receiver)) return false; - existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); - existingDescriptor.value = V; - dP.f(receiver, propertyKey, existingDescriptor); - return true; - } - return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); - } - - $export($export.S, 'Reflect', { set: set }); - - -/***/ }), -/* 252 */ -/***/ (function(module, exports, __webpack_require__) { - - // 26.1.14 Reflect.setPrototypeOf(target, proto) - var $export = __webpack_require__(8); - var setProto = __webpack_require__(72); - - if (setProto) $export($export.S, 'Reflect', { - setPrototypeOf: function setPrototypeOf(target, proto) { - setProto.check(target, proto); - try { - setProto.set(target, proto); - return true; - } catch (e) { - return false; - } - } - }); - - -/***/ }), -/* 253 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://github.com/tc39/Array.prototype.includes - var $export = __webpack_require__(8); - var $includes = __webpack_require__(36)(true); - - $export($export.P, 'Array', { - includes: function includes(el /* , fromIndex = 0 */) { - return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - __webpack_require__(187)('includes'); - - -/***/ }), -/* 254 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap - var $export = __webpack_require__(8); - var flattenIntoArray = __webpack_require__(255); - var toObject = __webpack_require__(57); - var toLength = __webpack_require__(37); - var aFunction = __webpack_require__(21); - var arraySpeciesCreate = __webpack_require__(174); - - $export($export.P, 'Array', { - flatMap: function flatMap(callbackfn /* , thisArg */) { - var O = toObject(this); - var sourceLen, A; - aFunction(callbackfn); - sourceLen = toLength(O.length); - A = arraySpeciesCreate(O, 0); - flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); - return A; - } - }); - - __webpack_require__(187)('flatMap'); - - -/***/ }), -/* 255 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray - var isArray = __webpack_require__(44); - var isObject = __webpack_require__(13); - var toLength = __webpack_require__(37); - var ctx = __webpack_require__(20); - var IS_CONCAT_SPREADABLE = __webpack_require__(25)('isConcatSpreadable'); - - function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { - var targetIndex = start; - var sourceIndex = 0; - var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; - var element, spreadable; - - while (sourceIndex < sourceLen) { - if (sourceIndex in source) { - element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; - - spreadable = false; - if (isObject(element)) { - spreadable = element[IS_CONCAT_SPREADABLE]; - spreadable = spreadable !== undefined ? !!spreadable : isArray(element); - } - - if (spreadable && depth > 0) { - targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; - } else { - if (targetIndex >= 0x1fffffffffffff) throw TypeError(); - target[targetIndex] = element; - } - - targetIndex++; - } - sourceIndex++; - } - return targetIndex; - } - - module.exports = flattenIntoArray; - - -/***/ }), -/* 256 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten - var $export = __webpack_require__(8); - var flattenIntoArray = __webpack_require__(255); - var toObject = __webpack_require__(57); - var toLength = __webpack_require__(37); - var toInteger = __webpack_require__(38); - var arraySpeciesCreate = __webpack_require__(174); - - $export($export.P, 'Array', { - flatten: function flatten(/* depthArg = 1 */) { - var depthArg = arguments[0]; - var O = toObject(this); - var sourceLen = toLength(O.length); - var A = arraySpeciesCreate(O, 0); - flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); - return A; - } - }); - - __webpack_require__(187)('flatten'); - - -/***/ }), -/* 257 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://github.com/mathiasbynens/String.prototype.at - var $export = __webpack_require__(8); - var $at = __webpack_require__(127)(true); - - $export($export.P, 'String', { - at: function at(pos) { - return $at(this, pos); - } - }); - - -/***/ }), -/* 258 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://github.com/tc39/proposal-string-pad-start-end - var $export = __webpack_require__(8); - var $pad = __webpack_require__(259); - - $export($export.P, 'String', { - padStart: function padStart(maxLength /* , fillString = ' ' */) { - return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); - } - }); - - -/***/ }), -/* 259 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/tc39/proposal-string-pad-start-end - var toLength = __webpack_require__(37); - var repeat = __webpack_require__(90); - var defined = __webpack_require__(35); - - module.exports = function (that, maxLength, fillString, left) { - var S = String(defined(that)); - var stringLength = S.length; - var fillStr = fillString === undefined ? ' ' : String(fillString); - var intMaxLength = toLength(maxLength); - if (intMaxLength <= stringLength || fillStr == '') return S; - var fillLen = intMaxLength - stringLength; - var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); - if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); - return left ? stringFiller + S : S + stringFiller; - }; - - -/***/ }), -/* 260 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://github.com/tc39/proposal-string-pad-start-end - var $export = __webpack_require__(8); - var $pad = __webpack_require__(259); - - $export($export.P, 'String', { - padEnd: function padEnd(maxLength /* , fillString = ' ' */) { - return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); - } - }); - - -/***/ }), -/* 261 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://github.com/sebmarkbage/ecmascript-string-left-right-trim - __webpack_require__(82)('trimLeft', function ($trim) { - return function trimLeft() { - return $trim(this, 1); - }; - }, 'trimStart'); - - -/***/ }), -/* 262 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://github.com/sebmarkbage/ecmascript-string-left-right-trim - __webpack_require__(82)('trimRight', function ($trim) { - return function trimRight() { - return $trim(this, 2); - }; - }, 'trimEnd'); - - -/***/ }), -/* 263 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://tc39.github.io/String.prototype.matchAll/ - var $export = __webpack_require__(8); - var defined = __webpack_require__(35); - var toLength = __webpack_require__(37); - var isRegExp = __webpack_require__(134); - var getFlags = __webpack_require__(197); - var RegExpProto = RegExp.prototype; - - var $RegExpStringIterator = function (regexp, string) { - this._r = regexp; - this._s = string; - }; - - __webpack_require__(130)($RegExpStringIterator, 'RegExp String', function next() { - var match = this._r.exec(this._s); - return { value: match, done: match === null }; - }); - - $export($export.P, 'String', { - matchAll: function matchAll(regexp) { - defined(this); - if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); - var S = String(this); - var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); - var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); - rx.lastIndex = toLength(regexp.lastIndex); - return new $RegExpStringIterator(rx, S); - } - }); - - -/***/ }), -/* 264 */ -[884, 27], -/* 265 */ -[885, 27], -/* 266 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/tc39/proposal-object-getownpropertydescriptors - var $export = __webpack_require__(8); - var ownKeys = __webpack_require__(249); - var toIObject = __webpack_require__(32); - var gOPD = __webpack_require__(50); - var createProperty = __webpack_require__(164); - - $export($export.S, 'Object', { - getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { - var O = toIObject(object); - var getDesc = gOPD.f; - var keys = ownKeys(O); - var result = {}; - var i = 0; - var key, desc; - while (keys.length > i) { - desc = getDesc(O, key = keys[i++]); - if (desc !== undefined) createProperty(result, key, desc); - } - return result; - } - }); - - -/***/ }), -/* 267 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/tc39/proposal-object-values-entries - var $export = __webpack_require__(8); - var $values = __webpack_require__(268)(false); - - $export($export.S, 'Object', { - values: function values(it) { - return $values(it); - } - }); - - -/***/ }), -/* 268 */ -/***/ (function(module, exports, __webpack_require__) { - - var getKeys = __webpack_require__(30); - var toIObject = __webpack_require__(32); - var isEnum = __webpack_require__(43).f; - module.exports = function (isEntries) { - return function (it) { - var O = toIObject(it); - var keys = getKeys(O); - var length = keys.length; - var i = 0; - var result = []; - var key; - while (length > i) if (isEnum.call(O, key = keys[i++])) { - result.push(isEntries ? [key, O[key]] : O[key]); - } return result; - }; - }; - - -/***/ }), -/* 269 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/tc39/proposal-object-values-entries - var $export = __webpack_require__(8); - var $entries = __webpack_require__(268)(true); - - $export($export.S, 'Object', { - entries: function entries(it) { - return $entries(it); - } - }); - - -/***/ }), -/* 270 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var toObject = __webpack_require__(57); - var aFunction = __webpack_require__(21); - var $defineProperty = __webpack_require__(11); - - // B.2.2.2 Object.prototype.__defineGetter__(P, getter) - __webpack_require__(6) && $export($export.P + __webpack_require__(271), 'Object', { - __defineGetter__: function __defineGetter__(P, getter) { - $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); - } - }); - - -/***/ }), -/* 271 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // Forced replacement prototype accessors methods - module.exports = __webpack_require__(28) || !__webpack_require__(7)(function () { - var K = Math.random(); - // In FF throws only define methods - // eslint-disable-next-line no-undef, no-useless-call - __defineSetter__.call(null, K, function () { /* empty */ }); - delete __webpack_require__(4)[K]; - }); - - -/***/ }), -/* 272 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var toObject = __webpack_require__(57); - var aFunction = __webpack_require__(21); - var $defineProperty = __webpack_require__(11); - - // B.2.2.3 Object.prototype.__defineSetter__(P, setter) - __webpack_require__(6) && $export($export.P + __webpack_require__(271), 'Object', { - __defineSetter__: function __defineSetter__(P, setter) { - $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); - } - }); - - -/***/ }), -/* 273 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var toObject = __webpack_require__(57); - var toPrimitive = __webpack_require__(16); - var getPrototypeOf = __webpack_require__(58); - var getOwnPropertyDescriptor = __webpack_require__(50).f; - - // B.2.2.4 Object.prototype.__lookupGetter__(P) - __webpack_require__(6) && $export($export.P + __webpack_require__(271), 'Object', { - __lookupGetter__: function __lookupGetter__(P) { - var O = toObject(this); - var K = toPrimitive(P, true); - var D; - do { - if (D = getOwnPropertyDescriptor(O, K)) return D.get; - } while (O = getPrototypeOf(O)); - } - }); - - -/***/ }), -/* 274 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - var $export = __webpack_require__(8); - var toObject = __webpack_require__(57); - var toPrimitive = __webpack_require__(16); - var getPrototypeOf = __webpack_require__(58); - var getOwnPropertyDescriptor = __webpack_require__(50).f; - - // B.2.2.5 Object.prototype.__lookupSetter__(P) - __webpack_require__(6) && $export($export.P + __webpack_require__(271), 'Object', { - __lookupSetter__: function __lookupSetter__(P) { - var O = toObject(this); - var K = toPrimitive(P, true); - var D; - do { - if (D = getOwnPropertyDescriptor(O, K)) return D.set; - } while (O = getPrototypeOf(O)); - } - }); - - -/***/ }), -/* 275 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/DavidBruant/Map-Set.prototype.toJSON - var $export = __webpack_require__(8); - - $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(276)('Map') }); - - -/***/ }), -/* 276 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/DavidBruant/Map-Set.prototype.toJSON - var classof = __webpack_require__(74); - var from = __webpack_require__(277); - module.exports = function (NAME) { - return function toJSON() { - if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); - return from(this); - }; - }; - - -/***/ }), -/* 277 */ -/***/ (function(module, exports, __webpack_require__) { - - var forOf = __webpack_require__(207); - - module.exports = function (iter, ITERATOR) { - var result = []; - forOf(iter, false, result.push, result, ITERATOR); - return result; - }; - - -/***/ }), -/* 278 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/DavidBruant/Map-Set.prototype.toJSON - var $export = __webpack_require__(8); - - $export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(276)('Set') }); - - -/***/ }), -/* 279 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of - __webpack_require__(280)('Map'); - - -/***/ }), -/* 280 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://tc39.github.io/proposal-setmap-offrom/ - var $export = __webpack_require__(8); - - module.exports = function (COLLECTION) { - $export($export.S, COLLECTION, { of: function of() { - var length = arguments.length; - var A = Array(length); - while (length--) A[length] = arguments[length]; - return new this(A); - } }); - }; - - -/***/ }), -/* 281 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of - __webpack_require__(280)('Set'); - - -/***/ }), -/* 282 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of - __webpack_require__(280)('WeakMap'); - - -/***/ }), -/* 283 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of - __webpack_require__(280)('WeakSet'); - - -/***/ }), -/* 284 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from - __webpack_require__(285)('Map'); - - -/***/ }), -/* 285 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://tc39.github.io/proposal-setmap-offrom/ - var $export = __webpack_require__(8); - var aFunction = __webpack_require__(21); - var ctx = __webpack_require__(20); - var forOf = __webpack_require__(207); - - module.exports = function (COLLECTION) { - $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { - var mapFn = arguments[1]; - var mapping, A, n, cb; - aFunction(this); - mapping = mapFn !== undefined; - if (mapping) aFunction(mapFn); - if (source == undefined) return new this(); - A = []; - if (mapping) { - n = 0; - cb = ctx(mapFn, arguments[2], 2); - forOf(source, false, function (nextItem) { - A.push(cb(nextItem, n++)); - }); - } else { - forOf(source, false, A.push, A); - } - return new this(A); - } }); - }; - - -/***/ }), -/* 286 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from - __webpack_require__(285)('Set'); - - -/***/ }), -/* 287 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from - __webpack_require__(285)('WeakMap'); - - -/***/ }), -/* 288 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from - __webpack_require__(285)('WeakSet'); - - -/***/ }), -/* 289 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/tc39/proposal-global - var $export = __webpack_require__(8); - - $export($export.G, { global: __webpack_require__(4) }); - - -/***/ }), -/* 290 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/tc39/proposal-global - var $export = __webpack_require__(8); - - $export($export.S, 'System', { global: __webpack_require__(4) }); - - -/***/ }), -/* 291 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/ljharb/proposal-is-error - var $export = __webpack_require__(8); - var cof = __webpack_require__(34); - - $export($export.S, 'Error', { - isError: function isError(it) { - return cof(it) === 'Error'; - } - }); - - -/***/ }), -/* 292 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://rwaldron.github.io/proposal-math-extensions/ - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { - clamp: function clamp(x, lower, upper) { - return Math.min(upper, Math.max(lower, x)); - } - }); - - -/***/ }), -/* 293 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://rwaldron.github.io/proposal-math-extensions/ - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); - - -/***/ }), -/* 294 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://rwaldron.github.io/proposal-math-extensions/ - var $export = __webpack_require__(8); - var RAD_PER_DEG = 180 / Math.PI; - - $export($export.S, 'Math', { - degrees: function degrees(radians) { - return radians * RAD_PER_DEG; - } - }); - - -/***/ }), -/* 295 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://rwaldron.github.io/proposal-math-extensions/ - var $export = __webpack_require__(8); - var scale = __webpack_require__(296); - var fround = __webpack_require__(113); - - $export($export.S, 'Math', { - fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { - return fround(scale(x, inLow, inHigh, outLow, outHigh)); - } - }); - - -/***/ }), -/* 296 */ -/***/ (function(module, exports) { - - // https://rwaldron.github.io/proposal-math-extensions/ - module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { - if ( - arguments.length === 0 - // eslint-disable-next-line no-self-compare - || x != x - // eslint-disable-next-line no-self-compare - || inLow != inLow - // eslint-disable-next-line no-self-compare - || inHigh != inHigh - // eslint-disable-next-line no-self-compare - || outLow != outLow - // eslint-disable-next-line no-self-compare - || outHigh != outHigh - ) return NaN; - if (x === Infinity || x === -Infinity) return x; - return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; - }; - - -/***/ }), -/* 297 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { - iaddh: function iaddh(x0, x1, y0, y1) { - var $x0 = x0 >>> 0; - var $x1 = x1 >>> 0; - var $y0 = y0 >>> 0; - return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; - } - }); - - -/***/ }), -/* 298 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { - isubh: function isubh(x0, x1, y0, y1) { - var $x0 = x0 >>> 0; - var $x1 = x1 >>> 0; - var $y0 = y0 >>> 0; - return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; - } - }); - - -/***/ }), -/* 299 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { - imulh: function imulh(u, v) { - var UINT16 = 0xffff; - var $u = +u; - var $v = +v; - var u0 = $u & UINT16; - var v0 = $v & UINT16; - var u1 = $u >> 16; - var v1 = $v >> 16; - var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); - return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); - } - }); - - -/***/ }), -/* 300 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://rwaldron.github.io/proposal-math-extensions/ - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); - - -/***/ }), -/* 301 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://rwaldron.github.io/proposal-math-extensions/ - var $export = __webpack_require__(8); - var DEG_PER_RAD = Math.PI / 180; - - $export($export.S, 'Math', { - radians: function radians(degrees) { - return degrees * DEG_PER_RAD; - } - }); - - -/***/ }), -/* 302 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://rwaldron.github.io/proposal-math-extensions/ - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { scale: __webpack_require__(296) }); - - -/***/ }), -/* 303 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { - umulh: function umulh(u, v) { - var UINT16 = 0xffff; - var $u = +u; - var $v = +v; - var u0 = $u & UINT16; - var v0 = $v & UINT16; - var u1 = $u >>> 16; - var v1 = $v >>> 16; - var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); - return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); - } - }); - - -/***/ }), -/* 304 */ -/***/ (function(module, exports, __webpack_require__) { - - // http://jfbastien.github.io/papers/Math.signbit.html - var $export = __webpack_require__(8); - - $export($export.S, 'Math', { signbit: function signbit(x) { - // eslint-disable-next-line no-self-compare - return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; - } }); - - -/***/ }), -/* 305 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/tc39/proposal-promise-finally - 'use strict'; - var $export = __webpack_require__(8); - var core = __webpack_require__(9); - var global = __webpack_require__(4); - var speciesConstructor = __webpack_require__(208); - var promiseResolve = __webpack_require__(213); - - $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { - var C = speciesConstructor(this, core.Promise || global.Promise); - var isFunction = typeof onFinally == 'function'; - return this.then( - isFunction ? function (x) { - return promiseResolve(C, onFinally()).then(function () { return x; }); - } : onFinally, - isFunction ? function (e) { - return promiseResolve(C, onFinally()).then(function () { throw e; }); - } : onFinally - ); - } }); - - -/***/ }), -/* 306 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://github.com/tc39/proposal-promise-try - var $export = __webpack_require__(8); - var newPromiseCapability = __webpack_require__(211); - var perform = __webpack_require__(212); - - $export($export.S, 'Promise', { 'try': function (callbackfn) { - var promiseCapability = newPromiseCapability.f(this); - var result = perform(callbackfn); - (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); - return promiseCapability.promise; - } }); - - -/***/ }), -/* 307 */ -/***/ (function(module, exports, __webpack_require__) { - - var metadata = __webpack_require__(308); - var anObject = __webpack_require__(12); - var toMetaKey = metadata.key; - var ordinaryDefineOwnMetadata = metadata.set; - - metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { - ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); - } }); - - -/***/ }), -/* 308 */ -/***/ (function(module, exports, __webpack_require__) { - - var Map = __webpack_require__(215); - var $export = __webpack_require__(8); - var shared = __webpack_require__(23)('metadata'); - var store = shared.store || (shared.store = new (__webpack_require__(220))()); - - var getOrCreateMetadataMap = function (target, targetKey, create) { - var targetMetadata = store.get(target); - if (!targetMetadata) { - if (!create) return undefined; - store.set(target, targetMetadata = new Map()); - } - var keyMetadata = targetMetadata.get(targetKey); - if (!keyMetadata) { - if (!create) return undefined; - targetMetadata.set(targetKey, keyMetadata = new Map()); - } return keyMetadata; - }; - var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { - var metadataMap = getOrCreateMetadataMap(O, P, false); - return metadataMap === undefined ? false : metadataMap.has(MetadataKey); - }; - var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { - var metadataMap = getOrCreateMetadataMap(O, P, false); - return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); - }; - var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { - getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); - }; - var ordinaryOwnMetadataKeys = function (target, targetKey) { - var metadataMap = getOrCreateMetadataMap(target, targetKey, false); - var keys = []; - if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); - return keys; - }; - var toMetaKey = function (it) { - return it === undefined || typeof it == 'symbol' ? it : String(it); - }; - var exp = function (O) { - $export($export.S, 'Reflect', O); - }; - - module.exports = { - store: store, - map: getOrCreateMetadataMap, - has: ordinaryHasOwnMetadata, - get: ordinaryGetOwnMetadata, - set: ordinaryDefineOwnMetadata, - keys: ordinaryOwnMetadataKeys, - key: toMetaKey, - exp: exp - }; - - -/***/ }), -/* 309 */ -/***/ (function(module, exports, __webpack_require__) { - - var metadata = __webpack_require__(308); - var anObject = __webpack_require__(12); - var toMetaKey = metadata.key; - var getOrCreateMetadataMap = metadata.map; - var store = metadata.store; - - metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { - var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); - var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); - if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; - if (metadataMap.size) return true; - var targetMetadata = store.get(target); - targetMetadata['delete'](targetKey); - return !!targetMetadata.size || store['delete'](target); - } }); - - -/***/ }), -/* 310 */ -/***/ (function(module, exports, __webpack_require__) { - - var metadata = __webpack_require__(308); - var anObject = __webpack_require__(12); - var getPrototypeOf = __webpack_require__(58); - var ordinaryHasOwnMetadata = metadata.has; - var ordinaryGetOwnMetadata = metadata.get; - var toMetaKey = metadata.key; - - var ordinaryGetMetadata = function (MetadataKey, O, P) { - var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); - if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); - var parent = getPrototypeOf(O); - return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; - }; - - metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { - return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); - } }); - - -/***/ }), -/* 311 */ -/***/ (function(module, exports, __webpack_require__) { - - var Set = __webpack_require__(219); - var from = __webpack_require__(277); - var metadata = __webpack_require__(308); - var anObject = __webpack_require__(12); - var getPrototypeOf = __webpack_require__(58); - var ordinaryOwnMetadataKeys = metadata.keys; - var toMetaKey = metadata.key; - - var ordinaryMetadataKeys = function (O, P) { - var oKeys = ordinaryOwnMetadataKeys(O, P); - var parent = getPrototypeOf(O); - if (parent === null) return oKeys; - var pKeys = ordinaryMetadataKeys(parent, P); - return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; - }; - - metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { - return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); - } }); - - -/***/ }), -/* 312 */ -/***/ (function(module, exports, __webpack_require__) { - - var metadata = __webpack_require__(308); - var anObject = __webpack_require__(12); - var ordinaryGetOwnMetadata = metadata.get; - var toMetaKey = metadata.key; - - metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { - return ordinaryGetOwnMetadata(metadataKey, anObject(target) - , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); - } }); - - -/***/ }), -/* 313 */ -/***/ (function(module, exports, __webpack_require__) { - - var metadata = __webpack_require__(308); - var anObject = __webpack_require__(12); - var ordinaryOwnMetadataKeys = metadata.keys; - var toMetaKey = metadata.key; - - metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { - return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); - } }); - - -/***/ }), -/* 314 */ -/***/ (function(module, exports, __webpack_require__) { - - var metadata = __webpack_require__(308); - var anObject = __webpack_require__(12); - var getPrototypeOf = __webpack_require__(58); - var ordinaryHasOwnMetadata = metadata.has; - var toMetaKey = metadata.key; - - var ordinaryHasMetadata = function (MetadataKey, O, P) { - var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); - if (hasOwn) return true; - var parent = getPrototypeOf(O); - return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; - }; - - metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { - return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); - } }); - - -/***/ }), -/* 315 */ -/***/ (function(module, exports, __webpack_require__) { - - var metadata = __webpack_require__(308); - var anObject = __webpack_require__(12); - var ordinaryHasOwnMetadata = metadata.has; - var toMetaKey = metadata.key; - - metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { - return ordinaryHasOwnMetadata(metadataKey, anObject(target) - , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); - } }); - - -/***/ }), -/* 316 */ -/***/ (function(module, exports, __webpack_require__) { - - var $metadata = __webpack_require__(308); - var anObject = __webpack_require__(12); - var aFunction = __webpack_require__(21); - var toMetaKey = $metadata.key; - var ordinaryDefineOwnMetadata = $metadata.set; - - $metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { - return function decorator(target, targetKey) { - ordinaryDefineOwnMetadata( - metadataKey, metadataValue, - (targetKey !== undefined ? anObject : aFunction)(target), - toMetaKey(targetKey) - ); - }; - } }); - - -/***/ }), -/* 317 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask - var $export = __webpack_require__(8); - var microtask = __webpack_require__(210)(); - var process = __webpack_require__(4).process; - var isNode = __webpack_require__(34)(process) == 'process'; - - $export($export.G, { - asap: function asap(fn) { - var domain = isNode && process.domain; - microtask(domain ? domain.bind(fn) : fn); - } - }); - - -/***/ }), -/* 318 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - // https://github.com/zenparsing/es-observable - var $export = __webpack_require__(8); - var global = __webpack_require__(4); - var core = __webpack_require__(9); - var microtask = __webpack_require__(210)(); - var OBSERVABLE = __webpack_require__(25)('observable'); - var aFunction = __webpack_require__(21); - var anObject = __webpack_require__(12); - var anInstance = __webpack_require__(206); - var redefineAll = __webpack_require__(214); - var hide = __webpack_require__(10); - var forOf = __webpack_require__(207); - var RETURN = forOf.RETURN; - - var getMethod = function (fn) { - return fn == null ? undefined : aFunction(fn); - }; - - var cleanupSubscription = function (subscription) { - var cleanup = subscription._c; - if (cleanup) { - subscription._c = undefined; - cleanup(); - } - }; - - var subscriptionClosed = function (subscription) { - return subscription._o === undefined; - }; - - var closeSubscription = function (subscription) { - if (!subscriptionClosed(subscription)) { - subscription._o = undefined; - cleanupSubscription(subscription); - } - }; - - var Subscription = function (observer, subscriber) { - anObject(observer); - this._c = undefined; - this._o = observer; - observer = new SubscriptionObserver(this); - try { - var cleanup = subscriber(observer); - var subscription = cleanup; - if (cleanup != null) { - if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; - else aFunction(cleanup); - this._c = cleanup; - } - } catch (e) { - observer.error(e); - return; - } if (subscriptionClosed(this)) cleanupSubscription(this); - }; - - Subscription.prototype = redefineAll({}, { - unsubscribe: function unsubscribe() { closeSubscription(this); } - }); - - var SubscriptionObserver = function (subscription) { - this._s = subscription; - }; - - SubscriptionObserver.prototype = redefineAll({}, { - next: function next(value) { - var subscription = this._s; - if (!subscriptionClosed(subscription)) { - var observer = subscription._o; - try { - var m = getMethod(observer.next); - if (m) return m.call(observer, value); - } catch (e) { - try { - closeSubscription(subscription); - } finally { - throw e; - } - } - } - }, - error: function error(value) { - var subscription = this._s; - if (subscriptionClosed(subscription)) throw value; - var observer = subscription._o; - subscription._o = undefined; - try { - var m = getMethod(observer.error); - if (!m) throw value; - value = m.call(observer, value); - } catch (e) { - try { - cleanupSubscription(subscription); - } finally { - throw e; - } - } cleanupSubscription(subscription); - return value; - }, - complete: function complete(value) { - var subscription = this._s; - if (!subscriptionClosed(subscription)) { - var observer = subscription._o; - subscription._o = undefined; - try { - var m = getMethod(observer.complete); - value = m ? m.call(observer, value) : undefined; - } catch (e) { - try { - cleanupSubscription(subscription); - } finally { - throw e; - } - } cleanupSubscription(subscription); - return value; - } - } - }); - - var $Observable = function Observable(subscriber) { - anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); - }; - - redefineAll($Observable.prototype, { - subscribe: function subscribe(observer) { - return new Subscription(observer, this._f); - }, - forEach: function forEach(fn) { - var that = this; - return new (core.Promise || global.Promise)(function (resolve, reject) { - aFunction(fn); - var subscription = that.subscribe({ - next: function (value) { - try { - return fn(value); - } catch (e) { - reject(e); - subscription.unsubscribe(); - } - }, - error: reject, - complete: resolve - }); - }); - } - }); - - redefineAll($Observable, { - from: function from(x) { - var C = typeof this === 'function' ? this : $Observable; - var method = getMethod(anObject(x)[OBSERVABLE]); - if (method) { - var observable = anObject(method.call(x)); - return observable.constructor === C ? observable : new C(function (observer) { - return observable.subscribe(observer); - }); - } - return new C(function (observer) { - var done = false; - microtask(function () { - if (!done) { - try { - if (forOf(x, false, function (it) { - observer.next(it); - if (done) return RETURN; - }) === RETURN) return; - } catch (e) { - if (done) throw e; - observer.error(e); - return; - } observer.complete(); - } - }); - return function () { done = true; }; - }); - }, - of: function of() { - for (var i = 0, l = arguments.length, items = Array(l); i < l;) items[i] = arguments[i++]; - return new (typeof this === 'function' ? this : $Observable)(function (observer) { - var done = false; - microtask(function () { - if (!done) { - for (var j = 0; j < items.length; ++j) { - observer.next(items[j]); - if (done) return; - } observer.complete(); - } - }); - return function () { done = true; }; - }); - } - }); - - hide($Observable.prototype, OBSERVABLE, function () { return this; }); - - $export($export.G, { Observable: $Observable }); - - __webpack_require__(193)('Observable'); - - -/***/ }), -/* 319 */ -/***/ (function(module, exports, __webpack_require__) { - - // ie9- setTimeout & setInterval additional parameters fix - var global = __webpack_require__(4); - var $export = __webpack_require__(8); - var navigator = global.navigator; - var slice = [].slice; - var MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check - var wrap = function (set) { - return function (fn, time /* , ...args */) { - var boundArgs = arguments.length > 2; - var args = boundArgs ? slice.call(arguments, 2) : false; - return set(boundArgs ? function () { - // eslint-disable-next-line no-new-func - (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); - } : fn, time); - }; - }; - $export($export.G + $export.B + $export.F * MSIE, { - setTimeout: wrap(global.setTimeout), - setInterval: wrap(global.setInterval) - }); - - -/***/ }), -/* 320 */ -/***/ (function(module, exports, __webpack_require__) { - - var $export = __webpack_require__(8); - var $task = __webpack_require__(209); - $export($export.G + $export.B, { - setImmediate: $task.set, - clearImmediate: $task.clear - }); - - -/***/ }), -/* 321 */ -/***/ (function(module, exports, __webpack_require__) { - - var $iterators = __webpack_require__(194); - var getKeys = __webpack_require__(30); - var redefine = __webpack_require__(18); - var global = __webpack_require__(4); - var hide = __webpack_require__(10); - var Iterators = __webpack_require__(129); - var wks = __webpack_require__(25); - var ITERATOR = wks('iterator'); - var TO_STRING_TAG = wks('toStringTag'); - var ArrayValues = Iterators.Array; - - var DOMIterables = { - CSSRuleList: true, // TODO: Not spec compliant, should be false. - CSSStyleDeclaration: false, - CSSValueList: false, - ClientRectList: false, - DOMRectList: false, - DOMStringList: false, - DOMTokenList: true, - DataTransferItemList: false, - FileList: false, - HTMLAllCollection: false, - HTMLCollection: false, - HTMLFormElement: false, - HTMLSelectElement: false, - MediaList: true, // TODO: Not spec compliant, should be false. - MimeTypeArray: false, - NamedNodeMap: false, - NodeList: true, - PaintRequestList: false, - Plugin: false, - PluginArray: false, - SVGLengthList: false, - SVGNumberList: false, - SVGPathSegList: false, - SVGPointList: false, - SVGStringList: false, - SVGTransformList: false, - SourceBufferList: false, - StyleSheetList: true, // TODO: Not spec compliant, should be false. - TextTrackCueList: false, - TextTrackList: false, - TouchList: false - }; - - for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { - var NAME = collections[i]; - var explicit = DOMIterables[NAME]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - var key; - if (proto) { - if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); - if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = ArrayValues; - if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); - } - } - - -/***/ }), -/* 322 */ -/***/ (function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(global) {/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - - !(function(global) { - "use strict"; - - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - - var inModule = typeof module === "object"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - // If regeneratorRuntime is defined globally and we're in a module, - // make the exports object identical to regeneratorRuntime. - module.exports = runtime; - } - // Don't bother evaluating the rest of this file if the runtime was - // already defined globally. - return; - } - - // Define the runtime globally (as expected by generated code) as either - // module.exports (if we're in a module) or a new, empty object. - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); - - return generator; - } - runtime.wrap = wrap; - - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; - - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - - // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; - - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && - NativeIteratorPrototype !== Op && - hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } - - var Gp = GeneratorFunctionPrototype.prototype = - Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = - GeneratorFunction.displayName = "GeneratorFunction"; - - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - }); - } - - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - - runtime.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = "GeneratorFunction"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - runtime.awrap = function(arg) { - return { __await: arg }; - }; - - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && - typeof value === "object" && - hasOwn.call(value, "__await")) { - return Promise.resolve(value.__await).then(function(value) { - invoke("next", value, resolve, reject); - }, function(err) { - invoke("throw", err, resolve, reject); - }); - } - - return Promise.resolve(value).then(function(unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. If the Promise is rejected, however, the - // result for this iteration will be rejected with the same - // reason. Note that rejections of yielded Promises are not - // thrown back into the generator function, as is the case - // when an awaited Promise is rejected. This difference in - // behavior between yield and await is important, because it - // allows the consumer to decide what to do with the yielded - // rejection (swallow it and continue, manually .throw it back - // into the generator, abandon iteration, whatever). With - // await, by contrast, there is no opportunity to examine the - // rejection reason outside the generator function, so the - // only option is to throw it from the await expression, and - // let the generator function handle the exception. - result.value = unwrapped; - resolve(result); - }, reject); - } - } - - if (typeof global.process === "object" && global.process.domain) { - invoke = global.process.domain.bind(invoke); - } - - var previousPromise; - - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise(function(resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - - return previousPromise = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then( - callInvokeWithMethodAndArg, - // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg - ) : callInvokeWithMethodAndArg(); - } - - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - runtime.AsyncIterator = AsyncIterator; - - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList) - ); - - return runtime.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; - - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } - - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } - - context.method = method; - context.arg = arg; - - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; - - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - - context.dispatchException(context.arg); - - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } - - state = GenStateExecuting; - - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; - - if (record.arg === ContinueSentinel) { - continue; - } - - return { - value: record.arg, - done: context.done - }; - - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; - } - } - }; - } - - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; - - if (context.method === "throw") { - if (delegate.iterator.return) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } - - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); - } - - return ContinueSentinel; - } - - var record = tryCatch(method, delegate.iterator, context.arg); - - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - - var info = record.arg; - - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } - - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; - - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; - - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } - - } else { - // Re-yield the result returned by the delegate method. - return info; - } - - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } - - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); - - Gp[toStringTagSymbol] = "Generator"; - - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; - - Gp.toString = function() { - return "[object Generator]"; - }; - - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - - if (1 in locs) { - entry.catchLoc = locs[1]; - } - - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - - this.tryEntries.push(entry); - } - - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; - - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - - if (typeof iterable.next === "function") { - return iterable; - } - - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - - next.value = undefined; - next.done = true; - - return next; - }; - - return next.next = next; - } - } - - // Return an iterator with no values. - return { next: doneResult }; - } - runtime.values = values; - - function doneResult() { - return { value: undefined, done: true }; - } - - Context.prototype = { - constructor: Context, - - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - - this.method = "next"; - this.arg = undefined; - - this.tryEntries.forEach(resetTryEntry); - - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && - hasOwn.call(this, name) && - !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - - stop: function() { - this.done = true; - - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - - return this.rval; - }, - - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } - - return !! caught; - } - - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } - - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - - return this.complete(record); - }, - - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - - return ContinueSentinel; - }, - - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, - - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; - } - - return ContinueSentinel; - } - }; - })( - // Among the various tricks for obtaining a reference to the global - // object, this seems to be the most reliable technique that does not - // use indirect eval (which violates Content Security Policy). - typeof global === "object" ? global : - typeof window === "object" ? window : - typeof self === "object" ? self : this - ); - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }), -/* 323 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(324); - module.exports = __webpack_require__(9).RegExp.escape; - - -/***/ }), -/* 324 */ -/***/ (function(module, exports, __webpack_require__) { - - // https://github.com/benjamingr/RexExp.escape - var $export = __webpack_require__(8); - var $re = __webpack_require__(325)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); - - $export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); - - -/***/ }), -/* 325 */ -/***/ (function(module, exports) { - - module.exports = function (regExp, replace) { - var replacer = replace === Object(replace) ? function (part) { - return replace[part]; - } : replace; - return function (it) { - return String(it).replace(regExp, replacer); - }; - }; - - -/***/ }), -/* 326 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _react = __webpack_require__(327); - - var _react2 = _interopRequireDefault(_react); - - var _reactDom = __webpack_require__(330); - - var _reactDom2 = _interopRequireDefault(_reactDom); - - var _root = __webpack_require__(334); - - var _root2 = _interopRequireDefault(_root); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - _reactDom2.default.render(_react2.default.createElement(_root2.default, null), document.getElementById('app')); - -/***/ }), -/* 327 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - if (true) { - module.exports = __webpack_require__(328); - } else { - module.exports = require('./cjs/react.development.js'); - } - - -/***/ }), -/* 328 */ -/***/ (function(module, exports, __webpack_require__) { - - /** @license React v16.6.1 - * react.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. - */ - - 'use strict';var k=__webpack_require__(329),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.concurrent_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112,z=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.memo"): - 60115,B=n?Symbol.for("react.lazy"):60116,C="function"===typeof Symbol&&Symbol.iterator;function aa(a,b,e,c,d,g,h,f){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[e,c,d,g,h,f],m=0;a=Error(b.replace(/%s/g,function(){return l[m++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}} - function D(a){for(var b=arguments.length-1,e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;cQ.length&&Q.push(a)} - function T(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return e(c,a,""===b?"."+U(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;hthis.eventPool.length&&this.eventPool.push(a)} - function jb(a){a.eventPool=[];a.getPooled=kb;a.release=lb}var mb=A.extend({data:null}),nb=A.extend({data:null}),ob=[9,13,27,32],pb=Sa&&"CompositionEvent"in window,qb=null;Sa&&"documentMode"in document&&(qb=document.documentMode); - var rb=Sa&&"TextEvent"in window&&!qb,sb=Sa&&(!pb||qb&&8=qb),tb=String.fromCharCode(32),ub={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart", - captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},vb=!1; - function wb(a,b){switch(a){case "keyup":return-1!==ob.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function xb(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var yb=!1;function zb(a,b){switch(a){case "compositionend":return xb(b);case "keypress":if(32!==b.which)return null;vb=!0;return tb;case "textInput":return a=b.data,a===tb&&vb?null:a;default:return null}} - function Ab(a,b){if(yb)return"compositionend"===a||!pb&&wb(a,b)?(a=gb(),fb=eb=cb=null,yb=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function E(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var F={}; - "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){F[a]=new E(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];F[b]=new E(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){F[a]=new E(a,2,!1,a.toLowerCase(),null)}); - ["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){F[a]=new E(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){F[a]=new E(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){F[a]=new E(a,3,!0,a,null)}); - ["capture","download"].forEach(function(a){F[a]=new E(a,4,!1,a,null)});["cols","rows","size","span"].forEach(function(a){F[a]=new E(a,6,!1,a,null)});["rowSpan","start"].forEach(function(a){F[a]=new E(a,5,!1,a.toLowerCase(),null)});var vc=/[\-:]([a-z])/g;function xc(a){return a[1].toUpperCase()} - "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(vc, - xc);F[b]=new E(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(vc,xc);F[b]=new E(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(vc,xc);F[b]=new E(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});F.tabIndex=new E("tabIndex",1,!1,"tabindex",null); - function yc(a,b,c,d){var e=F.hasOwnProperty(b)?F[b]:null;var f=null!==e?0===e.type:d?!1:!(2Fd.length&&Fd.push(a)}}}var Ld={},Md=0,Nd="_reactListenersID"+(""+Math.random()).slice(2); - function Od(a){Object.prototype.hasOwnProperty.call(a,Nd)||(a[Nd]=Md++,Ld[a[Nd]]={});return Ld[a[Nd]]}function Pd(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function Qd(a){for(;a&&a.firstChild;)a=a.firstChild;return a} - function Rd(a,b){var c=Qd(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Qd(c)}}function Sd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Sd(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1} - function Td(){for(var a=window,b=Pd();b instanceof a.HTMLIFrameElement;){try{a=b.contentDocument.defaultView}catch(c){break}b=Pd(a.document)}return b}function Ud(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)} - var Vd=Sa&&"documentMode"in document&&11>=document.documentMode,Wd={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Xd=null,Yd=null,Zd=null,$d=!1; - function ae(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if($d||null==Xd||Xd!==Pd(c))return null;c=Xd;"selectionStart"in c&&Ud(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return Zd&&jd(Zd,c)?null:(Zd=c,a=A.getPooled(Wd.select,Yd,a,b),a.type="select",a.target=Xd,Ra(a),a)} - var be={eventTypes:Wd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Od(e);f=ta.onSelect;for(var g=0;g=b.length?void 0:t("93"),b=b[0]),c=b),null==c&&(c=""));a._wrapperState={initialValue:zc(c)}} - function ie(a,b){var c=zc(b.value),d=zc(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function je(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var ke={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}; - function le(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?le(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} - var ne=void 0,oe=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==ke.svg||"innerHTML"in a)a.innerHTML=b;else{ne=ne||document.createElement("div");ne.innerHTML=""+b+"";for(b=ne.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}); - function pe(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b} - var qe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0, - floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},re=["Webkit","ms","Moz","O"];Object.keys(qe).forEach(function(a){re.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qe[b]=qe[a]})});function se(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||qe.hasOwnProperty(a)&&qe[a]?(""+b).trim():b+"px"} - function te(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=se(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var ue=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); - function ve(a,b){b&&(ue[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?t("137",a,""):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?t("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML?void 0:t("61")),null!=b.style&&"object"!==typeof b.style?t("62",""):void 0)} - function we(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}} - function xe(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Od(a);b=ta[b];for(var d=0;dIe||(a.current=He[Ie],He[Ie]=null,Ie--)}function I(a,b){Ie++;He[Ie]=a.current;a.current=b}var Je={},J={current:Je},K={current:!1},Ke=Je; - function Le(a,b){var c=a.type.contextTypes;if(!c)return Je;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Me(a){H(K,a);H(J,a)}function Ne(a){H(K,a);H(J,a)} - function Oe(a,b,c){J.current!==Je?t("168"):void 0;I(J,b,a);I(K,c,a)}function Pe(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)e in a?void 0:t("108",mc(b)||"Unknown",e);return n({},c,d)}function Qe(a){var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||Je;Ke=J.current;I(J,b,a);I(K,K.current,a);return!0} - function Re(a,b,c){var d=a.stateNode;d?void 0:t("169");c?(b=Pe(a,b,Ke),d.__reactInternalMemoizedMergedChildContext=b,H(K,a),H(J,a),I(J,b,a)):H(K,a);I(K,c,a)}var Se=null,Te=null;function Ue(a){return function(b){try{return a(b)}catch(c){}}} - function Ve(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Se=Ue(function(a){return b.onCommitFiberRoot(c,a)});Te=Ue(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0} - function We(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.firstContextDependency=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function M(a,b,c,d){return new We(a,b,c,d)} - function Xe(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Ye(a){if("function"===typeof a)return Xe(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===gc)return 11;if(a===ic)return 14}return 2} - function Ze(a,b){var c=a.alternate;null===c?(c=M(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;c.firstContextDependency=a.firstContextDependency;c.sibling=a.sibling; - c.index=a.index;c.ref=a.ref;return c} - function $e(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)Xe(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ac:return af(c.children,e,f,b);case fc:return bf(c,e|3,f,b);case bc:return bf(c,e|2,f,b);case cc:return a=M(12,c,b,e|4),a.elementType=cc,a.type=cc,a.expirationTime=f,a;case hc:return a=M(13,c,b,e),a.elementType=hc,a.type=hc,a.expirationTime=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case dc:g=10;break a;case ec:g=9;break a;case gc:g=11;break a;case ic:g= - 14;break a;case jc:g=16;d=null;break a}t("130",null==a?a:typeof a,"")}b=M(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function af(a,b,c,d){a=M(7,a,d,b);a.expirationTime=c;return a}function bf(a,b,c,d){a=M(8,a,d,b);b=0===(b&1)?bc:fc;a.elementType=b;a.type=b;a.expirationTime=c;return a}function cf(a,b,c){a=M(6,a,null,b);a.expirationTime=c;return a} - function df(a,b,c){b=M(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function ef(a,b){a.didError=!1;var c=a.earliestPendingTime;0===c?a.earliestPendingTime=a.latestPendingTime=b:cb&&(a.latestPendingTime=b);ff(b,a)} - function gf(a,b){a.didError=!1;var c=a.latestPingedTime;0!==c&&c>=b&&(a.latestPingedTime=0);c=a.earliestPendingTime;var d=a.latestPendingTime;c===b?a.earliestPendingTime=d===b?a.latestPendingTime=0:d:d===b&&(a.latestPendingTime=c);c=a.earliestSuspendedTime;d=a.latestSuspendedTime;0===c?a.earliestSuspendedTime=a.latestSuspendedTime=b:cb&&(a.latestSuspendedTime=b);ff(b,a)} - function hf(a,b){var c=a.earliestPendingTime;a=a.earliestSuspendedTime;c>b&&(b=c);a>b&&(b=a);return b}function ff(a,b){var c=b.earliestSuspendedTime,d=b.latestSuspendedTime,e=b.earliestPendingTime,f=b.latestPingedTime;e=0!==e?e:f;0===e&&(0===a||da&&(a=c);b.nextExpirationTimeToWorkOn=e;b.expirationTime=a}var jf=!1; - function kf(a){return{baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function lf(a){return{baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}} - function mf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function nf(a,b){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b)} - function of(a,b){var c=a.alternate;if(null===c){var d=a.updateQueue;var e=null;null===d&&(d=a.updateQueue=kf(a.memoizedState))}else d=a.updateQueue,e=c.updateQueue,null===d?null===e?(d=a.updateQueue=kf(a.memoizedState),e=c.updateQueue=kf(c.memoizedState)):d=a.updateQueue=lf(e):null===e&&(e=c.updateQueue=lf(d));null===e||d===e?nf(d,b):null===d.lastUpdate||null===e.lastUpdate?(nf(d,b),nf(e,b)):(nf(d,b),e.lastUpdate=b)} - function pf(a,b){var c=a.updateQueue;c=null===c?a.updateQueue=kf(a.memoizedState):qf(a,c);null===c.lastCapturedUpdate?c.firstCapturedUpdate=c.lastCapturedUpdate=b:(c.lastCapturedUpdate.next=b,c.lastCapturedUpdate=b)}function qf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=lf(b));return b} - function rf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,"function"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-2049|64;case 0:a=c.payload;e="function"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return n({},d,e);case 2:jf=!0}return d} - function sf(a,b,c,d,e){jf=!1;b=qf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,l=f;null!==k;){var m=k.expirationTime;mu?(p=m,m=null):p=m.sibling;var v=x(e,m,h[u],k);if(null===v){null===m&&(m=p);break}a&& - m&&null===v.alternate&&b(e,m);g=f(v,g,u);null===r?l=v:r.sibling=v;r=v;m=p}if(u===h.length)return c(e,m),l;if(null===m){for(;uu?(p=r,r=null):p=r.sibling;var y=x(e,r,v.value,k);if(null===y){r||(r=p);break}a&&r&&null===y.alternate&&b(e,r);g=f(y,g,u);null===m?l=y:m.sibling=y;m=y;r=p}if(v.done)return c(e,r),l;if(null===r){for(;!v.done;u++,v=h.next())v=q(e,v.value,k),null!==v&&(g=f(v,g,u),null===m?l=v:m.sibling=v,m=v);return l}for(r=d(e,r);!v.done;u++,v=h.next())v=z(r,e,u,v.value,k),null!==v&&(a&&null!==v.alternate&&r.delete(null===v.key?u: - v.key),g=f(v,g,u),null===m?l=v:m.sibling=v,m=v);a&&r.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ac&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Zb:a:{l=f.key;for(k=d;null!==k;){if(k.key===l)if(7===k.tag?f.type===ac:k.elementType===f.type){c(a,k.sibling);d=e(k,f.type===ac?f.props.children:f.props,h);d.ref=$f(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k= - k.sibling}f.type===ac?(d=af(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=$e(f.type,f.key,f.props,null,a.mode,h),h.ref=$f(a,d,f),h.return=a,a=h)}return g(a);case $b:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=df(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f= - ""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=a,a=d):(c(a,d),d=cf(f,a.mode,h),d.return=a,a=d),g(a);if(Zf(f))return B(a,d,f,h);if(lc(f))return Q(a,d,f,h);l&&ag(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:h=a.type,t("152",h.displayName||h.name||"Component")}return c(a,d)}}var cg=bg(!0),dg=bg(!1),eg=null,fg=null,gg=!1; - function hg(a,b){var c=M(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function ig(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}} - function jg(a){if(gg){var b=fg;if(b){var c=b;if(!ig(a,b)){b=Fe(c);if(!b||!ig(a,b)){a.effectTag|=2;gg=!1;eg=a;return}hg(eg,c)}eg=a;fg=Ge(b)}else a.effectTag|=2,gg=!1,eg=a}}function kg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;eg=a}function lg(a){if(a!==eg)return!1;if(!gg)return kg(a),gg=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!Ce(b,a.memoizedProps))for(b=fg;b;)hg(a,b),b=Fe(b);kg(a);fg=eg?Fe(a.stateNode):null;return!0}function mg(){fg=eg=null;gg=!1}var ng=Xb.ReactCurrentOwner; - function P(a,b,c,d){b.child=null===a?dg(b,null,c,d):cg(b,a.child,c,d)}function og(a,b,c,d,e){c=c.render;var f=b.ref;Cf(b,e);d=c(d,f);b.effectTag|=1;P(a,b,d,e);return b.child} - function pg(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!Xe(g)&&void 0===g.defaultProps&&null===c.compare)return b.tag=15,b.type=g,qg(a,b,g,d,e,f);a=$e(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e=c)return xg(a,b,c);b=rg(a,b,c);return null!==b?b.sibling:null}}return rg(a,b,c)}b.expirationTime=0;switch(b.tag){case 2:d=b.elementType;null!== - a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;var e=Le(b,J.current);Cf(b,c);e=d(a,e);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;if(L(d)){var f=!0;Qe(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;var g=d.getDerivedStateFromProps;"function"===typeof g&&Pf(b,d,g,a);e.updater=Uf;b.stateNode=e;e._reactInternalFiber=b;Yf(b,d,a,c);b=vg(null,b,d,!0,f,c)}else b.tag=0,P(null,b,e,c),b=b.child; - return b;case 16:e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);f=b.pendingProps;a=Mf(e);b.type=a;e=b.tag=Ye(a);f=O(a,f);g=void 0;switch(e){case 0:g=sg(null,b,a,f,c);break;case 1:g=ug(null,b,a,f,c);break;case 11:g=og(null,b,a,f,c);break;case 14:g=pg(null,b,a,O(a.type,f),d,c);break;default:t("283",a)}return g;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:O(d,e),sg(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:O(d,e),ug(a,b,d, - e,c);case 3:wg(b);d=b.updateQueue;null===d?t("282"):void 0;e=b.memoizedState;e=null!==e?e.element:null;sf(b,d,b.pendingProps,null,c);d=b.memoizedState.element;if(d===e)mg(),b=rg(a,b,c);else{e=b.stateNode;if(e=(null===a||null===a.child)&&e.hydrate)fg=Ge(b.stateNode.containerInfo),eg=b,e=gg=!0;e?(b.effectTag|=2,b.child=dg(b,null,d,c)):(P(a,b,d,c),mg());b=b.child}return b;case 5:return Kf(b),null===a&&jg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ce(d,e)?g=null:null!== - f&&Ce(d,f)&&(b.effectTag|=16),tg(a,b),1!==c&&b.mode&1&&e.hidden?(b.expirationTime=1,b=null):(P(a,b,g,c),b=b.child),b;case 6:return null===a&&jg(b),null;case 13:return xg(a,b,c);case 4:return If(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=cg(b,null,d,c):P(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:O(d,e),og(a,b,d,e,c);case 7:return P(a,b,b.pendingProps,c),b.child;case 8:return P(a,b,b.pendingProps.children,c),b.child;case 12:return P(a,b,b.pendingProps.children, - c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;Af(b,f);if(null!==g){var h=g.value;f=h===f&&(0!==h||1/h===1/f)||h!==h&&f!==f?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0;if(0===f){if(g.children===e.children&&!K.current){b=rg(a,b,c);break a}}else for(g=b.child,null!==g&&(g.return=b);null!==g;){h=g.firstContextDependency;if(null!==h){do{if(h.context===d&&0!==(h.observedBits&f)){if(1===g.tag){var k=mf(c);k.tag=2;of(g,k)}g.expirationTime< - c&&(g.expirationTime=c);k=g.alternate;null!==k&&k.expirationTime\x3c/script>",l=e.removeChild(e.firstChild)):"string"===typeof q.is?l=l.createElement(e,{is:q.is}):(l=l.createElement(e),"select"===e&&q.multiple&&(l.multiple=!0)):l=l.createElementNS(k,e);e=l;e[Ga]=m;e[Ha]=g;Ag(e,b,!1,!1);q=e;l=f;m=g;var x=h,z=we(l,m);switch(l){case "iframe":case "object":G("load", - q);h=m;break;case "video":case "audio":for(h=0;hg&&(g=e),h>g&&(g=h),f=f.sibling;b.childExpirationTime=g}if(null!==R)return R;null!==c&&0===(c.effectTag&1024)&&(null=== - c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1=z)q=0;else if(-1===q||z component higher in the tree to provide a loading indicator or placeholder to display."+nc(k))}$g=!0;l=vf(l,k);g=h;do{switch(g.tag){case 3:k= - l;g.effectTag|=2048;g.expirationTime=f;f=Pg(g,k,f);pf(g,f);break a;case 1:if(k=l,h=g.type,m=g.stateNode,0===(g.effectTag&64)&&("function"===typeof h.getDerivedStateFromError||null!==m&&"function"===typeof m.componentDidCatch&&(null===Sg||!Sg.has(m)))){g.effectTag|=2048;g.expirationTime=f;f=Rg(g,k,f);pf(g,f);break a}}g=g.return}while(null!==g)}R=eh(e);continue}}}break}while(1);Yg=!1;zf=yf=xf=Vg.currentDispatcher=null;if(d)S=null,a.finishedWork=null;else if(null!==R)a.finishedWork=null;else{d=a.current.alternate; - null===d?t("281"):void 0;S=null;if($g){e=a.latestPendingTime;f=a.latestSuspendedTime;g=a.latestPingedTime;if(0!==e&&eb?0:b)):(a.pendingCommitExpirationTime=c,a.finishedWork=d)}} - function Jg(a,b){for(var c=a.return;null!==c;){switch(c.tag){case 1:var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Sg||!Sg.has(d))){a=vf(b,a);a=Rg(c,a,1073741823);of(c,a);Tf(c,1073741823);return}break;case 3:a=vf(b,a);a=Pg(c,a,1073741823);of(c,a);Tf(c,1073741823);return}c=c.return}3===a.tag&&(c=vf(b,a),c=Pg(a,c,1073741823),of(a,c),Tf(a,1073741823))} - function Rf(a,b){0!==Xg?a=Xg:Yg?a=ah?1073741823:T:b.mode&1?(a=kh?1073741822-10*(((1073741822-a+15)/10|0)+1):1073741822-25*(((1073741822-a+500)/25|0)+1),null!==S&&a===T&&--a):a=1073741823;kh&&(0===lh||a=f){f=e=d;a.didError=!1;var g=a.latestPingedTime;if(0===g||g>f)a.latestPingedTime=f;ff(f,a)}else e=Qf(),e=Rf(e,b),ef(a,e);0!==(b.mode&1)&&a===S&&T===d&&(S=null);mh(b,e);0===(b.mode&1)&&(mh(c,e),1===c.tag&&null!==c.stateNode&&(b=mf(e),b.tag=2,of(c,b)));c=a.expirationTime;0!==c&&nh(a,c)} - function mh(a,b){a.expirationTimeT&&dh(),ef(a,b),Yg&&!ah&&S===a||nh(a,a.expirationTime),oh>ph&&(oh=0,t("185")))}function qh(a,b,c,d,e){var f=Xg;Xg=1073741823;try{return a(b,c,d,e)}finally{Xg=f}}var rh=null,V=null,sh=0,th=void 0,W=!1,uh=null,X=0,lh=0,vh=!1,wh=null,Z=!1,xh=!1,kh=!1,yh=null,zh=ba.unstable_now(),Ah=1073741822-(zh/10|0),Bh=Ah,ph=50,oh=0,Ch=null;function Dh(){Ah=1073741822-((ba.unstable_now()-zh)/10|0)} - function Eh(a,b){if(0!==sh){if(ba.expirationTime&&(a.expirationTime=b);W||(Z?xh&&(uh=a,X=1073741823,Jh(a,1073741823,!1)):1073741823===b?Kh(1073741823,!1):Eh(a,b))} - function Ih(){var a=0,b=null;if(null!==V)for(var c=V,d=rh;null!==d;){var e=d.expirationTime;if(0===e){null===c||null===V?t("244"):void 0;if(d===d.nextScheduledRoot){rh=V=d.nextScheduledRoot=null;break}else if(d===rh)rh=e=d.nextScheduledRoot,V.nextScheduledRoot=e,d.nextScheduledRoot=null;else if(d===V){V=c;V.nextScheduledRoot=rh;d.nextScheduledRoot=null;break}else c.nextScheduledRoot=d.nextScheduledRoot,d.nextScheduledRoot=null;d=c.nextScheduledRoot}else{e>a&&(a=e,b=d);if(d===V)break;if(1073741823=== - a)break;c=d;d=d.nextScheduledRoot}}uh=b;X=a}var Lh=!1;function hh(){return Lh?!0:ba.unstable_shouldYield()?Lh=!0:!1}function Fh(){try{if(!hh()&&null!==rh){Dh();var a=rh;do{var b=a.expirationTime;0!==b&&Ah<=b&&(a.nextExpirationTimeToWorkOn=Ah);a=a.nextScheduledRoot}while(a!==rh)}Kh(0,!0)}finally{Lh=!1}} - function Kh(a,b){Ih();if(b)for(Dh(),Bh=Ah;null!==uh&&0!==X&&a<=X&&!(Lh&&Ah>X);)Jh(uh,X,Ah>X),Ih(),Dh(),Bh=Ah;else for(;null!==uh&&0!==X&&a<=X;)Jh(uh,X,!1),Ih();b&&(sh=0,th=null);0!==X&&Eh(uh,X);oh=0;Ch=null;if(null!==yh)for(a=yh,yh=null,b=0;b=c&&(null===yh?yh=[d]:yh.push(d),d._defer)){a.finishedWork=b;a.expirationTime=0;return}a.finishedWork=null;a===Ch?oh++:(Ch=a,oh=0);ah=Yg=!0;a.current===b?t("177"):void 0;c=a.pendingCommitExpirationTime;0===c?t("261"):void 0;a.pendingCommitExpirationTime=0;d=b.expirationTime;var e=b.childExpirationTime;d=e>d?e:d;a.didError=!1;0===d?(a.earliestPendingTime=0,a.latestPendingTime=0,a.earliestSuspendedTime=0,a.latestSuspendedTime=0,a.latestPingedTime= - 0):(e=a.latestPendingTime,0!==e&&(e>d?a.earliestPendingTime=a.latestPendingTime=0:a.earliestPendingTime>d&&(a.earliestPendingTime=a.latestPendingTime)),e=a.earliestSuspendedTime,0===e?ef(a,d):de&&ef(a,d));ff(0,a);Vg.current=null;1u&&(y=u,u=r,r=y),y=Rd(w,r),Y=Rd(w,u),y&&Y&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==Y.node||p.focusOffset!==Y.offset)&&(C=C.createRange(),C.setStart(y.node,y.offset),p.removeAllRanges(),r>u?(p.addRange(C),p.extend(Y.node,Y.offset)):(C.setEnd(Y.node,Y.offset), - p.addRange(C))))));C=[];for(p=w;p=p.parentNode;)1===p.nodeType&&C.push({element:p,left:p.scrollLeft,top:p.scrollTop});"function"===typeof w.focus&&w.focus();for(w=0;wFb?b:Fb;0===b&&(Sg=null);a.expirationTime=b;a.finishedWork=null} - function Qg(a){null===uh?t("246"):void 0;uh.expirationTime=0;vh||(vh=!0,wh=a)}function Nh(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Kh(1073741823,!1)}}function Oh(a,b){if(Z&&!xh){xh=!0;try{return a(b)}finally{xh=!1}}return a(b)}function Ph(a,b,c){if(kh)return a(b,c);Z||W||0===lh||(Kh(lh,!1),lh=0);var d=kh,e=Z;Z=kh=!0;try{return a(b,c)}finally{kh=d,(Z=e)||W||Kh(1073741823,!1)}} - function Qh(a,b,c,d,e){var f=b.current;a:if(c){c=c._reactInternalFiber;b:{2===kd(c)&&1===c.tag?void 0:t("170");var g=c;do{switch(g.tag){case 3:g=g.stateNode.context;break b;case 1:if(L(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}}g=g.return}while(null!==g);t("171");g=void 0}if(1===c.tag){var h=c.type;if(L(h)){c=Pe(c,h,g);break a}}c=g}else c=Je;null===b.context?b.context=c:b.pendingContext=c;b=e;e=mf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b); - Sf();of(f,e);Tf(f,d);return d}function Rh(a,b,c,d){var e=b.current,f=Qf();e=Rf(f,e);return Qh(a,b,c,e,d)}function Sh(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Uh(a,b,c){var d=3=Wg&&(b=Wg-1);this._expirationTime=Wg=b;this._root=a;this._callbacks=this._next=null;this._hasChildren=this._didComplete=!1;this._children=null;this._defer=!0}Vh.prototype.render=function(a){this._defer?void 0:t("250");this._hasChildren=!0;this._children=a;var b=this._root._internalRoot,c=this._expirationTime,d=new Wh;Qh(a,b,null,c,d._onCommit);return d}; - Vh.prototype.then=function(a){if(this._didComplete)a();else{var b=this._callbacks;null===b&&(b=this._callbacks=[]);b.push(a)}}; - Vh.prototype.commit=function(){var a=this._root._internalRoot,b=a.firstBatch;this._defer&&null!==b?void 0:t("251");if(this._hasChildren){var c=this._expirationTime;if(b!==this){this._hasChildren&&(c=this._expirationTime=b._expirationTime,this.render(this._children));for(var d=null,e=b;e!==this;)d=e,e=e._next;null===d?t("251"):void 0;d._next=e._next;this._next=b;a.firstBatch=this}this._defer=!1;Hh(a,c);b=this._next;this._next=null;b=a.firstBatch=b;null!==b&&b._hasChildren&&b.render(b._children)}else this._next= - null,this._defer=!1};Vh.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var a=this._callbacks;if(null!==a)for(var b=0;b=b;)c=d,d=d._next;a._next=d;null!==c&&(c._next=a)}return a};function Yh(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}Kb=Nh;Lb=Ph;Mb=function(){W||0===lh||(Kh(lh,!1),lh=0)}; - function Zh(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new Xh(a,!1,b)} - function $h(a,b,c,d,e){Yh(c)?void 0:t("200");var f=c._reactRootContainer;if(f){if("function"===typeof e){var g=e;e=function(){var a=Sh(f._internalRoot);g.call(a)}}null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)}else{f=c._reactRootContainer=Zh(c,d);if("function"===typeof e){var h=e;e=function(){var a=Sh(f._internalRoot);h.call(a)}}Oh(function(){null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)})}return Sh(f._internalRoot)} - function ai(a,b){var c=2=b){c=a;break}a=a.next}while(a!==d);null===c?c=d:c===d&&(d=g,p());b=c.previous;b.next=c.previous=g;g.next=c;g.previous= - b}}function v(){if(-1===k&&null!==d&&1===d.priorityLevel){m=!0;try{do u();while(null!==d&&1===d.priorityLevel)}finally{m=!1,null!==d?p():n=!1}}}function t(a){m=!0;var b=f;f=a;try{if(a)for(;null!==d;){var c=exports.unstable_now();if(d.expirationTime<=c){do u();while(null!==d&&d.expirationTime<=c)}else break}else if(null!==d){do u();while(null!==d&&!w())}}finally{m=!1,f=b,null!==d?p():n=!1,v()}} - var x=Date,y="function"===typeof setTimeout?setTimeout:void 0,z="function"===typeof clearTimeout?clearTimeout:void 0,A="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,B="function"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,C,D;function E(a){C=A(function(b){z(D);a(b)});D=y(function(){B(C);a(exports.unstable_now())},100)} - if("object"===typeof performance&&"function"===typeof performance.now){var F=performance;exports.unstable_now=function(){return F.now()}}else exports.unstable_now=function(){return x.now()};var r,q,w; - if("undefined"!==typeof window&&window._schedMock){var G=window._schedMock;r=G[0];q=G[1];w=G[2]}else if("undefined"===typeof window||"function"!==typeof window.addEventListener){var H=null,I=-1,J=function(a,b){if(null!==H){var c=H;H=null;try{I=b,c(a)}finally{I=-1}}};r=function(a,b){-1!==I?setTimeout(r,0,a,b):(H=a,setTimeout(J,b,!0,b),setTimeout(J,1073741823,!1,1073741823))};q=function(){H=null};w=function(){return!1};exports.unstable_now=function(){return-1===I?0:I}}else{"undefined"!==typeof console&& - ("function"!==typeof A&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof B&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var K=null,L=!1,M=-1,N=!1,O=!1,P=0,R=33,S=33;w=function(){return P<=exports.unstable_now()};var T="__reactIdleCallback$"+Math.random().toString(36).slice(2); - window.addEventListener("message",function(a){if(a.source===window&&a.data===T){L=!1;a=K;var b=M;K=null;M=-1;var c=exports.unstable_now(),e=!1;if(0>=P-c)if(-1!==b&&b<=c)e=!0;else{N||(N=!0,E(U));K=a;M=b;return}if(null!==a){O=!0;try{a(e)}finally{O=!1}}}},!1);var U=function(a){if(null!==K){E(U);var b=a-P+S;bb&&(b=8),S=bb?window.postMessage(T,"*"):N||(N=!0,E(U))};q=function(){K=null;L=!1;M=-1}} - exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=h,e=k;h=a;k=exports.unstable_now();try{return b()}finally{h=c,k=e,v()}}; - exports.unstable_scheduleCallback=function(a,b){var c=-1!==k?k:exports.unstable_now();if("object"===typeof b&&null!==b&&"number"===typeof b.timeout)b=c+b.timeout;else switch(h){case 1:b=c+-1;break;case 2:b=c+250;break;case 5:b=c+1073741823;break;case 4:b=c+1E4;break;default:b=c+5E3}a={callback:a,priorityLevel:h,expirationTime:b,next:null,previous:null};if(null===d)d=a.next=a.previous=a,p();else{c=null;var e=d;do{if(e.expirationTime>b){c=e;break}e=e.next}while(e!==d);null===c?c=d:c===d&&(d=a,p()); - b=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(b===a)d=null;else{a===d&&(d=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=h;return function(){var c=h,e=k;h=b;k=exports.unstable_now();try{return a.apply(this,arguments)}finally{h=c,k=e,v()}}};exports.unstable_getCurrentPriorityLevel=function(){return h}; - exports.unstable_shouldYield=function(){return!f&&(null!==d&&d.expirationTime]+>|\t|)+|(?:\n)))/gm; - - var spanEndTag = ''; - - // Global options used when within external APIs. This is modified when - // calling the `hljs.configure` function. - var options = { - classPrefix: 'hljs-', - tabReplace: null, - useBR: false, - languages: undefined - }; - - - /* Utility functions */ - - function escape(value) { - return value.replace(/&/g, '&').replace(//g, '>'); - } - - function tag(node) { - return node.nodeName.toLowerCase(); - } - - function testRe(re, lexeme) { - var match = re && re.exec(lexeme); - return match && match.index === 0; - } - - function isNotHighlighted(language) { - return noHighlightRe.test(language); - } - - function blockLanguage(block) { - var i, match, length, _class; - var classes = block.className + ' '; - - classes += block.parentNode ? block.parentNode.className : ''; - - // language-* takes precedence over non-prefixed class names. - match = languagePrefixRe.exec(classes); - if (match) { - return getLanguage(match[1]) ? match[1] : 'no-highlight'; - } - - classes = classes.split(/\s+/); - - for (i = 0, length = classes.length; i < length; i++) { - _class = classes[i] - - if (isNotHighlighted(_class) || getLanguage(_class)) { - return _class; - } - } - } - - function inherit(parent) { // inherit(parent, override_obj, override_obj, ...) - var key; - var result = {}; - var objects = Array.prototype.slice.call(arguments, 1); - - for (key in parent) - result[key] = parent[key]; - objects.forEach(function(obj) { - for (key in obj) - result[key] = obj[key]; - }); - return result; - } - - /* Stream merging */ - - function nodeStream(node) { - var result = []; - (function _nodeStream(node, offset) { - for (var child = node.firstChild; child; child = child.nextSibling) { - if (child.nodeType === 3) - offset += child.nodeValue.length; - else if (child.nodeType === 1) { - result.push({ - event: 'start', - offset: offset, - node: child - }); - offset = _nodeStream(child, offset); - // Prevent void elements from having an end tag that would actually - // double them in the output. There are more void elements in HTML - // but we list only those realistically expected in code display. - if (!tag(child).match(/br|hr|img|input/)) { - result.push({ - event: 'stop', - offset: offset, - node: child - }); - } - } - } - return offset; - })(node, 0); - return result; - } - - function mergeStreams(original, highlighted, value) { - var processed = 0; - var result = ''; - var nodeStack = []; - - function selectStream() { - if (!original.length || !highlighted.length) { - return original.length ? original : highlighted; - } - if (original[0].offset !== highlighted[0].offset) { - return (original[0].offset < highlighted[0].offset) ? original : highlighted; - } - - /* - To avoid starting the stream just before it should stop the order is - ensured that original always starts first and closes last: - - if (event1 == 'start' && event2 == 'start') - return original; - if (event1 == 'start' && event2 == 'stop') - return highlighted; - if (event1 == 'stop' && event2 == 'start') - return original; - if (event1 == 'stop' && event2 == 'stop') - return highlighted; - - ... which is collapsed to: - */ - return highlighted[0].event === 'start' ? original : highlighted; - } - - function open(node) { - function attr_str(a) {return ' ' + a.nodeName + '="' + escape(a.value).replace('"', '"') + '"';} - result += '<' + tag(node) + ArrayProto.map.call(node.attributes, attr_str).join('') + '>'; - } - - function close(node) { - result += ''; - } - - function render(event) { - (event.event === 'start' ? open : close)(event.node); - } - - while (original.length || highlighted.length) { - var stream = selectStream(); - result += escape(value.substring(processed, stream[0].offset)); - processed = stream[0].offset; - if (stream === original) { - /* - On any opening or closing tag of the original markup we first close - the entire highlighted node stack, then render the original tag along - with all the following original tags at the same offset and then - reopen all the tags on the highlighted stack. - */ - nodeStack.reverse().forEach(close); - do { - render(stream.splice(0, 1)[0]); - stream = selectStream(); - } while (stream === original && stream.length && stream[0].offset === processed); - nodeStack.reverse().forEach(open); - } else { - if (stream[0].event === 'start') { - nodeStack.push(stream[0].node); - } else { - nodeStack.pop(); - } - render(stream.splice(0, 1)[0]); - } - } - return result + escape(value.substr(processed)); - } - - /* Initialization */ - - function expand_mode(mode) { - if (mode.variants && !mode.cached_variants) { - mode.cached_variants = mode.variants.map(function(variant) { - return inherit(mode, {variants: null}, variant); - }); - } - return mode.cached_variants || (mode.endsWithParent && [inherit(mode)]) || [mode]; - } - - function compileLanguage(language) { - - function reStr(re) { - return (re && re.source) || re; - } - - function langRe(value, global) { - return new RegExp( - reStr(value), - 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '') - ); - } - - function compileMode(mode, parent) { - if (mode.compiled) - return; - mode.compiled = true; - - mode.keywords = mode.keywords || mode.beginKeywords; - if (mode.keywords) { - var compiled_keywords = {}; - - var flatten = function(className, str) { - if (language.case_insensitive) { - str = str.toLowerCase(); - } - str.split(' ').forEach(function(kw) { - var pair = kw.split('|'); - compiled_keywords[pair[0]] = [className, pair[1] ? Number(pair[1]) : 1]; - }); - }; - - if (typeof mode.keywords === 'string') { // string - flatten('keyword', mode.keywords); - } else { - objectKeys(mode.keywords).forEach(function (className) { - flatten(className, mode.keywords[className]); - }); - } - mode.keywords = compiled_keywords; - } - mode.lexemesRe = langRe(mode.lexemes || /\w+/, true); - - if (parent) { - if (mode.beginKeywords) { - mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')\\b'; - } - if (!mode.begin) - mode.begin = /\B|\b/; - mode.beginRe = langRe(mode.begin); - if (!mode.end && !mode.endsWithParent) - mode.end = /\B|\b/; - if (mode.end) - mode.endRe = langRe(mode.end); - mode.terminator_end = reStr(mode.end) || ''; - if (mode.endsWithParent && parent.terminator_end) - mode.terminator_end += (mode.end ? '|' : '') + parent.terminator_end; - } - if (mode.illegal) - mode.illegalRe = langRe(mode.illegal); - if (mode.relevance == null) - mode.relevance = 1; - if (!mode.contains) { - mode.contains = []; - } - mode.contains = Array.prototype.concat.apply([], mode.contains.map(function(c) { - return expand_mode(c === 'self' ? mode : c) - })); - mode.contains.forEach(function(c) {compileMode(c, mode);}); - - if (mode.starts) { - compileMode(mode.starts, parent); - } - - var terminators = - mode.contains.map(function(c) { - return c.beginKeywords ? '\\.?(' + c.begin + ')\\.?' : c.begin; - }) - .concat([mode.terminator_end, mode.illegal]) - .map(reStr) - .filter(Boolean); - mode.terminators = terminators.length ? langRe(terminators.join('|'), true) : {exec: function(/*s*/) {return null;}}; - } - - compileMode(language); - } - - /* - Core highlighting function. Accepts a language name, or an alias, and a - string with the code to highlight. Returns an object with the following - properties: - - - relevance (int) - - value (an HTML string with highlighting markup) - - */ - function highlight(name, value, ignore_illegals, continuation) { - - function subMode(lexeme, mode) { - var i, length; - - for (i = 0, length = mode.contains.length; i < length; i++) { - if (testRe(mode.contains[i].beginRe, lexeme)) { - return mode.contains[i]; - } - } - } - - function endOfMode(mode, lexeme) { - if (testRe(mode.endRe, lexeme)) { - while (mode.endsParent && mode.parent) { - mode = mode.parent; - } - return mode; - } - if (mode.endsWithParent) { - return endOfMode(mode.parent, lexeme); - } - } - - function isIllegal(lexeme, mode) { - return !ignore_illegals && testRe(mode.illegalRe, lexeme); - } - - function keywordMatch(mode, match) { - var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0]; - return mode.keywords.hasOwnProperty(match_str) && mode.keywords[match_str]; - } - - function buildSpan(classname, insideSpan, leaveOpen, noPrefix) { - var classPrefix = noPrefix ? '' : options.classPrefix, - openSpan = ''; - - return openSpan + insideSpan + closeSpan; - } - - function processKeywords() { - var keyword_match, last_index, match, result; - - if (!top.keywords) - return escape(mode_buffer); - - result = ''; - last_index = 0; - top.lexemesRe.lastIndex = 0; - match = top.lexemesRe.exec(mode_buffer); - - while (match) { - result += escape(mode_buffer.substring(last_index, match.index)); - keyword_match = keywordMatch(top, match); - if (keyword_match) { - relevance += keyword_match[1]; - result += buildSpan(keyword_match[0], escape(match[0])); - } else { - result += escape(match[0]); - } - last_index = top.lexemesRe.lastIndex; - match = top.lexemesRe.exec(mode_buffer); - } - return result + escape(mode_buffer.substr(last_index)); - } - - function processSubLanguage() { - var explicit = typeof top.subLanguage === 'string'; - if (explicit && !languages[top.subLanguage]) { - return escape(mode_buffer); - } - - var result = explicit ? - highlight(top.subLanguage, mode_buffer, true, continuations[top.subLanguage]) : - highlightAuto(mode_buffer, top.subLanguage.length ? top.subLanguage : undefined); - - // Counting embedded language score towards the host language may be disabled - // with zeroing the containing mode relevance. Usecase in point is Markdown that - // allows XML everywhere and makes every XML snippet to have a much larger Markdown - // score. - if (top.relevance > 0) { - relevance += result.relevance; - } - if (explicit) { - continuations[top.subLanguage] = result.top; - } - return buildSpan(result.language, result.value, false, true); - } - - function processBuffer() { - result += (top.subLanguage != null ? processSubLanguage() : processKeywords()); - mode_buffer = ''; - } - - function startNewMode(mode) { - result += mode.className? buildSpan(mode.className, '', true): ''; - top = Object.create(mode, {parent: {value: top}}); - } - - function processLexeme(buffer, lexeme) { - - mode_buffer += buffer; - - if (lexeme == null) { - processBuffer(); - return 0; - } - - var new_mode = subMode(lexeme, top); - if (new_mode) { - if (new_mode.skip) { - mode_buffer += lexeme; - } else { - if (new_mode.excludeBegin) { - mode_buffer += lexeme; - } - processBuffer(); - if (!new_mode.returnBegin && !new_mode.excludeBegin) { - mode_buffer = lexeme; - } - } - startNewMode(new_mode, lexeme); - return new_mode.returnBegin ? 0 : lexeme.length; - } - - var end_mode = endOfMode(top, lexeme); - if (end_mode) { - var origin = top; - if (origin.skip) { - mode_buffer += lexeme; - } else { - if (!(origin.returnEnd || origin.excludeEnd)) { - mode_buffer += lexeme; - } - processBuffer(); - if (origin.excludeEnd) { - mode_buffer = lexeme; - } - } - do { - if (top.className) { - result += spanEndTag; - } - if (!top.skip) { - relevance += top.relevance; - } - top = top.parent; - } while (top !== end_mode.parent); - if (end_mode.starts) { - startNewMode(end_mode.starts, ''); - } - return origin.returnEnd ? 0 : lexeme.length; - } - - if (isIllegal(lexeme, top)) - throw new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '') + '"'); - - /* - Parser should not reach this point as all types of lexemes should be caught - earlier, but if it does due to some bug make sure it advances at least one - character forward to prevent infinite looping. - */ - mode_buffer += lexeme; - return lexeme.length || 1; - } - - var language = getLanguage(name); - if (!language) { - throw new Error('Unknown language: "' + name + '"'); - } - - compileLanguage(language); - var top = continuation || language; - var continuations = {}; // keep continuations for sub-languages - var result = '', current; - for(current = top; current !== language; current = current.parent) { - if (current.className) { - result = buildSpan(current.className, '', true) + result; - } - } - var mode_buffer = ''; - var relevance = 0; - try { - var match, count, index = 0; - while (true) { - top.terminators.lastIndex = index; - match = top.terminators.exec(value); - if (!match) - break; - count = processLexeme(value.substring(index, match.index), match[0]); - index = match.index + count; - } - processLexeme(value.substr(index)); - for(current = top; current.parent; current = current.parent) { // close dangling modes - if (current.className) { - result += spanEndTag; - } - } - return { - relevance: relevance, - value: result, - language: name, - top: top - }; - } catch (e) { - if (e.message && e.message.indexOf('Illegal') !== -1) { - return { - relevance: 0, - value: escape(value) - }; - } else { - throw e; - } - } - } - - /* - Highlighting with language detection. Accepts a string with the code to - highlight. Returns an object with the following properties: - - - language (detected language) - - relevance (int) - - value (an HTML string with highlighting markup) - - second_best (object with the same structure for second-best heuristically - detected language, may be absent) - - */ - function highlightAuto(text, languageSubset) { - languageSubset = languageSubset || options.languages || objectKeys(languages); - var result = { - relevance: 0, - value: escape(text) - }; - var second_best = result; - languageSubset.filter(getLanguage).forEach(function(name) { - var current = highlight(name, text, false); - current.language = name; - if (current.relevance > second_best.relevance) { - second_best = current; - } - if (current.relevance > result.relevance) { - second_best = result; - result = current; - } - }); - if (second_best.language) { - result.second_best = second_best; - } - return result; - } - - /* - Post-processing of the highlighted markup: - - - replace TABs with something more useful - - replace real line-breaks with '
' for non-pre containers - - */ - function fixMarkup(value) { - return !(options.tabReplace || options.useBR) - ? value - : value.replace(fixMarkupRe, function(match, p1) { - if (options.useBR && match === '\n') { - return '
'; - } else if (options.tabReplace) { - return p1.replace(/\t/g, options.tabReplace); - } - return ''; - }); - } - - function buildClassName(prevClassName, currentLang, resultLang) { - var language = currentLang ? aliases[currentLang] : resultLang, - result = [prevClassName.trim()]; - - if (!prevClassName.match(/\bhljs\b/)) { - result.push('hljs'); - } - - if (prevClassName.indexOf(language) === -1) { - result.push(language); - } - - return result.join(' ').trim(); - } - - /* - Applies highlighting to a DOM node containing code. Accepts a DOM node and - two optional parameters for fixMarkup. - */ - function highlightBlock(block) { - var node, originalStream, result, resultNode, text; - var language = blockLanguage(block); - - if (isNotHighlighted(language)) - return; - - if (options.useBR) { - node = document.createElementNS('http://www.w3.org/1999/xhtml', 'div'); - node.innerHTML = block.innerHTML.replace(/\n/g, '').replace(//g, '\n'); - } else { - node = block; - } - text = node.textContent; - result = language ? highlight(language, text, true) : highlightAuto(text); - - originalStream = nodeStream(node); - if (originalStream.length) { - resultNode = document.createElementNS('http://www.w3.org/1999/xhtml', 'div'); - resultNode.innerHTML = result.value; - result.value = mergeStreams(originalStream, nodeStream(resultNode), text); - } - result.value = fixMarkup(result.value); - - block.innerHTML = result.value; - block.className = buildClassName(block.className, language, result.language); - block.result = { - language: result.language, - re: result.relevance - }; - if (result.second_best) { - block.second_best = { - language: result.second_best.language, - re: result.second_best.relevance - }; - } - } - - /* - Updates highlight.js global options with values passed in the form of an object. - */ - function configure(user_options) { - options = inherit(options, user_options); - } - - /* - Applies highlighting to all
..
blocks on a page. - */ - function initHighlighting() { - if (initHighlighting.called) - return; - initHighlighting.called = true; - - var blocks = document.querySelectorAll('pre code'); - ArrayProto.forEach.call(blocks, highlightBlock); - } - - /* - Attaches highlighting to the page load event. - */ - function initHighlightingOnLoad() { - addEventListener('DOMContentLoaded', initHighlighting, false); - addEventListener('load', initHighlighting, false); - } - - function registerLanguage(name, language) { - var lang = languages[name] = language(hljs); - if (lang.aliases) { - lang.aliases.forEach(function(alias) {aliases[alias] = name;}); - } - } - - function listLanguages() { - return objectKeys(languages); - } - - function getLanguage(name) { - name = (name || '').toLowerCase(); - return languages[name] || languages[aliases[name]]; - } - - /* Interface definition */ - - hljs.highlight = highlight; - hljs.highlightAuto = highlightAuto; - hljs.fixMarkup = fixMarkup; - hljs.highlightBlock = highlightBlock; - hljs.configure = configure; - hljs.initHighlighting = initHighlighting; - hljs.initHighlightingOnLoad = initHighlightingOnLoad; - hljs.registerLanguage = registerLanguage; - hljs.listLanguages = listLanguages; - hljs.getLanguage = getLanguage; - hljs.inherit = inherit; - - // Common regexps - hljs.IDENT_RE = '[a-zA-Z]\\w*'; - hljs.UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*'; - hljs.NUMBER_RE = '\\b\\d+(\\.\\d+)?'; - hljs.C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float - hljs.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b... - hljs.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~'; - - // Common modes - hljs.BACKSLASH_ESCAPE = { - begin: '\\\\[\\s\\S]', relevance: 0 - }; - hljs.APOS_STRING_MODE = { - className: 'string', - begin: '\'', end: '\'', - illegal: '\\n', - contains: [hljs.BACKSLASH_ESCAPE] - }; - hljs.QUOTE_STRING_MODE = { - className: 'string', - begin: '"', end: '"', - illegal: '\\n', - contains: [hljs.BACKSLASH_ESCAPE] - }; - hljs.PHRASAL_WORDS_MODE = { - begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ - }; - hljs.COMMENT = function (begin, end, inherits) { - var mode = hljs.inherit( - { - className: 'comment', - begin: begin, end: end, - contains: [] - }, - inherits || {} - ); - mode.contains.push(hljs.PHRASAL_WORDS_MODE); - mode.contains.push({ - className: 'doctag', - begin: '(?:TODO|FIXME|NOTE|BUG|XXX):', - relevance: 0 - }); - return mode; - }; - hljs.C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$'); - hljs.C_BLOCK_COMMENT_MODE = hljs.COMMENT('/\\*', '\\*/'); - hljs.HASH_COMMENT_MODE = hljs.COMMENT('#', '$'); - hljs.NUMBER_MODE = { - className: 'number', - begin: hljs.NUMBER_RE, - relevance: 0 - }; - hljs.C_NUMBER_MODE = { - className: 'number', - begin: hljs.C_NUMBER_RE, - relevance: 0 - }; - hljs.BINARY_NUMBER_MODE = { - className: 'number', - begin: hljs.BINARY_NUMBER_RE, - relevance: 0 - }; - hljs.CSS_NUMBER_MODE = { - className: 'number', - begin: hljs.NUMBER_RE + '(' + - '%|em|ex|ch|rem' + - '|vw|vh|vmin|vmax' + - '|cm|mm|in|pt|pc|px' + - '|deg|grad|rad|turn' + - '|s|ms' + - '|Hz|kHz' + - '|dpi|dpcm|dppx' + - ')?', - relevance: 0 - }; - hljs.REGEXP_MODE = { - className: 'regexp', - begin: /\//, end: /\/[gimuy]*/, - illegal: /\n/, - contains: [ - hljs.BACKSLASH_ESCAPE, - { - begin: /\[/, end: /\]/, - relevance: 0, - contains: [hljs.BACKSLASH_ESCAPE] - } - ] - }; - hljs.TITLE_MODE = { - className: 'title', - begin: hljs.IDENT_RE, - relevance: 0 - }; - hljs.UNDERSCORE_TITLE_MODE = { - className: 'title', - begin: hljs.UNDERSCORE_IDENT_RE, - relevance: 0 - }; - hljs.METHOD_GUARD = { - // excludes method names from keyword processing - begin: '\\.\\s*' + hljs.UNDERSCORE_IDENT_RE, - relevance: 0 - }; - - return hljs; - })); - - -/***/ }), -/* 338 */ -/***/ (function(module, exports) { - - module.exports = function(hljs){ - - // общий паттерн для определения идентификаторов - var UNDERSCORE_IDENT_RE = '[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+'; - - // v7 уникальные ключевые слова, отсутствующие в v8 ==> keyword - var v7_keywords = - 'далее '; - - // v8 ключевые слова ==> keyword - var v8_keywords = - 'возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли ' + - 'конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт '; - - // keyword : ключевые слова - var KEYWORD = v7_keywords + v8_keywords; - - // v7 уникальные директивы, отсутствующие в v8 ==> meta-keyword - var v7_meta_keywords = - 'загрузитьизфайла '; - - // v8 ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях ==> meta-keyword - var v8_meta_keywords = - 'вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер ' + - 'наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед ' + - 'после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент '; - - // meta-keyword : ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях - var METAKEYWORD = v7_meta_keywords + v8_meta_keywords; - - // v7 системные константы ==> built_in - var v7_system_constants = - 'разделительстраниц разделительстрок символтабуляции '; - - // v7 уникальные методы глобального контекста, отсутствующие в v8 ==> built_in - var v7_global_context_methods = - 'ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов ' + - 'датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя ' + - 'кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца ' + - 'коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид ' + - 'назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца ' + - 'начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов ' + - 'основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута ' + - 'получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта ' + - 'префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына ' + - 'рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента ' + - 'счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон '; - - // v8 методы глобального контекста ==> built_in - var v8_global_context_methods = - 'acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока ' + - 'xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ' + - 'ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации ' + - 'выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода ' + - 'деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы ' + - 'загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации ' + - 'заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию ' + - 'значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла ' + - 'изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке ' + - 'каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку ' + - 'кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты ' + - 'конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы ' + - 'копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти ' + - 'найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы ' + - 'началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя ' + - 'начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты ' + - 'начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов ' + - 'начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя ' + - 'начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога ' + - 'начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией ' + - 'начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы ' + - 'номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения ' + - 'обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении ' + - 'отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения ' + - 'открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально ' + - 'отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа ' + - 'перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту ' + - 'подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения ' + - 'подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки ' + - 'показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение ' + - 'показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя ' + - 'получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса ' + - 'получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора ' + - 'получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса ' + - 'получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации ' + - 'получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла ' + - 'получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации ' + - 'получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления ' + - 'получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу ' + - 'получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы ' + - 'получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет ' + - 'получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима ' + - 'получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения ' + - 'получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути ' + - 'получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы ' + - 'получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю ' + - 'получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных ' + - 'получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию ' + - 'получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище ' + - 'поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода ' + - 'представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение ' + - 'прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока ' + - 'рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных ' + - 'раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени ' + - 'смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить ' + - 'состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс ' + - 'строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений '+ - 'стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах ' + - 'текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации ' + - 'текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы ' + - 'удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим ' + - 'установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту ' + - 'установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных ' + - 'установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации ' + - 'установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения ' + - 'установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования ' + - 'установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима ' + - 'установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим ' + - 'установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией ' + - 'установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы ' + - 'установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса ' + - 'формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища '; - - // v8 свойства глобального контекста ==> built_in - var v8_global_context_property = - 'wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы ' + - 'внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль ' + - 'документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты ' + - 'историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений ' + - 'отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик ' + - 'планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок ' + - 'рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений ' + - 'регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа ' + - 'средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек ' + - 'хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков ' + - 'хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек '; - - // built_in : встроенные или библиотечные объекты (константы, классы, функции) - var BUILTIN = - v7_system_constants + - v7_global_context_methods + v8_global_context_methods + - v8_global_context_property; - - // v8 системные наборы значений ==> class - var v8_system_sets_of_values = - 'webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля '; - - // v8 системные перечисления - интерфейсные ==> class - var v8_system_enums_interface = - 'автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий ' + - 'анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы ' + - 'вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы ' + - 'виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя ' + - 'видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение ' + - 'горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы ' + - 'группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания ' + - 'интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки ' + - 'используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы ' + - 'источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева ' + - 'начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ' + - 'ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме ' + - 'отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы ' + - 'отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы ' + - 'отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы ' + - 'отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска ' + - 'отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования ' + - 'отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта ' + - 'отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы ' + - 'поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы ' + - 'поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы ' + - 'положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы ' + - 'положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы ' + - 'положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском ' + - 'положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы ' + - 'размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта ' + - 'режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты ' + - 'режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения ' + - 'режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра ' + - 'режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения ' + - 'режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы ' + - 'режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки ' + - 'режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание ' + - 'сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы ' + - 'способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление ' + - 'статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы ' + - 'типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы ' + - 'типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления ' + - 'типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы ' + - 'типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы ' + - 'типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений ' + - 'типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы ' + - 'типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы ' + - 'типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы ' + - 'факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени ' + - 'форматкартинки ширинаподчиненныхэлементовформы '; - - // v8 системные перечисления - свойства прикладных объектов ==> class - var v8_system_enums_objects_properties = - 'виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса ' + - 'использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения ' + - 'использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента '; - - // v8 системные перечисления - планы обмена ==> class - var v8_system_enums_exchange_plans = - 'авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных '; - - // v8 системные перечисления - табличный документ ==> class - var v8_system_enums_tabular_document = - 'использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы ' + - 'положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента ' + - 'способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента ' + - 'типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента ' + - 'типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы ' + - 'типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента ' + - 'типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц '; - - // v8 системные перечисления - планировщик ==> class - var v8_system_enums_sheduler = - 'отображениевремениэлементовпланировщика '; - - // v8 системные перечисления - форматированный документ ==> class - var v8_system_enums_formatted_document = - 'типфайлаформатированногодокумента '; - - // v8 системные перечисления - запрос ==> class - var v8_system_enums_query = - 'обходрезультатазапроса типзаписизапроса '; - - // v8 системные перечисления - построитель отчета ==> class - var v8_system_enums_report_builder = - 'видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов '; - - // v8 системные перечисления - работа с файлами ==> class - var v8_system_enums_files = - 'доступкфайлу режимдиалогавыборафайла режимоткрытияфайла '; - - // v8 системные перечисления - построитель запроса ==> class - var v8_system_enums_query_builder = - 'типизмеренияпостроителязапроса '; - - // v8 системные перечисления - анализ данных ==> class - var v8_system_enums_data_analysis = - 'видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных ' + - 'типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений ' + - 'типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций ' + - 'типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных ' + - 'типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных ' + - 'типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений '; - - // v8 системные перечисления - xml, json, xs, dom, xdto, web-сервисы ==> class - var v8_system_enums_xml_json_xs_dom_xdto_ws = - 'wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto ' + - 'действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs ' + - 'исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs ' + - 'методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ' + - 'ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson ' + - 'типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs ' + - 'форматдатыjson экранированиесимволовjson '; - - // v8 системные перечисления - система компоновки данных ==> class - var v8_system_enums_data_composition_system = - 'видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных ' + - 'расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных ' + - 'расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных ' + - 'расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных ' + - 'типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных ' + - 'типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных ' + - 'типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных ' + - 'расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных ' + - 'режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных ' + - 'режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных '+ - 'вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных ' + - 'использованиеусловногооформлениякомпоновкиданных '; - - // v8 системные перечисления - почта ==> class - var v8_system_enums_email = - 'важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения ' + - 'способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты ' + - 'статусразборапочтовогосообщения '; - - // v8 системные перечисления - журнал регистрации ==> class - var v8_system_enums_logbook = - 'режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации '; - - // v8 системные перечисления - криптография ==> class - var v8_system_enums_cryptography = - 'расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии ' + - 'типхранилищасертификатовкриптографии '; - - // v8 системные перечисления - ZIP ==> class - var v8_system_enums_zip = - 'кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip ' + - 'режимсохраненияпутейzip уровеньсжатияzip '; - - // v8 системные перечисления - - // Блокировка данных, Фоновые задания, Автоматизированное тестирование, - // Доставляемые уведомления, Встроенные покупки, Интернет, Работа с двоичными данными ==> class - var v8_system_enums_other = - 'звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных ' + - 'сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp '; - - // v8 системные перечисления - схема запроса ==> class - var v8_system_enums_request_schema = - 'направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса ' + - 'типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса '; - - // v8 системные перечисления - свойства объектов метаданных ==> class - var v8_system_enums_properties_of_metadata_objects = - 'httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления ' + - 'видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование ' + - 'использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения ' + - 'использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита ' + - 'назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных ' + - 'оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи ' + - 'основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении ' + - 'периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений ' + - 'повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение ' + - 'разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита '+ - 'режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности ' + - 'режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов ' + - 'режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса ' + - 'режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов ' + - 'сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования ' + - 'типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса ' + - 'типномерадокумента типномеразадачи типформы удалениедвижений '; - - // v8 системные перечисления - разные ==> class - var v8_system_enums_differents = - 'важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения ' + - 'вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки ' + - 'видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак ' + - 'использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога ' + - 'кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных ' + - 'отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения ' + - 'режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных ' + - 'способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter ' + - 'типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты'; - - // class: встроенные наборы значений, системные перечисления (содержат дочерние значения, обращения к которым через разыменование) - var CLASS = - v8_system_sets_of_values + - v8_system_enums_interface + - v8_system_enums_objects_properties + - v8_system_enums_exchange_plans + - v8_system_enums_tabular_document + - v8_system_enums_sheduler + - v8_system_enums_formatted_document + - v8_system_enums_query + - v8_system_enums_report_builder + - v8_system_enums_files + - v8_system_enums_query_builder + - v8_system_enums_data_analysis + - v8_system_enums_xml_json_xs_dom_xdto_ws + - v8_system_enums_data_composition_system + - v8_system_enums_email + - v8_system_enums_logbook + - v8_system_enums_cryptography + - v8_system_enums_zip + - v8_system_enums_other + - v8_system_enums_request_schema + - v8_system_enums_properties_of_metadata_objects + - v8_system_enums_differents; - - // v8 общие объекты (у объектов есть конструктор, экземпляры создаются методом НОВЫЙ) ==> type - var v8_shared_object = - 'comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs ' + - 'блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема ' + - 'географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма ' + - 'диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания ' + - 'диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление ' + - 'записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom ' + - 'запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта ' + - 'интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs ' + - 'использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных ' + - 'итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла ' + - 'компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных ' + - 'конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных ' + - 'макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson ' + - 'обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs ' + - 'объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации ' + - 'описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных ' + - 'описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs ' + - 'определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom ' + - 'определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных ' + - 'параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных ' + - 'полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных ' + - 'построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml ' + - 'процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент ' + - 'процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml ' + - 'результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto ' + - 'сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows ' + - 'сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш ' + - 'сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент ' + - 'текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток ' + - 'фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs ' + - 'фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs ' + - 'фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs ' + - 'фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент ' + - 'фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла ' + - 'чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных '; - - // v8 универсальные коллекции значений ==> type - var v8_universal_collection = - 'comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура ' + - 'фиксированноесоответствие фиксированныймассив '; - - // type : встроенные типы - var TYPE = - v8_shared_object + - v8_universal_collection; - - // literal : примитивные типы - var LITERAL = 'null истина ложь неопределено'; - - // number : числа - var NUMBERS = hljs.inherit(hljs.NUMBER_MODE); - - // string : строки - var STRINGS = { - className: 'string', - begin: '"|\\|', end: '"|$', - contains: [{begin: '""'}] - }; - - // number : даты - var DATE = { - begin: "'", end: "'", excludeBegin: true, excludeEnd: true, - contains: [ - { - className: 'number', - begin: '\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}' - } - ] - }; - - // comment : комментарии - var COMMENTS = hljs.inherit(hljs.C_LINE_COMMENT_MODE); - - // meta : инструкции препроцессора, директивы компиляции - var META = { - className: 'meta', - lexemes: UNDERSCORE_IDENT_RE, - begin: '#|&', end: '$', - keywords: {'meta-keyword': KEYWORD + METAKEYWORD}, - contains: [ - COMMENTS - ] - }; - - // symbol : метка goto - var SYMBOL = { - className: 'symbol', - begin: '~', end: ';|:', excludeEnd: true - }; - - // function : объявление процедур и функций - var FUNCTION = { - className: 'function', - lexemes: UNDERSCORE_IDENT_RE, - variants: [ - {begin: 'процедура|функция', end: '\\)', keywords: 'процедура функция'}, - {begin: 'конецпроцедуры|конецфункции', keywords: 'конецпроцедуры конецфункции'} - ], - contains: [ - { - begin: '\\(', end: '\\)', endsParent : true, - contains: [ - { - className: 'params', - lexemes: UNDERSCORE_IDENT_RE, - begin: UNDERSCORE_IDENT_RE, end: ',', excludeEnd: true, endsWithParent: true, - keywords: { - keyword: 'знач', - literal: LITERAL - }, - contains: [ - NUMBERS, - STRINGS, - DATE - ] - }, - COMMENTS - ] - }, - hljs.inherit(hljs.TITLE_MODE, {begin: UNDERSCORE_IDENT_RE}) - ] - }; - - return { - case_insensitive: true, - lexemes: UNDERSCORE_IDENT_RE, - keywords: { - keyword: KEYWORD, - built_in: BUILTIN, - class: CLASS, - type: TYPE, - literal: LITERAL - }, - contains: [ - META, - FUNCTION, - COMMENTS, - SYMBOL, - NUMBERS, - STRINGS, - DATE - ] - } - }; - -/***/ }), -/* 339 */ -/***/ (function(module, exports) { - - module.exports = function(hljs) { - var regexes = { - ruleDeclaration: "^[a-zA-Z][a-zA-Z0-9-]*", - unexpectedChars: "[!@#$^&',?+~`|:]" - }; - - var keywords = [ - "ALPHA", - "BIT", - "CHAR", - "CR", - "CRLF", - "CTL", - "DIGIT", - "DQUOTE", - "HEXDIG", - "HTAB", - "LF", - "LWSP", - "OCTET", - "SP", - "VCHAR", - "WSP" - ]; - - var commentMode = hljs.COMMENT(";", "$"); - - var terminalBinaryMode = { - className: "symbol", - begin: /%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/ - }; - - var terminalDecimalMode = { - className: "symbol", - begin: /%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/ - }; - - var terminalHexadecimalMode = { - className: "symbol", - begin: /%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/, - }; - - var caseSensitivityIndicatorMode = { - className: "symbol", - begin: /%[si]/ - }; - - var ruleDeclarationMode = { - begin: regexes.ruleDeclaration + '\\s*=', - returnBegin: true, - end: /=/, - relevance: 0, - contains: [{className: "attribute", begin: regexes.ruleDeclaration}] - }; - - return { - illegal: regexes.unexpectedChars, - keywords: keywords.join(" "), - contains: [ - ruleDeclarationMode, - commentMode, - terminalBinaryMode, - terminalDecimalMode, - terminalHexadecimalMode, - caseSensitivityIndicatorMode, - hljs.QUOTE_STRING_MODE, - hljs.NUMBER_MODE - ] - }; - }; - -/***/ }), -/* 340 */ -/***/ (function(module, exports) { - - module.exports = function(hljs) { - return { - contains: [ - // IP - { - className: 'number', - begin: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b' - }, - // Other numbers - { - className: 'number', - begin: '\\b\\d+\\b', - relevance: 0 - }, - // Requests - { - className: 'string', - begin: '"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)', end: '"', - keywords: 'GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE', - illegal: '\\n', - relevance: 10 - }, - // Dates - { - className: 'string', - begin: /\[/, end: /\]/, - illegal: '\\n' - }, - // Strings - { - className: 'string', - begin: '"', end: '"', - illegal: '\\n' - } - ] - }; - }; - -/***/ }), -/* 341 */ -/***/ (function(module, exports) { - - module.exports = function(hljs) { - var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*'; - var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)'; - - var AS3_REST_ARG_MODE = { - className: 'rest_arg', - begin: '[.]{3}', end: IDENT_RE, - relevance: 10 - }; - - return { - aliases: ['as'], - keywords: { - keyword: 'as break case catch class const continue default delete do dynamic each ' + - 'else extends final finally for function get if implements import in include ' + - 'instanceof interface internal is namespace native new override package private ' + - 'protected public return set static super switch this throw try typeof use var void ' + - 'while with', - literal: 'true false null undefined' - }, - contains: [ - hljs.APOS_STRING_MODE, - hljs.QUOTE_STRING_MODE, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - hljs.C_NUMBER_MODE, - { - className: 'class', - beginKeywords: 'package', end: '{', - contains: [hljs.TITLE_MODE] - }, - { - className: 'class', - beginKeywords: 'class interface', end: '{', excludeEnd: true, - contains: [ - { - beginKeywords: 'extends implements' - }, - hljs.TITLE_MODE - ] - }, - { - className: 'meta', - beginKeywords: 'import include', end: ';', - keywords: {'meta-keyword': 'import include'} - }, - { - className: 'function', - beginKeywords: 'function', end: '[{;]', excludeEnd: true, - illegal: '\\S', - contains: [ - hljs.TITLE_MODE, - { - className: 'params', - begin: '\\(', end: '\\)', - contains: [ - hljs.APOS_STRING_MODE, - hljs.QUOTE_STRING_MODE, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - AS3_REST_ARG_MODE - ] - }, - { - begin: ':\\s*' + IDENT_FUNC_RETURN_TYPE_RE - } - ] - }, - hljs.METHOD_GUARD - ], - illegal: /#/ - }; - }; - -/***/ }), -/* 342 */ -/***/ (function(module, exports) { - - module.exports = // We try to support full Ada2012 - // - // We highlight all appearances of types, keywords, literals (string, char, number, bool) - // and titles (user defined function/procedure/package) - // CSS classes are set accordingly - // - // Languages causing problems for language detection: - // xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword) - // sql (ada default.txt has a lot of sql keywords) - - function(hljs) { - // Regular expression for Ada numeric literals. - // stolen form the VHDL highlighter - - // Decimal literal: - var INTEGER_RE = '\\d(_|\\d)*'; - var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE; - var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?'; - - // Based literal: - var BASED_INTEGER_RE = '\\w+'; - var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?'; - - var NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')'; - - // Identifier regex - var ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*'; - - // bad chars, only allowed in literals - var BAD_CHARS = '[]{}%#\'\"' - - // Ada doesn't have block comments, only line comments - var COMMENTS = hljs.COMMENT('--', '$'); - - // variable declarations of the form - // Foo : Bar := Baz; - // where only Bar will be highlighted - var VAR_DECLS = { - // TODO: These spaces are not required by the Ada syntax - // however, I have yet to see handwritten Ada code where - // someone does not put spaces around : - begin: '\\s+:\\s+', end: '\\s*(:=|;|\\)|=>|$)', - // endsWithParent: true, - // returnBegin: true, - illegal: BAD_CHARS, - contains: [ - { - // workaround to avoid highlighting - // named loops and declare blocks - beginKeywords: 'loop for declare others', - endsParent: true, - }, - { - // properly highlight all modifiers - className: 'keyword', - beginKeywords: 'not null constant access function procedure in out aliased exception' - }, - { - className: 'type', - begin: ID_REGEX, - endsParent: true, - relevance: 0, - } - ] - }; - - return { - case_insensitive: true, - keywords: { - keyword: - 'abort else new return abs elsif not reverse abstract end ' + - 'accept entry select access exception of separate aliased exit or some ' + - 'all others subtype and for out synchronized array function overriding ' + - 'at tagged generic package task begin goto pragma terminate ' + - 'body private then if procedure type case in protected constant interface ' + - 'is raise use declare range delay limited record when delta loop rem while ' + - 'digits renames with do mod requeue xor', - literal: - 'True False', - }, - contains: [ - COMMENTS, - // strings "foobar" - { - className: 'string', - begin: /"/, end: /"/, - contains: [{begin: /""/, relevance: 0}] - }, - // characters '' - { - // character literals always contain one char - className: 'string', - begin: /'.'/ - }, - { - // number literals - className: 'number', - begin: NUMBER_RE, - relevance: 0 - }, - { - // Attributes - className: 'symbol', - begin: "'" + ID_REGEX, - }, - { - // package definition, maybe inside generic - className: 'title', - begin: '(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?', end: '(is|$)', - keywords: 'package body', - excludeBegin: true, - excludeEnd: true, - illegal: BAD_CHARS - }, - { - // function/procedure declaration/definition - // maybe inside generic - begin: '(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+', end: '(\\bis|\\bwith|\\brenames|\\)\\s*;)', - keywords: 'overriding function procedure with is renames return', - // we need to re-match the 'function' keyword, so that - // the title mode below matches only exactly once - returnBegin: true, - contains: - [ - COMMENTS, - { - // name of the function/procedure - className: 'title', - begin: '(\\bwith\\s+)?\\b(function|procedure)\\s+', - end: '(\\(|\\s+|$)', - excludeBegin: true, - excludeEnd: true, - illegal: BAD_CHARS - }, - // 'self' - // // parameter types - VAR_DECLS, - { - // return type - className: 'type', - begin: '\\breturn\\s+', end: '(\\s+|;|$)', - keywords: 'return', - excludeBegin: true, - excludeEnd: true, - // we are done with functions - endsParent: true, - illegal: BAD_CHARS - - }, - ] - }, - { - // new type declarations - // maybe inside generic - className: 'type', - begin: '\\b(sub)?type\\s+', end: '\\s+', - keywords: 'type', - excludeBegin: true, - illegal: BAD_CHARS - }, - - // see comment above the definition - VAR_DECLS, - - // no markup - // relevance boosters for small snippets - // {begin: '\\s*=>\\s*'}, - // {begin: '\\s*:=\\s*'}, - // {begin: '\\s+:=\\s+'}, - ] - }; - }; - -/***/ }), -/* 343 */ -/***/ (function(module, exports) { - - module.exports = function(hljs) { - var NUMBER = {className: 'number', begin: '[\\$%]\\d+'}; - return { - aliases: ['apacheconf'], - case_insensitive: true, - contains: [ - hljs.HASH_COMMENT_MODE, - {className: 'section', begin: ''}, - { - className: 'attribute', - begin: /\w+/, - relevance: 0, - // keywords aren’t needed for highlighting per se, they only boost relevance - // for a very generally defined mode (starts with a word, ends with line-end - keywords: { - nomarkup: - 'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' + - 'sethandler errordocument loadmodule options header listen serverroot ' + - 'servername' - }, - starts: { - end: /$/, - relevance: 0, - keywords: { - literal: 'on off all' - }, - contains: [ - { - className: 'meta', - begin: '\\s\\[', end: '\\]$' - }, - { - className: 'variable', - begin: '[\\$%]\\{', end: '\\}', - contains: ['self', NUMBER] - }, - NUMBER, - hljs.QUOTE_STRING_MODE - ] - } - } - ], - illegal: /\S/ - }; - }; - -/***/ }), -/* 344 */ -/***/ (function(module, exports) { - - module.exports = function(hljs) { - var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: ''}); - var PARAMS = { - className: 'params', - begin: '\\(', end: '\\)', - contains: ['self', hljs.C_NUMBER_MODE, STRING] - }; - var COMMENT_MODE_1 = hljs.COMMENT('--', '$'); - var COMMENT_MODE_2 = hljs.COMMENT( - '\\(\\*', - '\\*\\)', - { - contains: ['self', COMMENT_MODE_1] //allow nesting - } - ); - var COMMENTS = [ - COMMENT_MODE_1, - COMMENT_MODE_2, - hljs.HASH_COMMENT_MODE - ]; - - return { - aliases: ['osascript'], - keywords: { - keyword: - 'about above after against and around as at back before beginning ' + - 'behind below beneath beside between but by considering ' + - 'contain contains continue copy div does eighth else end equal ' + - 'equals error every exit fifth first for fourth from front ' + - 'get given global if ignoring in into is it its last local me ' + - 'middle mod my ninth not of on onto or over prop property put ref ' + - 'reference repeat returning script second set seventh since ' + - 'sixth some tell tenth that the|0 then third through thru ' + - 'timeout times to transaction try until where while whose with ' + - 'without', - literal: - 'AppleScript false linefeed return pi quote result space tab true', - built_in: - 'alias application boolean class constant date file integer list ' + - 'number real record string text ' + - 'activate beep count delay launch log offset read round ' + - 'run say summarize write ' + - 'character characters contents day frontmost id item length ' + - 'month name paragraph paragraphs rest reverse running time version ' + - 'weekday word words year' - }, - contains: [ - STRING, - hljs.C_NUMBER_MODE, - { - className: 'built_in', - begin: - '\\b(clipboard info|the clipboard|info for|list (disks|folder)|' + - 'mount volume|path to|(close|open for) access|(get|set) eof|' + - 'current date|do shell script|get volume settings|random number|' + - 'set volume|system attribute|system info|time to GMT|' + - '(load|run|store) script|scripting components|' + - 'ASCII (character|number)|localized string|' + - 'choose (application|color|file|file name|' + - 'folder|from list|remote application|URL)|' + - 'display (alert|dialog))\\b|^\\s*return\\b' - }, - { - className: 'literal', - begin: - '\\b(text item delimiters|current application|missing value)\\b' - }, - { - className: 'keyword', - begin: - '\\b(apart from|aside from|instead of|out of|greater than|' + - "isn't|(doesn't|does not) (equal|come before|come after|contain)|" + - '(greater|less) than( or equal)?|(starts?|ends|begins?) with|' + - 'contained by|comes (before|after)|a (ref|reference)|POSIX file|' + - 'POSIX path|(date|time) string|quoted form)\\b' - }, - { - beginKeywords: 'on', - illegal: '[${=;\\n]', - contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS] - } - ].concat(COMMENTS), - illegal: '//|->|=>|\\[\\[' - }; - }; - -/***/ }), -/* 345 */ -/***/ (function(module, exports) { - - module.exports = function(hljs) { - var CPP_PRIMITIVE_TYPES = { - className: 'keyword', - begin: '\\b[a-z\\d_]*_t\\b' - }; - - var STRINGS = { - className: 'string', - variants: [ - { - begin: '(u8?|U)?L?"', end: '"', - illegal: '\\n', - contains: [hljs.BACKSLASH_ESCAPE] - }, - { - begin: '(u8?|U)?R"', end: '"', - contains: [hljs.BACKSLASH_ESCAPE] - }, - { - begin: '\'\\\\?.', end: '\'', - illegal: '.' - } - ] - }; - - var NUMBERS = { - className: 'number', - variants: [ - { begin: '\\b(0b[01\']+)' }, - { begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' }, - { begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' } - ], - relevance: 0 - }; - - var PREPROCESSOR = { - className: 'meta', - begin: /#\s*[a-z]+\b/, end: /$/, - keywords: { - 'meta-keyword': - 'if else elif endif define undef warning error line ' + - 'pragma ifdef ifndef include' - }, - contains: [ - { - begin: /\\\n/, relevance: 0 - }, - hljs.inherit(STRINGS, {className: 'meta-string'}), - { - className: 'meta-string', - begin: /<[^\n>]*>/, end: /$/, - illegal: '\\n', - }, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE - ] - }; - - var FUNCTION_TITLE = hljs.IDENT_RE + '\\s*\\('; - - var CPP_KEYWORDS = { - keyword: 'int float while private char catch import module export virtual operator sizeof ' + - 'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' + - 'unsigned long volatile static protected bool template mutable if public friend ' + - 'do goto auto void enum else break extern using asm case typeid ' + - 'short reinterpret_cast|10 default double register explicit signed typename try this ' + - 'switch continue inline delete alignof constexpr decltype ' + - 'noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary ' + - 'atomic_bool atomic_char atomic_schar ' + - 'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' + - 'atomic_ullong new throw return ' + - 'and or not', - built_in: 'std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' + - 'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' + - 'unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos ' + - 'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' + - 'fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' + - 'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' + - 'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' + - 'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' + - 'vfprintf vprintf vsprintf endl initializer_list unique_ptr', - literal: 'true false nullptr NULL' - }; - - var EXPRESSION_CONTAINS = [ - CPP_PRIMITIVE_TYPES, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - NUMBERS, - STRINGS - ]; - - return { - aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp'], - keywords: CPP_KEYWORDS, - illegal: '', - keywords: CPP_KEYWORDS, - contains: ['self', CPP_PRIMITIVE_TYPES] - }, - { - begin: hljs.IDENT_RE + '::', - keywords: CPP_KEYWORDS - }, - { - // This mode covers expression context where we can't expect a function - // definition and shouldn't highlight anything that looks like one: - // `return some()`, `else if()`, `(x*sum(1, 2))` - variants: [ - {begin: /=/, end: /;/}, - {begin: /\(/, end: /\)/}, - {beginKeywords: 'new throw return else', end: /;/} - ], - keywords: CPP_KEYWORDS, - contains: EXPRESSION_CONTAINS.concat([ - { - begin: /\(/, end: /\)/, - keywords: CPP_KEYWORDS, - contains: EXPRESSION_CONTAINS.concat(['self']), - relevance: 0 - } - ]), - relevance: 0 - }, - { - className: 'function', - begin: '(' + hljs.IDENT_RE + '[\\*&\\s]+)+' + FUNCTION_TITLE, - returnBegin: true, end: /[{;=]/, - excludeEnd: true, - keywords: CPP_KEYWORDS, - illegal: /[^\w\s\*&]/, - contains: [ - { - begin: FUNCTION_TITLE, returnBegin: true, - contains: [hljs.TITLE_MODE], - relevance: 0 - }, - { - className: 'params', - begin: /\(/, end: /\)/, - keywords: CPP_KEYWORDS, - relevance: 0, - contains: [ - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - STRINGS, - NUMBERS, - CPP_PRIMITIVE_TYPES - ] - }, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - PREPROCESSOR - ] - }, - { - className: 'class', - beginKeywords: 'class struct', end: /[{;:]/, - contains: [ - {begin: //, contains: ['self']}, // skip generic stuff - hljs.TITLE_MODE - ] - } - ]), - exports: { - preprocessor: PREPROCESSOR, - strings: STRINGS, - keywords: CPP_KEYWORDS - } - }; - }; - -/***/ }), -/* 346 */ -/***/ (function(module, exports) { - - module.exports = function(hljs) { - var CPP = hljs.getLanguage('cpp').exports; - return { - keywords: { - keyword: - 'boolean byte word string String array ' + CPP.keywords.keyword, - built_in: - 'setup loop while catch for if do goto try switch case else ' + - 'default break continue return ' + - 'KeyboardController MouseController SoftwareSerial ' + - 'EthernetServer EthernetClient LiquidCrystal ' + - 'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' + - 'HttpClient RobotMotor WiFiClient GSMScanner ' + - 'FileSystem Scheduler GSMServer YunClient YunServer ' + - 'IPAddress GSMClient GSMModem Keyboard Ethernet ' + - 'Console GSMBand Esplora Stepper Process ' + - 'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' + - 'Client Server GSMPIN FileIO Bridge Serial ' + - 'EEPROM Stream Mouse Audio Servo File Task ' + - 'GPRS WiFi Wire TFT GSM SPI SD ' + - 'runShellCommandAsynchronously analogWriteResolution ' + - 'retrieveCallingNumber printFirmwareVersion ' + - 'analogReadResolution sendDigitalPortPair ' + - 'noListenOnLocalhost readJoystickButton setFirmwareVersion ' + - 'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' + - 'scrollDisplayLeft writeMicroseconds delayMicroseconds ' + - 'beginTransmission getSignalStrength runAsynchronously ' + - 'getAsynchronously listenOnLocalhost getCurrentCarrier ' + - 'readAccelerometer messageAvailable sendDigitalPorts ' + - 'lineFollowConfig countryNameWrite runShellCommand ' + - 'readStringUntil rewindDirectory readTemperature ' + - 'setClockDivider readLightSensor endTransmission ' + - 'analogReference detachInterrupt countryNameRead ' + - 'attachInterrupt encryptionType readBytesUntil ' + - 'robotNameWrite readMicrophone robotNameRead cityNameWrite ' + - 'userNameWrite readJoystickY readJoystickX mouseReleased ' + - 'openNextFile scanNetworks noInterrupts digitalWrite ' + - 'beginSpeaker mousePressed isActionDone mouseDragged ' + - 'displayLogos noAutoscroll addParameter remoteNumber ' + - 'getModifiers keyboardRead userNameRead waitContinue ' + - 'processInput parseCommand printVersion readNetworks ' + - 'writeMessage blinkVersion cityNameRead readMessage ' + - 'setDataMode parsePacket isListening setBitOrder ' + - 'beginPacket isDirectory motorsWrite drawCompass ' + - 'digitalRead clearScreen serialEvent rightToLeft ' + - 'setTextSize leftToRight requestFrom keyReleased ' + - 'compassRead analogWrite interrupts WiFiServer ' + - 'disconnect playMelody parseFloat autoscroll ' + - 'getPINUsed setPINUsed setTimeout sendAnalog ' + - 'readSlider analogRead beginWrite createChar ' + - 'motorsStop keyPressed tempoWrite readButton ' + - 'subnetMask debugPrint macAddress writeGreen ' + - 'randomSeed attachGPRS readString sendString ' + - 'remotePort releaseAll mouseMoved background ' + - 'getXChange getYChange answerCall getResult ' + - 'voiceCall endPacket constrain getSocket writeJSON ' + - 'getButton available connected findUntil readBytes ' + - 'exitValue readGreen writeBlue startLoop IPAddress ' + - 'isPressed sendSysex pauseMode gatewayIP setCursor ' + - 'getOemKey tuneWrite noDisplay loadImage switchPIN ' + - 'onRequest onReceive changePIN playFile noBuffer ' + - 'parseInt overflow checkPIN knobRead beginTFT ' + - 'bitClear updateIR bitWrite position writeRGB ' + - 'highByte writeRed setSpeed readBlue noStroke ' + - 'remoteIP transfer shutdown hangCall beginSMS ' + - 'endWrite attached maintain noCursor checkReg ' + - 'checkPUK shiftOut isValid shiftIn pulseIn ' + - 'connect println localIP pinMode getIMEI ' + - 'display noBlink process getBand running beginSD ' + - 'drawBMP lowByte setBand release bitRead prepare ' + - 'pointTo readRed setMode noFill remove listen ' + - 'stroke detach attach noTone exists buffer ' + - 'height bitSet circle config cursor random ' + - 'IRread setDNS endSMS getKey micros ' + - 'millis begin print write ready flush width ' + - 'isPIN blink clear press mkdir rmdir close ' + - 'point yield image BSSID click delay ' + - 'read text move peek beep rect line open ' + - 'seek fill size turn stop home find ' + - 'step tone sqrt RSSI SSID ' + - 'end bit tan cos sin pow map abs max ' + - 'min get run put', - literal: - 'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' + - 'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' + - 'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' + - 'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' + - 'DEFAULT OUTPUT INPUT HIGH LOW' - }, - contains: [ - CPP.preprocessor, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - hljs.APOS_STRING_MODE, - hljs.QUOTE_STRING_MODE, - hljs.C_NUMBER_MODE - ] - }; - }; - -/***/ }), -/* 347 */ -/***/ (function(module, exports) { - - module.exports = function(hljs) { - //local labels: %?[FB]?[AT]?\d{1,2}\w+ - return { - case_insensitive: true, - aliases: ['arm'], - lexemes: '\\.?' + hljs.IDENT_RE, - keywords: { - meta: - //GNU preprocs - '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg '+ - //ARM directives - 'ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ', - built_in: - 'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 '+ //standard registers - 'pc lr sp ip sl sb fp '+ //typical regs plus backward compatibility - 'a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 '+ //more regs and fp - 'p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 '+ //coprocessor regs - 'c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 '+ //more coproc - 'q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 '+ //advanced SIMD NEON regs - - //program status registers - 'cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf '+ - 'spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf '+ - - //NEON and VFP registers - 's0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 '+ - 's16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 '+ - 'd0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 '+ - 'd16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ' + - - '{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @' - }, - contains: [ - { - className: 'keyword', - begin: '\\b('+ //mnemonics - 'adc|'+ - '(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|'+ - 'and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|'+ - 'bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|'+ - 'setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|'+ - 'ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|'+ - 'mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|'+ - 'mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|'+ - 'mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|'+ - 'rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|'+ - 'stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|'+ - '[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|'+ - 'wfe|wfi|yield'+ - ')'+ - '(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?'+ //condition codes - '[sptrx]?' , //legal postfixes - end: '\\s' - }, - hljs.COMMENT('[;@]', '$', {relevance: 0}), - hljs.C_BLOCK_COMMENT_MODE, - hljs.QUOTE_STRING_MODE, - { - className: 'string', - begin: '\'', - end: '[^\\\\]\'', - relevance: 0 - }, - { - className: 'title', - begin: '\\|', end: '\\|', - illegal: '\\n', - relevance: 0 - }, - { - className: 'number', - variants: [ - {begin: '[#$=]?0x[0-9a-f]+'}, //hex - {begin: '[#$=]?0b[01]+'}, //bin - {begin: '[#$=]\\d+'}, //literal - {begin: '\\b\\d+'} //bare number - ], - relevance: 0 - }, - { - className: 'symbol', - variants: [ - {begin: '^[a-z_\\.\\$][a-z0-9_\\.\\$]+'}, //ARM syntax - {begin: '^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'}, //GNU ARM syntax - {begin: '[=#]\\w+' } //label reference - ], - relevance: 0 - } - ] - }; - }; - -/***/ }), -/* 348 */ -/***/ (function(module, exports) { - - module.exports = function(hljs) { - var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+'; - var TAG_INTERNALS = { - endsWithParent: true, - illegal: /`]+/} - ] - } - ] - } - ] - }; - return { - aliases: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist'], - case_insensitive: true, - contains: [ - { - className: 'meta', - begin: '', - relevance: 10, - contains: [{begin: '\\[', end: '\\]'}] - }, - hljs.COMMENT( - '', - { - relevance: 10 - } - ), - { - begin: '<\\!\\[CDATA\\[', end: '\\]\\]>', - relevance: 10 - }, - { - begin: /<\?(php)?/, end: /\?>/, - subLanguage: 'php', - contains: [{begin: '/\\*', end: '\\*/', skip: true}] - }, - { - className: 'tag', - /* - The lookahead pattern (?=...) ensures that 'begin' only matches - '|$)', end: '>', - keywords: {name: 'style'}, - contains: [TAG_INTERNALS], - starts: { - end: '', returnEnd: true, - subLanguage: ['css', 'xml'] - } - }, - { - className: 'tag', - // See the comment in the